Mercurial > ec-dotfiles
comparison bin/ren @ 84:34f193d5e7cd
Added some rules.
author | Edho Prima Arief <me@myconan.net> |
---|---|
date | Wed, 22 Jun 2011 08:03:46 +0700 |
parents | babf62f1bba7 |
children | 14435bd3f01c |
comparison
equal
deleted
inserted
replaced
78:06fd72a78cc1 | 84:34f193d5e7cd |
---|---|
10 print(qq(Could not find file "$_", skipping\n)) and next() unless -e $_; | 10 print(qq(Could not find file "$_", skipping\n)) and next() unless -e $_; |
11 my $newname = $_; | 11 my $newname = $_; |
12 #START HERE | 12 #START HERE |
13 $newname =~ s/_/ /g; | 13 $newname =~ s/_/ /g; |
14 #TITLE AND NAMES | 14 #TITLE AND NAMES |
15 $newname =~ s/^\[Jumonji-Giri\]\[Soldats\]\[AonE&HQA\] D\.C\. Da Capo /[Jumonji-Giri] Da Capo /i; | 15 $newname =~ s/\[WPP & T-N\]/[WPP T-N]/; |
16 $newname =~ s/\[Elysium\]K-ON!!\.EP(\d+)\(BD\.1080p\.FLAC\)/[Elysium] K-ON!! - $1 [1080p BD]/i; | |
17 $newname =~ s/\[Elysium\]K-ON!!\.(ED|OP)(\d+)\(BD\.1080p\.FLAC\)/[Elysium] K-ON!! - $1 $2 [1080p BD]/i; | |
18 $newname =~ s/\[Elysium\]K-ON!!\.SP\d+\[EP(\d+)\]\(BD\.1080p\.FLAC\)/[Elysium] K-ON!! - $1 [1080p BD]/i; | |
19 $newname =~ s/^\[wpp\]digimon frontier /[wpp] Digimon Frontier /i; | |
20 $newname =~ s/^\[ACX\]Fantastic Children - (\d+) .*/[ACX] Fantastic Children - $1.mkv/i; | |
21 $newname =~ s/\[a-s\] sakigake!! cromartie high school - (\d+) - .* /[a-S] Sakigake!! Cromartie High School - $1 /; | |
22 $newname =~ s/zx\.tenchi-universe\./[zx] Tenchi Universe - /; | |
23 $newname =~ s/ ro-kyu-bu! / Ro-Kyu-Bu! /i; | |
24 $newname =~ s/( Transformers Headmasters - \d+) - .*\[/$1 [/i; | |
25 $newname =~ s/^cor\.tv\.getbackers\.(\d+)\./[cor] GetBackers - $1 /; | |
26 $newname =~ s/^cor\.extras\.getbackers\.(opening|ending)(\d+)\./[cor] GetBackers - $1 $2 /; | |
27 $newname =~ s/^Revolutionary Girl Utena /[Henshin] Revolutionary Girl Utena /; | |
28 $newname =~ s/His and Her Circumstances/His and Her Circumstances/i; | |
29 $newname =~ s/(\[dvdrip\] Transformers \(1984\) -) E(\d+) .*(\.avi)/$1 $2 $3/; | |
30 $newname =~ s/ Highschool of the Dead / High School of the Dead /i; | |
31 $newname =~ s/LOGH Gaiden 2 E(\d+) .*(\.avi|\.mkv)/Legend of Galactic Heroes Gaiden 2 - $1$2/i; | |
32 $newname =~ s/^\[RaX\] *Kiba - (\d+) - .* (\[v2\] \[|\[)/[RaX] Kiba - $1 $2/; | |
33 $newname =~ s/ (Gosick - \d+) \(Batch\) / $1 /; | |
34 $newname =~ s/ Clannad - After Story - / Clannad After Story - /; | |
35 $newname =~ s/^Mahoujin Guruguru TV2 - Doki Doki Densetsu Ep(\d+) \((Chamelenia)\)/[Chamelenia] Mahoujin Guruguru 2 - Doki Doki Densetsu - $1/i; | |
36 $newname =~ s/\.divx5\.ogm$/.ogm/; | |
37 $newname =~ s/\[(neo1024)\] Lupin III - (\d+) - .+ \[/[$1] Lupin III S2 - $2 [/; | |
38 $newname =~ s/ Lupin S2 - / Lupin III S2 - /; | |
39 $newname =~ s/ Prince of Tennis (\d+)/ Prince of Tennis - $1/i; | |
40 $newname =~ s/ Boogiepop - / Boogiepop Phantom - /i; | |
41 $newname =~ s/ Aika Zero OVA / Aika Zero /i; | |
42 $newname =~ s/^\[A-BT&Pakapuka\]PopoloCrois 2003 Ep/[A-BT Pakapuka] PopoloCrois (2003) - /; | |
43 $newname =~ s/^\[A-BT&Pakapuka\] PopoloCrois Story 1998 /[A-BT Pakapuka] PopoloCrois (1998) - /; | |
44 $newname =~ s/ (Pollyanna|Happy Kappi) Episode (\d+) / $1 - $2 /; | |
45 $newname =~ s/\(G P\) Now and Then Here and There \(R2J\)/[G P] Now and Then Here and There - /; | |
46 $newname =~ s/\[A-Flux&Lunar\]/[A-Flux Lunar]/i; | |
47 $newname =~ s/^(Mushishi) - (\d+) - .* - (\[niizk\])/$3 $1 - $1/; | |
48 $newname =~ s/^(Saikano) (\d+)\[h\.264-AAC\](\[SSP-Corp\])/$3 $1 - $2 /; | |
16 $newname =~ s/^PitaTen.* Ep (\d+) .*\.avi/[Hnk] Pita Ten - $1.avi/; | 49 $newname =~ s/^PitaTen.* Ep (\d+) .*\.avi/[Hnk] Pita Ten - $1.avi/; |
17 $newname =~ s/^\[a-S\] Inuyasha - (\d+|\d+-\d+) /Inuyasha - $1 [a-S]/; | 50 $newname =~ s/^\[a-S\] Inuyasha - (\d+|\d+-\d+) /Inuyasha - $1 [a-S]/; |
18 $newname =~ s/\[DVD\]\[AHQ\]/[AHQ][DVD]/; | 51 $newname =~ s/\[DVD\]\[AHQ\]/[AHQ][DVD]/; |
19 $newname =~ s/\[subdesu\]/[SubDesu]/i; | |
20 $newname =~ s/ Zettai Shougeki - Platonic Heart / Zettai Shougeki /i; | |
21 $newname =~ s/^mars daybreak /[V-A] Mars Daybreak - /; | 52 $newname =~ s/^mars daybreak /[V-A] Mars Daybreak - /; |
22 $newname =~ s/ Shuffle! Episode / Shuffle! /; | 53 $newname =~ s/ Shuffle! Episode / Shuffle! /; |
54 $newname =~ s/ A-Channel / A Channel /; | |
55 $newname =~ s/ Moshidora \(Moshi Koko Yakyu no Joshi Manager ga Drucker no Management o Yondara\) / Moshidora /; | |
23 $newname =~ s/^\[ZA\]\.Saint\.Seiya\.Episode\.(\d+)\.DVDrip\.\[X264\.AAC\(Jpn-Fre\)\.Sub\(Fre-Eng\)\.Chap\]\.mkv$/[D-YFI] Saint Seiya - $1 [DVD].mkv/; | 56 $newname =~ s/^\[ZA\]\.Saint\.Seiya\.Episode\.(\d+)\.DVDrip\.\[X264\.AAC\(Jpn-Fre\)\.Sub\(Fre-Eng\)\.Chap\]\.mkv$/[D-YFI] Saint Seiya - $1 [DVD].mkv/; |
24 $newname =~ s/^HajimeNoIppo.*Round(\d+)-.*\(anime-mx\)/[Anime-MX] Fighting Spirit - $1 /; | 57 $newname =~ s/^HajimeNoIppo.*Round(\d+)-.*\(anime-mx\)/[Anime-MX] Fighting Spirit - $1 /; |
25 $newname =~ s/^(\[ACX\])(Final Fantasy Unlimited) - (\d+) .*\[ALI\] /$1 $2 - $3 /; | 58 $newname =~ s/^(\[ACX\])(Final Fantasy Unlimited) - (\d+) .*\[ALI\] /$1 $2 - $3 /; |
26 $newname =~ s/^\[a-s\] inuyasha - (\d+-\d+) rs2 /[a-S] Inuyasha - $1 /; | 59 $newname =~ s/^\[a-s\] inuyasha - (\d+-\d+) rs2 /[a-S] Inuyasha - $1 /; |
27 $newname =~ s/^(\[Kira-Fansub\]) Uchuu no (Stellvia) /$1 $2 /; | 60 $newname =~ s/^(\[Kira-Fansub\]) Uchuu no (Stellvia) /$1 $2 /; |
28 $newname =~ s/^(\[RaX\])(Chobits) - (\d+`\d) .*\(x264 aac\) /$1 $2 - $3 /; | 61 $newname =~ s/^(\[RaX\])(Chobits) - (\d+`\d) .*\(x264 aac\) /$1 $2 - $3 /; |
29 $newname =~ s/ Maria( |†)Holic / Maria+Holic /i; | 62 $newname =~ s/ Maria( |†)Holic / Maria+Holic /i; |
63 $newname =~ s/ Pollyanna Episode / Pollyanna /; | |
30 $newname =~ s/^Legend of Galactic Heroes - (\d+) \(([A-F0-9]{8})\) \[Central Anime\]/[Central Anime] Legend of Galactic Heroes - $1 [$2]/; | 64 $newname =~ s/^Legend of Galactic Heroes - (\d+) \(([A-F0-9]{8})\) \[Central Anime\]/[Central Anime] Legend of Galactic Heroes - $1 [$2]/; |
31 $newname =~ s/\[Hnk\]/[HnK]/; | 65 $newname =~ s/\[Hnk\]/[HnK]/; |
32 $newname =~ s/^Inuyasha - (\d+|\d+-\d+)\[167\] - .*(\[DVD\]\[AHQ\])/Inuyasha - $1 $2/; | 66 $newname =~ s/^Inuyasha - (\d+|\d+-\d+)\[167\] - .*(\[DVD\]\[AHQ\])/Inuyasha - $1 $2/; |
33 $newname =~ s/^Saint Seiya Hades OVA - (\d+) \[(AonE-SpA|SpA)\]/[$2] Saint Seiya Hades OVA - $1/; | 67 $newname =~ s/^Saint Seiya Hades OVA - (\d+) \[(AonE-SpA|SpA)\]/[$2] Saint Seiya Hades OVA - $1/; |
34 $newname =~ s/\[\d+\] Saint Seiya Hades OVA - (\d+)/[SpA] Saint Seiya Hades OVA - $1/; | 68 $newname =~ s/\[\d+\] Saint Seiya Hades OVA - (\d+)/[SpA] Saint Seiya Hades OVA - $1/; |
51 $newname =~ s/ Ep(\d+)v3 \[R2 Video\]/ - $1 [v3]/; | 85 $newname =~ s/ Ep(\d+)v3 \[R2 Video\]/ - $1 [v3]/; |
52 $newname =~ s/ Brighter Than The Dawning Blue - Crescent Love Ep(\d+) Subbed / Brigher Than The Dawning Blue - Crescent Love - $1 /; | 86 $newname =~ s/ Brighter Than The Dawning Blue - Crescent Love Ep(\d+) Subbed / Brigher Than The Dawning Blue - Crescent Love - $1 /; |
53 $newname =~ s/ Brighter Than The Dawning Blue - Crescent Love - (\d+) Subbed / Brigher Than The Dawning Blue - Crescent Love - $1 /; | 87 $newname =~ s/ Brighter Than The Dawning Blue - Crescent Love - (\d+) Subbed / Brigher Than The Dawning Blue - Crescent Love - $1 /; |
54 $newname =~ s/ Character Monologue 0/ Character Monologue /; | 88 $newname =~ s/ Character Monologue 0/ Character Monologue /; |
55 $newname =~ s/Ookami-san\.to\.Shichinin\.no\.Nakama-tachi\.EP(\d+)\(BD\.1080p\.AAC\)/Ookami-san - $1 [1080p BD]/; | 89 $newname =~ s/Ookami-san\.to\.Shichinin\.no\.Nakama-tachi\.EP(\d+)\(BD\.1080p\.AAC\)/Ookami-san - $1 [1080p BD]/; |
56 $newname =~ s/Ore.?tachi ni tsubasa wa nai /Oretachi ni Tsubasa wa nai /i; | 90 $newname =~ s/Ore.?tachi ni tsubasa wa nai /Oretachi ni Tsubasa wa Nai /i; |
57 $newname =~ s/\[anime-rg . ray=out\]/[anime-rg ray=out]/; | 91 $newname =~ s/\[anime-rg . ray=out\]/[anime-rg ray=out]/; |
58 $newname =~ s/^Arigatou\.Soul\.Eater\.Ep(\d+)\. \[x264\.AAC\]/[Arigatou] Soul Eater - $1 /; | 92 $newname =~ s/^Arigatou\.Soul\.Eater\.Ep(\d+)\. \[x264\.AAC\]/[Arigatou] Soul Eater - $1 /; |
59 $newname =~ s/^\[Doremi\]\.HeartCatch\.PreCure!\.(\d+)\.\[1280x720\]\./[Doremi] HeartCatch PreCure! - $1 [720p]/; | 93 $newname =~ s/^\[Doremi\]\.HeartCatch\.PreCure!\.(\d+)\.\[1280x720\]\./[Doremi] HeartCatch PreCure! - $1 [720p]/; |
60 $newname =~ s/^\[Doremi-CureCom\]\.Suite\.PreCure!\.(\d+)\.\[1280x720\]\./[Doremi-CureCom] Suite PreCure! - $1 [720p]/; | 94 $newname =~ s/^\[Doremi-CureCom\]\.Suite\.PreCure!\.(\d+)\.\[1280x720\]\./[Doremi-CureCom] Suite PreCure! - $1 [720p]/; |
61 $newname =~ s/^\[Doremi\]\.Motto\.Ojamajo\.Doremi\.(\d+)\./[Doremi] Motto Ojamajo Doremi - $1 /; | 95 $newname =~ s/^\[Doremi\]\.Motto\.Ojamajo\.Doremi\.(\d+)\./[Doremi] Motto Ojamajo Doremi - $1 /; |
142 $newname =~ s/ NCOP / - Opening (Clean)/; | 176 $newname =~ s/ NCOP / - Opening (Clean)/; |
143 $newname =~ s/ OP / - Opening /; | 177 $newname =~ s/ OP / - Opening /; |
144 $newname =~ s/ - - / - /; | 178 $newname =~ s/ - - / - /; |
145 $newname =~ s/ Ep / /ig; | 179 $newname =~ s/ Ep / /ig; |
146 #GENERAL RULES | 180 #GENERAL RULES |
181 $newname =~ s/\(1280x720 x264 AAC\)/[720p]/i; | |
182 $newname =~ s/\( *(1920x1080 h264 BD FLAC|1920x1080 BD) *\)/[1080p BD]/i; | |
183 ##SLICED BREAD | |
184 $newname =~ s/\[(\d+th Release|xvid|divx5\.2\.1|divx5\.1|divx5\.05|divx5\.1\.1|h\.?264 AC3|848x480|H264 848x480|h264-480p AAC|h\.264-480p)\]//i; | |
185 $newname =~ s/\[(DVD 720x480|DVD H264 720x480)\]/[DVD]/i; | |
186 $newname =~ s/\[(1280x720 H264 AAC)\]/[720p]/i; | |
187 $newname =~ s/\[(BD 1280x720 H264 AAC)\]/[720p BD]/i; | |
188 ##SLICED BREAD pt.2 | |
189 $newname =~ s/(\d+)v(\d+)/$1 [v$2]/i; | |
190 $newname =~ s/\[BD\]\[1920x1080 H264-Flac\]/[1080p BD]/i; | |
147 $newname =~ s/\.DVD/[DVD]/; | 191 $newname =~ s/\.DVD/[DVD]/; |
148 $newname =~ s/ ~(.+)~ / - $1 /; | 192 $newname =~ s/ ~(.+)~ / - $1 /; |
149 $newname =~ s/v2 \(BD-1080p\) / [v2 1080p BD]/i; | 193 $newname =~ s/v2 \(BD-1080p\) / [v2 1080p BD]/i; |
150 $newname =~ s/v2 \(BD H264 1280x960 24fps AAC\) / [v2 960p BD]/i; | 194 $newname =~ s/v2 \(BD H264 1280x960 24fps AAC\) / [v2 960p BD]/i; |
151 $newname =~ s/BD 1280x720 FLAC\]/ 720p BD]/i; | 195 $newname =~ s/BD 1280x720 FLAC\]/ 720p BD]/i; |
155 $newname =~ s/\[BD 720p\]/[720p BD]/; | 199 $newname =~ s/\[BD 720p\]/[720p BD]/; |
156 $newname =~ s/ \(BD H264 1280x960 24fps AAC\) / [960p BD]/i; | 200 $newname =~ s/ \(BD H264 1280x960 24fps AAC\) / [960p BD]/i; |
157 $newname =~ s/ \(h\.264\) //i; | 201 $newname =~ s/ \(h\.264\) //i; |
158 $newname =~ s/\(xvid-mp3\)//i; | 202 $newname =~ s/\(xvid-mp3\)//i; |
159 $newname =~ s/\(BD 1920x1080 *\)/[1080p BD]/i; | 203 $newname =~ s/\(BD 1920x1080 *\)/[1080p BD]/i; |
204 $newname =~ s/\[BD 1080p\]/[1080p BD]/i; | |
160 $newname =~ s/v3 \(BD-1080p\) / [v3 1080p BD]/i; | 205 $newname =~ s/v3 \(BD-1080p\) / [v3 1080p BD]/i; |
161 $newname =~ s/v0 \[720p\]/ [v0 720p]/i; | 206 $newname =~ s/v0 \[720p\]/ [v0 720p]/i; |
162 $newname =~ s/v0 \[/ [v0 /i; | 207 $newname =~ s/v0 \[/ [v0 /i; |
208 $newname =~ s/\[BD 1920x1080\]/[1080p BD]/; | |
163 $newname =~ s/\[1080p - Bluray\]/[1080p BD]/; | 209 $newname =~ s/\[1080p - Bluray\]/[1080p BD]/; |
164 $newname =~ s/\[Bluray - 1080p\]/[1080p BD]/; | 210 $newname =~ s/\[Bluray - 1080p\]/[1080p BD]/; |
165 $newname =~ s/\[BD 1080p AAC\]/[1080p BD]/; | 211 $newname =~ s/\[BD 1080p AAC\]/[1080p BD]/; |
166 $newname =~ s/ \(BD-1080p\) / [1080p BD]/i; | 212 $newname =~ s/ \(BD-1080p\) / [1080p BD]/i; |
167 $newname =~ s/ \(720p, BD\) / [720p BD]/i; | 213 $newname =~ s/ \(720p, BD\) / [720p BD]/i; |
171 $newname =~ s/ \(BD, 720p, FLAC\) / [720p BD]/i; | 217 $newname =~ s/ \(BD, 720p, FLAC\) / [720p BD]/i; |
172 $newname =~ s/\[END\]/[End]/; | 218 $newname =~ s/\[END\]/[End]/; |
173 $newname =~ s/\[BD\]\[720p FLAC\]/[720p BD]/; | 219 $newname =~ s/\[BD\]\[720p FLAC\]/[720p BD]/; |
174 $newname =~ s/\[BD\]\[720p\]/[720p BD]/; | 220 $newname =~ s/\[BD\]\[720p\]/[720p BD]/; |
175 $newname =~ s/\[BD\]\[1080p\]/[1080p BD]/; | 221 $newname =~ s/\[BD\]\[1080p\]/[1080p BD]/; |
176 $newname =~ s/\[h264-480p AAC\]//; | |
177 $newname =~ s/\[h.264-480p\]//i; | |
178 $newname =~ s/ v3 \[720p\]/[v3 720p]/i; | 222 $newname =~ s/ v3 \[720p\]/[v3 720p]/i; |
179 $newname =~ s/1280x720 H264 OGG/720p/; | 223 $newname =~ s/1280x720 H264 OGG/720p/; |
180 $newname =~ s/ \[BD 1080p FLAC\]/ [1080p BD]/i; | 224 $newname =~ s/ \[BD 1080p FLAC\]/ [1080p BD]/i; |
181 $newname =~ s/ \[720p BD FLAC\]/ [720p BD]/i; | 225 $newname =~ s/ \[720p BD FLAC\]/ [720p BD]/i; |
182 $newname =~ s/ \[720p Blu-ray AAC\]/ [720p BD]/i; | 226 $newname =~ s/ \[720p Blu-ray AAC\]/ [720p BD]/i; |
184 $newname =~ s/ \(1920x1080\) \[BD\]/ [1080p BD]/i; | 228 $newname =~ s/ \(1920x1080\) \[BD\]/ [1080p BD]/i; |
185 $newname =~ s/ \(960x720 Blu-Ray FLAC\) / [720p BD]/i; | 229 $newname =~ s/ \(960x720 Blu-Ray FLAC\) / [720p BD]/i; |
186 $newname =~ s/ \(1920x1080 Blu-Ray FLAC\) / [1080p BD]/i; | 230 $newname =~ s/ \(1920x1080 Blu-Ray FLAC\) / [1080p BD]/i; |
187 $newname =~ s/ \(1280x720 Blu-Ray FLAC\) / [720p BD]/i; | 231 $newname =~ s/ \(1280x720 Blu-Ray FLAC\) / [720p BD]/i; |
188 $newname =~ s/ \(1280x720 h264 BD FLAC\) / [720p BD]/i; | 232 $newname =~ s/ \(1280x720 h264 BD FLAC\) / [720p BD]/i; |
189 $newname =~ s/ \(704x480 DVD AAC\) / [DVD]/i; | 233 $newname =~ s/\((704|720)x480 DVD (AC3|AAC)\)/ [DVD]/i; |
190 $newname =~ s/ \(960x720\) \[BD\]/ [720p BD]/i; | 234 $newname =~ s/ \(960x720\) \[BD\]/ [720p BD]/i; |
191 $newname =~ s/\(704x396\)//; | 235 $newname =~ s/\(704x396\)//; |
192 $newname =~ s/\(1280x720\)/ [720p]/i; | 236 $newname =~ s/\(1280x720\)/ [720p]/i; |
193 $newname =~ s/\(1920x1080\)/ [1080p]/i; | 237 $newname =~ s/\(1920x1080\)/ [1080p]/i; |
194 $newname =~ s/\(720x480 DVD AC3\)/ [DVD]/i; | |
195 $newname =~ s/\(1024x576\)/ [576p]/i; | 238 $newname =~ s/\(1024x576\)/ [576p]/i; |
196 $newname =~ s/\(1280x720 h264\)/ [720p]/i; | 239 $newname =~ s/\(1280x720 h264\)/ [720p]/i; |
197 $newname =~ s/\(1280x720 ?(h264|x264)?( aac)?\)/ [720p]/i; | 240 $newname =~ s/\(1280x720 ?(h264|x264)?( aac)?\)/ [720p]/i; |
198 $newname =~ s/\(720p\)/[720p]/i; | 241 $newname =~ s/\(720p\)/[720p]/i; |
199 $newname =~ s/\(1080p\)/[1080p]/i; | 242 $newname =~ s/\(1080p\)/[1080p]/i; |
200 $newname =~ s/\(1080p,BD\)/[1080p BD]/i; | 243 $newname =~ s/\(1080p,BD\)/[1080p BD]/i; |
201 $newname =~ s/\(BD,1080p\)/[1080p BD]/i; | 244 $newname =~ s/\(BD,1080p\)/[1080p BD]/i; |
202 $newname =~ s/\((BD 720p)\)/ [720p BD]/i; | 245 $newname =~ s/\((BD 720p)\)/ [720p BD]/i; |
203 $newname =~ s/\(DVD\)/ [DVD]/i; | 246 $newname =~ s/\(DVD\)/ [DVD]/i; |
204 $newname =~ s/\[h264-480p\]//i; | 247 $newname =~ s/\[h264-480p\]//i; |
205 $newname =~ s/\[H264\]//i; | |
206 $newname =~ s/\[DVD\]\[v2\]/[v2 DVD]/i; | 248 $newname =~ s/\[DVD\]\[v2\]/[v2 DVD]/i; |
207 $newname =~ s/xvid//i; | 249 $newname =~ s/xvid//i; |
208 $newname =~ s/\[AC3\]//i; | 250 $newname =~ s/\[(AC3|AAC|H264|X264)\]//i; |
209 $newname =~ s/\[H264&MP3\]//i; | 251 $newname =~ s/\[H264&MP3\]//i; |
210 $newname =~ s/\[H264-AAC\]//i; | 252 $newname =~ s/\[H264-AAC\]//i; |
211 $newname =~ s/\+AAC//i; | 253 $newname =~ s/\+AAC//i; |
212 $newname =~ s/\[720x480 H264-Vorbis\]//i; | 254 $newname =~ s/\[720x480 H264-Vorbis\]//i; |
213 $newname =~ s/\[BD\]\[1280x720 H264-Flac\]/[720p BD]/i; | 255 $newname =~ s/\[BD\]\[1280x720 H264-Flac\]/[720p BD]/i; |
224 $newname =~ s/\[h264-720p\]/[720p]/i; | 266 $newname =~ s/\[h264-720p\]/[720p]/i; |
225 $newname =~ s/\[h264-1080p FLAC\]/[1080p]/i; | 267 $newname =~ s/\[h264-1080p FLAC\]/[1080p]/i; |
226 $newname =~ s/\[BD\]\[h264-1080p AC3\]/[1080p BD]/i; | 268 $newname =~ s/\[BD\]\[h264-1080p AC3\]/[1080p BD]/i; |
227 $newname =~ s/\[-/[/i; | 269 $newname =~ s/\[-/[/i; |
228 $newname =~ s/ \(1280x720 x264 AAC\)/ [720p]/i; | 270 $newname =~ s/ \(1280x720 x264 AAC\)/ [720p]/i; |
271 $newname =~ s/ *\( *\d+x(1080|960|720|576) *Blu-Ray *(FLAC|) *\) */[$1p BD]/i; | |
229 $newname =~ s/\[720p\]\[v2\]/[v2 720p]/i; | 272 $newname =~ s/\[720p\]\[v2\]/[v2 720p]/i; |
230 $newname =~ s/\[480p\]//i; | 273 $newname =~ s/\[480p\]//i; |
231 $newname =~ s/\[v2\]\[720p\]/[v2 720p]/i; | 274 $newname =~ s/\[v2\]\[720p\]/[v2 720p]/i; |
232 $newname =~ s/\[H264 - AAC\]//i; | 275 $newname =~ s/\[H264 - AAC\]//i; |
233 $newname =~ s/\[H264 1280x720 AAC\] /[720p]/i; | 276 $newname =~ s/\[H264 1280x720 AAC\] /[720p]/i; |
277 $newname =~ s/\[DVD 480p\]/[DVD]/i; | |
278 $newname =~ s/\[704x480 DVD\]/[DVD]/i; | |
234 $newname =~ s/\[720p\]\[End\]/[End 720p]/i; | 279 $newname =~ s/\[720p\]\[End\]/[End 720p]/i; |
235 $newname =~ s/ R2 DVD\(H264\.AC3\)/ [DVD]/i; | 280 $newname =~ s/ R2 DVD\(H264\.AC3\)/ [DVD]/i; |
236 $newname =~ s/ - Ep / - /i; | 281 $newname =~ s/ - Ep / - /i; |
237 $newname =~ s/(h|x)\.?264//i; | 282 $newname =~ s/(h|x)\.?264//i; |
238 $newname =~ s/\[BD\]\[1080p-?\]/[1080p BD]/; | 283 $newname =~ s/\[BD\]\[1080p-?\]/[1080p BD]/; |
247 $newname =~ s/ Ep(\d+)v2 / - $1 [v2]/; | 292 $newname =~ s/ Ep(\d+)v2 / - $1 [v2]/; |
248 $newname =~ s/ (\d+) / - $1 /; | 293 $newname =~ s/ (\d+) / - $1 /; |
249 $newname =~ s/ (\d+)v(2|3) / $1 [v${2}]/; | 294 $newname =~ s/ (\d+)v(2|3) / $1 [v${2}]/; |
250 $newname =~ s/\[720x480 AR FLAC\]//i; | 295 $newname =~ s/\[720x480 AR FLAC\]//i; |
251 $newname =~ s/\[DVD 640x480\]/[DVD]/; | 296 $newname =~ s/\[DVD 640x480\]/[DVD]/; |
297 $newname =~ s/\[BD 1280x720\]/[720p BD]/i; | |
298 $newname =~ s/\[v(\d+) (1280x)(720)\]/[v$1 $3p]/i; | |
252 $newname =~ s/ Episode (- )+(\d+) / - $2 /; | 299 $newname =~ s/ Episode (- )+(\d+) / - $2 /; |
300 $newname =~ s/ - (\d+) *v(\d) / - $1 [v$2]/i; | |
301 $newname =~ s/\[V(\d)\]/[v$1]/; | |
253 #DANGEROUS CLEANUPS | 302 #DANGEROUS CLEANUPS |
254 $newname =~ s/ \[v(2|3)\]\[(.+)\]\[([0-9A-Fa-f]{8})\]/ [v$1 $2][$3]/; | 303 $newname =~ s/ \[v(2|3)\]\[(.+)\]\[([0-9A-Fa-f]{8})\]/ [v$1 $2][$3]/; |
255 $newname =~ s/\]/] /g; | 304 $newname =~ s/\]/] /g; |
256 $newname =~ s/\[/ [/g; | 305 $newname =~ s/\[/ [/g; |
257 $newname =~ s/\] +\[/][/g; | 306 $newname =~ s/\] +\[/][/g; |
260 $newname =~ s/( -)+ / - /g; | 309 $newname =~ s/( -)+ / - /g; |
261 $newname =~ s/(\[|\()([0-9a-fA-F]{8})(\]|\))/[\U$2]/; | 310 $newname =~ s/(\[|\()([0-9a-fA-F]{8})(\]|\))/[\U$2]/; |
262 $newname =~ s/ +(\.\w{3})$/$1/; | 311 $newname =~ s/ +(\.\w{3})$/$1/; |
263 $newname =~ s/\[\]//g; | 312 $newname =~ s/\[\]//g; |
264 $newname =~ s/\(\)//g; | 313 $newname =~ s/\(\)//g; |
314 $newname =~ s/ - (\d+) - (\d+) / $1 - $2 /; | |
265 #EXCEPTIONS | 315 #EXCEPTIONS |
266 $newname =~ s/^\[DB&L-E\]/[DB L-E]/; | 316 $newname =~ s/^\[DB&L-E\]/[DB L-E]/; |
267 $newname =~ s/ VS Knight Lamune & - 40 fire / VS Knight Lamune & 40 fire /; | 317 $newname =~ s/ VS Knight Lamune & - 40 fire / VS Knight Lamune & 40 fire /; |
268 $newname =~ s/ RAINBOW / Rainbow /; | 318 $newname =~ s/ RAINBOW / Rainbow /; |
269 $newname =~ s/ Golgo - 13 / Golgo 13 /; | 319 $newname =~ s/ Golgo - 13 / Golgo 13 /; |
270 $newname =~ s/ Strike Witches - 2 / Strike Witches 2 - /; | 320 $newname =~ s/ Strike Witches - 2 / Strike Witches 2 - /; |
271 $newname =~ s/ 07-GHOST / 07-Ghost /; | 321 $newname =~ s/ 07-GHOST / 07-Ghost /; |
272 $newname =~ s/ K-ON!! B-Side Theater - Uraon!! - / K-ON!! B-Side Theater - Uraon!! /; | 322 $newname =~ s/ K-ON!! B-Side Theater - Uraon!! - / K-ON!! B-Side Theater - Uraon!! /; |
273 $newname =~ s/ Captain Tsubasa Road to - 2002 / Captain Tsubasa Road to 2002 /; | 323 $newname =~ s/ Captain Tsubasa Road to - 2002 / Captain Tsubasa Road to 2002 /; |
324 $newname =~ s/ Ultraviolet Code - 044 - / Ultraviolet Code 044 - /; | |
274 $newname =~ s/ SP0/ - Special /; | 325 $newname =~ s/ SP0/ - Special /; |
275 $newname =~ s/ Special - / - Special /; | 326 $newname =~ s/ Special - / - Special /; |
276 $newname =~ s/ Opening - / Opening /; | 327 $newname =~ s/ Opening - / Opening /; |
277 $newname =~ s/ Ending - / Ending /; | 328 $newname =~ s/ Ending - / Ending /; |
278 $newname =~ s/ Hidamari Sketch Hoshimittsu - Special / Hidamari Sketch Hoshimittsu Special - /; | 329 $newname =~ s/ Hidamari Sketch Hoshimittsu - Special / Hidamari Sketch Hoshimittsu Special - /; |
279 $newname =~ s/ Spice and Wolf S2 - BD Menu - 0/ Spice and Wolf S2 - BD Menu /; | 330 $newname =~ s/ Spice and Wolf S2 - BD Menu - 0/ Spice and Wolf S2 - BD Menu /; |
280 $newname =~ s/ Canvas - 2 - / Canvas 2 - /; | 331 $newname =~ s/ Canvas - 2 - / Canvas 2 - /; |
332 #$newname =~ s/ Prince of Tennis - (\d{2})/ Prince of Tennis - 0$1/i; | |
333 #$newname =~ s/ Prince of Tennis - (\d{3})-(\d{2}) / Prince of Tennis - $1-0$2 /i; | |
334 #$newname =~ s/ Prince of Tennis - 0(\d{3})/ Prince of Tennis - $1/i; | |
335 #$newname =~ s/ Prince of Tennis - 00(\d{3})/ Prince of Tennis - $1/i; | |
281 $newname =~ s/ Mitsudomoe - 2 - / Mitsudomoe 2 - /; | 336 $newname =~ s/ Mitsudomoe - 2 - / Mitsudomoe 2 - /; |
282 $newname =~ s/ Eyeshield - 21 - / Eyeshield 21 - /; | 337 $newname =~ s/ Eyeshield - 21 - / Eyeshield 21 - /; |
338 $newname =~ s/ - opening - (\d+) / - Opening $1 /i; | |
339 $newname =~ s/ - ending - (\d+) / - Ending $1 /i; | |
283 $newname =~ s/ Eyeshield 21 - (\d{2}) / Eyeshield 21 - 0$1 /; | 340 $newname =~ s/ Eyeshield 21 - (\d{2}) / Eyeshield 21 - 0$1 /; |
284 $newname =~ s/ Eyeshield 21 - (\d{2})-(\d{2}) / Eyeshield 21 - 0$1-0$2 /; | 341 $newname =~ s/ Eyeshield 21 - (\d{2})-(\d{2}) / Eyeshield 21 - 0$1-0$2 /; |
285 $newname =~ s/ - 2010 Young Animator / 2010 Young Animator /; | 342 $newname =~ s/ - 2010 Young Animator / 2010 Young Animator /; |
343 $newname =~ s/ Mahoujin Guruguru - 2 - Doki Doki Densetsu - / Mahoujin Guruguru 2 - Doki Doki Densetsu - /; | |
344 $newname =~ s/ The World God Only Knows - 2 - / The World God Only Knows 2 - /; | |
345 $newname =~ s/ Legend of Galactic Heroes Gaiden - 2 - / Legend of Galactic Heroes Gaiden 2 - /; | |
286 $newname =~ s/\[G P\]/[G_P]/i; | 346 $newname =~ s/\[G P\]/[G_P]/i; |
287 #SAFE CLEANUPS | 347 #SAFE CLEANUPS |
288 $newname =~ s/ +/ /g; | 348 $newname =~ s/ +/ /g; |
289 $newname =~ s/^ +//; | 349 $newname =~ s/^ +//; |
290 $newname =~ s/(- )+/- /; | 350 $newname =~ s/(- )+/- /; |
291 $newname =~ s/^\[N - F\]/[N-F]/; | 351 $newname =~ s/^\[N - F\]/[N-F]/; |
292 $newname =~ s/^\[K-F & AKUPX\]/[K-F AKUPX]/; | 352 $newname =~ s/^\[K-F & AKUPX\]/[K-F AKUPX]/; |
293 $newname =~ s/^\[([\s\w\- ]+)\] (Kyou Kara Maou|Bleach|Naruto|One Piece|Detective Conan) - (Opening \d+|Special \d+|\d+|\d+-\d+) /$2 - $3 [$1]/; | 353 $newname =~ s/^\[([\.\s\w\- ]+)\] (Ultraviolet Code 044|Gintama|Prince of Tennis|Lupin III S2|Kyou Kara Maou|Bleach|Naruto|One Piece|Detective Conan) - (Ending \d+|Opening \d+|Special \d+|\d+|\d+-\d+) /$2 - $3 [$1]/; |
294 $newname =~ s/^Naruto - (\d{2}) /Naruto - 0$1 /; | 354 $newname =~ s/^Naruto - (\d{2}) /Naruto - 0$1 /; |
295 $newname =~ s/^Naruto - (\d{2})-(\d{2}) /Naruto - 0$1-0$2 /; | 355 $newname =~ s/^Naruto - (\d{2})-(\d{2}) /Naruto - 0$1-0$2 /; |
296 print(qq($_: $newname already exists, skipping\n)) and next() if -e $newname and $_ ne $newname; | 356 print(qq($_: $newname already exists, skipping\n)) and next() if -e $newname and $_ ne $newname; |
297 if ($_ eq $newname) { | 357 if ($_ eq $newname) { |
298 print("$_: no need to rename, skipping\n"); | 358 print("$_: no need to rename, skipping\n"); |