first commit

This commit is contained in:
2025-11-05 18:29:49 +03:00
commit a80c03a27d
41 changed files with 7713 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
start = "\xf8"
finish = "\r"
with open('megasport_new_5.txt', 'r') as file:
new_lines = []
current_line = ""
capturing = False
for line in file:
if start in line:
capturing = True
current_line = line[line.index(start):]
elif capturing:
if finish in line:
finish_idx = line.index(finish)
current_line += line[:finish_idx + len(finish)]
new_lines.append(current_line)
current_line = ""
capturing = False
else:
current_line += line
with open('new_log.txt', 'w') as new_file:
for line in new_lines:
new_file.write(line + '\n')