mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
76c7e51f4a
* update scripts and move outdated ones to /old/ * updates * resolve issues
43 lines
1.1 KiB
Python
Executable File
43 lines
1.1 KiB
Python
Executable File
with open("errs.txt") as f:
|
|
inlines = f.readlines()
|
|
|
|
renames = {}
|
|
|
|
for line in inlines:
|
|
components = line.split()
|
|
|
|
area = None
|
|
for c in components:
|
|
if area:
|
|
break
|
|
if "src" in c:
|
|
subcomponents = c.split("/")
|
|
for i, sc in enumerate(subcomponents):
|
|
if "area" in sc:
|
|
area = subcomponents[i + 1]
|
|
break
|
|
|
|
if area:
|
|
fname = line[line.rfind("`") + 1:line.rfind("'")]
|
|
renames[fname] = area
|
|
|
|
pairs = []
|
|
for k, v in sorted(renames.items()):
|
|
pairs.append((k, v))
|
|
|
|
with open("bloop.txt") as f:
|
|
blooplines = f.readlines()
|
|
|
|
|
|
with open("duplicate_renames.txt", "w", newline="\n") as f:
|
|
for pair in pairs:
|
|
first = pair[0]
|
|
second = pair[1]
|
|
addr = first.split("_")[1].upper()
|
|
|
|
for l in blooplines:
|
|
if l.upper().startswith(addr) and second in l and " g " in l and " F" in l:
|
|
func = l.rstrip().split()[-1]
|
|
if first != func:
|
|
f.write(f"{first},{func}\n")
|