This commit is contained in:
snus xD
2025-06-10 20:47:14 +05:00
commit 08f1582dc0
2198 changed files with 61 additions and 0 deletions

25
NeedTranslate/rename.py Normal file
View File

@@ -0,0 +1,25 @@
import os
import shutil
ch4F = "./ch4"
files = os.listdir(ch4F)
os.mkdir(f"{ch4F}/TEMPwo0")
for sprite in files:
if ".png" in sprite and sprite and f"{sprite[:-6]}_1.png" in files:
if "TEMP" not in files:
os.mkdir(f"{ch4F}/TEMP")
for finds in files:
if sprite[:-6] in finds and sprite in files:
shutil.move(f"{ch4F}/{finds}", f"{ch4F}/TEMP/{finds}")
os.rename(f"{ch4F}/TEMP", f"{ch4F}/{sprite[:-6]}")
else:
shutil.move(f"{ch4F}/{sprite}", f"{ch4F}/TEMPwo0/{sprite}")
os.rename(f"{ch4F}/TEMPwo0/{sprite}", f"{ch4F}/TEMPwo0/{sprite[:-6]}.png")
files = os.listdir(ch4F)
shutil.move(f"{ch4F}/TEMPwo0", f"{ch4F}")
os.remove(f"{ch4F}/TEMPwo0")
print(files)