from io import StringIO



text = """
<junh1024> Both upscaled to 2/3 ch
<junh1024> I upscale to 6/7 ch this time
<junh1024> In prev 2, i made fake stereo width, this time, it's all real stereo, but i chopped it up lots
<junh1024> so 3xstereo vs 3xmono
<drf|Desktop> I mean
<drf|Desktop> I'm still fine with just making it actual mono
<drf|Desktop> it sounds just as good

"""

text=text.replace(" i "," I ")#capitalize Is

nicktokennumber = 0 #0 = first token
lastnick=""

lines = text.splitlines() #split by line
output = StringIO() #riced string


for line in lines:
	tokenizedline = line.split(' ')
	try:
		if tokenizedline[nicktokennumber] != lastnick: #different nick
			# print(tokenizedline[nicktokennumber])
			# print(lastnick)
			output.write('\r\n' + tokenizedline[nicktokennumber] + ':')
	except:
		continue
	for word in range(nicktokennumber+1,len(tokenizedline)):
		output.write(' '+ tokenizedline[word]) #print the the rest of the lines
	output.write('.') #add full top
	lastnick=tokenizedline[nicktokennumber]
	# print(lastnick)

outputstring=output.getvalue()
print(outputstring)

@@ -738,30 +738,20 @@
 %0A%09%09%09
-output.write('%5Cr%5Cn' + 
+cleanednick=
 toke
@@ -776,16 +776,85 @@
 nnumber%5D
+.replace('%3C','').replace('%3E','')%0A%09%09%09output.write('%5Cr%5Cn' + cleanednick
  + ':')%0A

Clean nicks