mirror of
https://github.com/pret/pokeemerald.git
synced 2026-09-08 02:56:14 -05:00
Renamed folders and symbols to match species defines (#5581)
This commit is contained in:
21
dev_scripts/competitive_defines/rename_subfolders.py
Normal file
21
dev_scripts/competitive_defines/rename_subfolders.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import glob
|
||||
import re
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
def rename_subdirs(rootDir, old, new):
|
||||
for root, dirs, files in os.walk(rootDir):
|
||||
for name in files:
|
||||
originalName = os.path.join(root, name)
|
||||
if root.endswith(old) and os.path.isfile(originalName):
|
||||
newName = originalName.replace(old + '/', new + '/')
|
||||
print(originalName + " -> " + newName)
|
||||
if (not os.path.isdir(root.replace(old, '') + new)):
|
||||
os.mkdir(root.replace(old, '') + new)
|
||||
os.rename(originalName, newName)
|
||||
|
||||
rename_subdirs("graphics/pokemon", '/alolan', "/alola")
|
||||
rename_subdirs("graphics/pokemon", '/galarian', "/galar")
|
||||
rename_subdirs("graphics/pokemon", '/hisuian', "/hisui")
|
||||
rename_subdirs("graphics/pokemon", '/gigantamax', "/gmax")
|
||||
Reference in New Issue
Block a user