forked from possatti/pokemonsay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen_9_renamer.py
123 lines (118 loc) · 2.91 KB
/
gen_9_renamer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import subprocess
POKEMON_NAMES = [
"shroodle",
"Grafaiai",
"Bramblin",
"Brambleghast",
"Toedscool",
"Toedscruel",
"Klawf",
"Capsakid",
"Scovillain",
"Rellor",
"Rabsca",
"Flittle",
"Espathra",
"Tinkatink",
"Tinkatuff",
"Tinkaton",
"Wiglett",
"Wugtrio",
"Bombirdier",
"Finizen",
"Palafin",
"Varoom",
"Revavroom",
"Cyclizar",
"Orthworm",
"Glimmet",
"Glimmora",
"Greavard",
"Houndstone",
"Flamigo",
"Cetoddle",
"Cetitan",
"Veluza",
"Dondozo",
"Tatsugiri-Orange",
"Annihilape",
"Clodsire",
"Farigiraf",
"Dudunsparce",
"Kingambit",
"Great-Tusk",
"Scream-Tail",
"Brute-Bonnet",
"Flutter-Mane",
"Slither-Wing",
"Sandy-Shocks",
"Iron-Treads",
"Iron-Bundle",
"Iron-Hands",
"Iron-Jugulis",
"Iron-Moth",
"Iron-Thorns",
"Frigibax",
"Arctibax",
"Baxcalibur",
"Gimmighoul",
"Gholdengo",
"Wo-Chien",
"Chien-Pao",
"Ting-Lu",
"Chi-Yu",
"Roaring-Moon",
"Iron-Valiant",
"Koraidon",
"Miraidon",
"Walking-Wake",
"Iron-Leaves",
"Dipplin",
"Poltchageist",
"Sinistcha",
"Okidogi",
"Munkidori",
"Fezandipiti",
"Ogerpon",
"Archaludon",
"Hydrapple",
"Gouging-Fire",
"Raging-Bolt",
"Iron-Boulder",
"Iron-Crown",
"Terapagos",
"Pecharunt",
"Tauros-Paldea",
"Tauros-Paldea-Blaze",
"Tauros-Paldea-Aqua",
"Wooper-Paldea",
"Ursaluna-Bloodmoon",
"Oinkologne-Female",
"Maushold-Family-of-Four",
"Squawkabilly-White-Plumage",
"Squawkabilly-Blue-Plumage",
"Squawkabilly-Yellow-Plumage",
"Palafin-Hero-Form",
"Tatsugiri-Red",
"Tatsugiri-Yellow",
"Dudunsparce-Three-Segment",
"Gimmighoul-Roaming-Form",
"Koraidon-Rider-Form",
"Miraidon-Rider-Form",
"Ogerpon-Hearthflame-Mask",
"Ogerpon-Wellspring-Mask",
"Ogerpon-Cornerstone-Mask",
"Terapagos-Terastal-Form",
"Terapagos-Stellar-Form"
]
def renamer():
names = [name.lower() for name in POKEMON_NAMES]
for i in range(39, 143):
# Run find_replace {arg1} {arg2} -r '\b(?:shiny-)?$1\.png\b'
command: str = f"find_replace {i} {names[i-39]} -r '{r"\b(?:shiny-)?$1\.png\b"}'"
subprocess.run(command, shell=True, check=True)
#subprocess.run(['find_replace', file, '-r', r'\b(?:shiny-)?' + file + r'\b'])
#print(command)
print("Done")
if __name__ == '__main__':
renamer()