comparison bin/ren @ 123:173833e4ba35

Merge.
author Edho Prima Arief <edho@myconan.net>
date Wed, 26 Oct 2011 15:15:39 +0700
parents 6a7305364793
children 6d5ee629cd0b
comparison
equal deleted inserted replaced
122:eacc854eae67 123:173833e4ba35
13 $newname =~ s/_/ /g; 13 $newname =~ s/_/ /g;
14 # GROUP NAMES 14 # GROUP NAMES
15 $newname =~ s/\[UTW Mazui\]/[UTW-Mazui]/i; 15 $newname =~ s/\[UTW Mazui\]/[UTW-Mazui]/i;
16 #TITLE AND NAMES 16 #TITLE AND NAMES
17 $newname =~ s/^(\(|\[)W B(\)|\])/[W_B]/; 17 $newname =~ s/^(\(|\[)W B(\)|\])/[W_B]/;
18 if ($newname =~ m/\[Doremi/) {
19 $newname =~ s/\.([a-z0-9]+)$/,$1/i;
20 $newname =~ s/\./ /g;
21 $newname =~ s/,([a-z0-9]+)$/.$1/i;
22 }
18 $newname =~ s/^Genesis of Aquarion - (\d+) \[3xR\]\[Blu-ray.720p.H264.FLAC.AC3\](v2|)/[3xR] Genesis of Aquarion - $1 [$2 720p BD]/; 23 $newname =~ s/^Genesis of Aquarion - (\d+) \[3xR\]\[Blu-ray.720p.H264.FLAC.AC3\](v2|)/[3xR] Genesis of Aquarion - $1 [$2 720p BD]/;
19 $newname =~ s/^Otogi Zoshi Act\.(\d+)\[x264 AAC\]\[SSP-Corp\]/[SSP-Corp] Otogi Zoshi - $1 /; 24 $newname =~ s/^Otogi Zoshi Act\.(\d+)\[x264 AAC\]\[SSP-Corp\]/[SSP-Corp] Otogi Zoshi - $1 /;
20 $newname =~ s/Onii-chan no Koto Nanka Zenzen Suki Janain Dakara ne!! - (\d+) \[Uncut\]/Onii-chan no Koto Nanka Zenzen Suki Janain Dakara ne!! - $1 /; 25 $newname =~ s/Onii-chan no Koto Nanka Zenzen Suki Janain Dakara ne!! - (\d+) \[Uncut\]/Onii-chan no Koto Nanka Zenzen Suki Janain Dakara ne!! - $1 /;
21 $newname =~ s/^cor\.extras\.infinite\.ryvius\.textless\.opening(\d+)\./[cor] Infinite Ryvius - Opening $1 (Clean) /; 26 $newname =~ s/^cor\.extras\.infinite\.ryvius\.textless\.opening(\d+)\./[cor] Infinite Ryvius - Opening $1 (Clean) /;
22 $newname =~ s/^cor\.extras\.infinite\.ryvius\.textless\.ending(\d+)\./[cor] Infinite Ryvius - Ending $1 (Clean) /; 27 $newname =~ s/^cor\.extras\.infinite\.ryvius\.textless\.ending(\d+)\./[cor] Infinite Ryvius - Ending $1 (Clean) /;
29 $newname =~ s/^Arigatou\.Tokyo\.Majin\.Ep(\d+)\./[Arigatou] Tokyo Majin - $1 /; 34 $newname =~ s/^Arigatou\.Tokyo\.Majin\.Ep(\d+)\./[Arigatou] Tokyo Majin - $1 /;
30 $newname =~ s/ (Inazuma Eleven - )(\d{2}) / $1 0$2 /; 35 $newname =~ s/ (Inazuma Eleven - )(\d{2}) / $1 0$2 /;
31 $newname =~ s/\] *Pocket Monsters - (\d+) - .*\[(H264 |)SUB\]/] Pokemon - $1 /i; 36 $newname =~ s/\] *Pocket Monsters - (\d+) - .*\[(H264 |)SUB\]/] Pokemon - $1 /i;
32 $newname =~ s/\] Fafner - /] Soukyuu no Fafner - /; 37 $newname =~ s/\] Fafner - /] Soukyuu no Fafner - /;
33 $newname =~ s/\] Mashiro iro symphony - /] Mashiro-iro Symphony - /i; 38 $newname =~ s/\] Mashiro iro symphony - /] Mashiro-iro Symphony - /i;
39 $newname =~ s/\] Shakugan no Shana III /] Shakugan no Shana Final /i;
34 $newname =~ s/\] Boku Ha Tomodachi Ga Sukunai - /] Boku wa Tomodachi ga Sukunai - /i; 40 $newname =~ s/\] Boku Ha Tomodachi Ga Sukunai - /] Boku wa Tomodachi ga Sukunai - /i;
35 $newname =~ s/\] Seikon no Qwaser II BD - (\d+) \[720p\]/] Seikon no Qwaser II - $1 [720p BD]/i; 41 $newname =~ s/\] Seikon no Qwaser II BD - (\d+) \[720p\]/] Seikon no Qwaser II - $1 [720p BD]/i;
36 $newname =~ s/\] Seikon no Qwaser Picture Drama - (\d+) /] Seikon no Qwaser - Picture Drama $1 /i; 42 $newname =~ s/\] Seikon no Qwaser Picture Drama - (\d+) /] Seikon no Qwaser - Picture Drama $1 /i;
37 $newname =~ s/\] Fortune Arterial Akai Yakusoku - /] Fortune Arterial - /; 43 $newname =~ s/\] Fortune Arterial Akai Yakusoku - /] Fortune Arterial - /;
38 $newname =~ s/\] Ookami to Koushinryou - /] Spice and Wolf - /; 44 $newname =~ s/\] Ookami to Koushinryou - /] Spice and Wolf - /;
39 $newname =~ s/\] Mobile Suit Gundam AGE - /] Gundam AGE - /i; 45 $newname =~ s/\] Mobile Suit Gundam AGE - /] Gundam AGE - /i;
40 $newname =~ s/\] Soredemo Machi wa Mawatte Iru - /] Soredemo Machi wa Mawatteiru - /; 46 $newname =~ s/\] Soredemo Machi wa Mawatte Iru - /] Soredemo Machi wa Mawatteiru - /;
41 $newname =~ s/\] Spiral - (\d+) .* \[640 x 480\]\[H\.264\]/] Spiral - $1 /; 47 $newname =~ s/\] Spiral - (\d+) .* \[640 x 480\]\[H\.264\]/] Spiral - $1 /;
42 $newname =~ s/\] Mayo Chiki - / ] Mayo Chiki! - /i; 48 $newname =~ s/\] Mayo Chiki - / ] Mayo Chiki! - /i;
43 $newname =~ s/\] Naruto Shippuden - /] Naruto Shippuuden - /i; 49 $newname =~ s/\] Naruto Shippuden - /] Naruto Shippuuden - /i;
50 $newname =~ s/\] Maji de Watashi ni Koi Shinasai!! /] Maji de Watashi ni Koi Shinasai! /i;
51 $newname =~ s/\] Sei Juushi Bismarck /] Sei Juushi Bismark /i;
44 $newname =~ s/\] Tamayura - hitotose - /] Tamayura ~hitotose~ - /i; 52 $newname =~ s/\] Tamayura - hitotose - /] Tamayura ~hitotose~ - /i;
45 $newname =~ s/^Arigatou\.Tsubasa\.Chronicles\.(|2\.)(\d{2})(|v2)\./[Arigatou] Tsubasa Chronicles $1 - $2$3/; 53 $newname =~ s/^Arigatou\.Tsubasa\.Chronicles\.(|2\.)(\d{2})(|v2)\./[Arigatou] Tsubasa Chronicles $1 - $2$3/;
46 $newname =~ s/^Niea\.Under\.Seven\.(\d+)\.\(Dual\.Audio\)\.XVID\.\[AM\]/[AM] Niea Under Seven - $1/; 54 $newname =~ s/^Niea\.Under\.Seven\.(\d+)\.\(Dual\.Audio\)\.XVID\.\[AM\]/[AM] Niea Under Seven - $1/;
47 $newname =~ s/ Tsubasa Chronicles 2\. - / Tsubasa Chronicles 2 /; 55 $newname =~ s/ Tsubasa Chronicles 2\. - / Tsubasa Chronicles 2 /;
48 $newname =~ s/ *Moritasan wa Mukuchi */ Morita-san wa Mukuchi /i; 56 $newname =~ s/ *Moritasan wa Mukuchi */ Morita-san wa Mukuchi /i;
55 $newname =~ s/\[TSuNDeRe\]Tsuyokiss\.(\d+)\./[Tsundere] Tsuyokiss - $1 /i; 63 $newname =~ s/\[TSuNDeRe\]Tsuyokiss\.(\d+)\./[Tsundere] Tsuyokiss - $1 /i;
56 $newname =~ s/\[RANDOMFAGGOTS\]/[Randomfaggots]/i; 64 $newname =~ s/\[RANDOMFAGGOTS\]/[Randomfaggots]/i;
57 $newname =~ s/\[Keroro\]\.(\d+)\.\[Xvid\.mp3\]\./[Keroro] Keroro Gunsou - $1 /i; 65 $newname =~ s/\[Keroro\]\.(\d+)\.\[Xvid\.mp3\]\./[Keroro] Keroro Gunsou - $1 /i;
58 $newname =~ s/\[Keroro\] \.(\d+)\. \[\.mp3\] \. /[Keroro] Keroro Gunsou - $1 /i; 66 $newname =~ s/\[Keroro\] \.(\d+)\. \[\.mp3\] \. /[Keroro] Keroro Gunsou - $1 /i;
59 $newname =~ s/\[WPP & T-N\]/[WPP T-N]/; 67 $newname =~ s/\[WPP & T-N\]/[WPP T-N]/;
68 $newname =~ s/(\[Jumonji-Giri\]) *\[[A-Z0-9- ]+\]/$1/i;
60 $newname =~ s/ Yuru Yuri / YuruYuri /i; 69 $newname =~ s/ Yuru Yuri / YuruYuri /i;
61 $newname =~ s/ Clannad - After Story / Clannad After Story /i; 70 $newname =~ s/ Clannad - After Story / Clannad After Story /i;
62 $newname =~ s/ Manyuu Hikenchou - (\d+) ~DC~ / Manyuu Hikenchou - $1 [Uncut]/; 71 $newname =~ s/ Manyuu Hikenchou - (\d+) ~DC~ / Manyuu Hikenchou - $1 [Uncut]/;
63 $newname =~ s/\[Elysium\]K-ON!!\.EP(\d+)\(BD\.1080p\.FLAC\)/[Elysium] K-ON!! - $1 [1080p BD]/i; 72 $newname =~ s/\[Elysium\]K-ON!!\.EP(\d+)\(BD\.1080p\.FLAC\)/[Elysium] K-ON!! - $1 [1080p BD]/i;
64 $newname =~ s/\[Elysium\]K-ON!!\.(ED|OP)(\d+)\(BD\.1080p\.FLAC\)/[Elysium] K-ON!! - $1 $2 [1080p BD]/i; 73 $newname =~ s/\[Elysium\]K-ON!!\.(ED|OP)(\d+)\(BD\.1080p\.FLAC\)/[Elysium] K-ON!! - $1 $2 [1080p BD]/i;
210 $newname =~ s/ To LOVE-Ru / To Love-Ru /i; 219 $newname =~ s/ To LOVE-Ru / To Love-Ru /i;
211 $newname =~ s/ Inuyasha Kanketsuhen / Inuyasha Kanketsu-hen /; 220 $newname =~ s/ Inuyasha Kanketsuhen / Inuyasha Kanketsu-hen /;
212 $newname =~ s/ AIR / Air /; 221 $newname =~ s/ AIR / Air /;
213 $newname =~ s/ Sister Princess Re Pure / Sister Princess Repure /; 222 $newname =~ s/ Sister Princess Re Pure / Sister Princess Repure /;
214 $newname =~ s/C:\\Users\\Gad\\Desktop\\yankee-megane\\Release\\//; 223 $newname =~ s/C:\\Users\\Gad\\Desktop\\yankee-megane\\Release\\//;
224 $newname =~ s/ Ep(\d+)/ $1/i;
215 $newname =~ s/\(END\)/[End]/i; 225 $newname =~ s/\(END\)/[End]/i;
216 $newname =~ s/\(BD 1280x720 h264 JP.EN AAC\)/[720p BD]/i; 226 $newname =~ s/\(BD 1280x720 h264 JP.EN AAC\)/[720p BD]/i;
217 $newname =~ s/\[Final\]//i; 227 $newname =~ s/\[Final\]//i;
218 $newname =~ s/DB&L-E/DB L-E/; 228 $newname =~ s/DB&L-E/DB L-E/;
219 $newname =~ s/IY-F&Oki/IY-F Oki/; 229 $newname =~ s/IY-F&Oki/IY-F Oki/;
242 $newname =~ s/ A Certain Magical Index II / Toaru Majutsu no Index II /i; 252 $newname =~ s/ A Certain Magical Index II / Toaru Majutsu no Index II /i;
243 $newname =~ s/ TV Broadcast \[720p/ [LQ 720p/; 253 $newname =~ s/ TV Broadcast \[720p/ [LQ 720p/;
244 $newname =~ s/ ED(\d+[a-z]*)/ - Ending $1 /i; 254 $newname =~ s/ ED(\d+[a-z]*)/ - Ending $1 /i;
245 $newname =~ s/ OP(\d+[a-z]*)/ - Opening $1 /i; 255 $newname =~ s/ OP(\d+[a-z]*)/ - Opening $1 /i;
246 $newname =~ s/ ED / - Ending /; 256 $newname =~ s/ ED / - Ending /;
257 $newname =~ s/ Clean (Opening|Ending) v2/ - $1 (Clean) [v2]/i;
247 $newname =~ s/ Creditless Opening (\d+) / - Opening $1 (Clean) /i; 258 $newname =~ s/ Creditless Opening (\d+) / - Opening $1 (Clean) /i;
248 $newname =~ s/ Ep(\d+) Creditless Ending / - Ending $1 (Clean) /i; 259 $newname =~ s/ Ep(\d+) Creditless Ending / - Ending $1 (Clean) /i;
249 $newname =~ s/ (NCED|Ending Clean) / - Ending (Clean) /i; 260 $newname =~ s/ (NCED|Ending Clean) / - Ending (Clean) /i;
250 $newname =~ s/ NCED(\d+) / - Ending $1 (Clean) /i; 261 $newname =~ s/ NCED(\d+) / - Ending $1 (Clean) /i;
251 $newname =~ s/ (NCOP|Opening Clean) / - Opening (Clean)/i; 262 $newname =~ s/ (NCOP|Opening Clean) / - Opening (Clean)/i;
252 $newname =~ s/ OP / - Opening /; 263 $newname =~ s/ OP / - Opening /;
253 $newname =~ s/ (\d+-\d+) / - $1 /; 264 $newname =~ s/ (\d+-\d+) / - $1 /;
254 $newname =~ s/ - - / - /g; 265 $newname =~ s/ - - / - /g;
255 $newname =~ s/ Ep / /ig; 266 $newname =~ s/ Ep / /ig;
256 ##SLICED BREAD 267 ##SLICED BREAD
257 $newname =~ s/(\(|\[) *(h264\.aac|hi10p|10bit|\d+th Release|x264\.aac|xvid|divx5\.2\.1|divx5\.1|divx5\.05|divx5\.1\.1|h\.?264 AC3|848x480|H264 848x480|h264-480p AAC|h\.264-480p) *(\)|\])//i; 268 $newname =~ s/(\(|\[) *(10bit-v2) *(\)|\])/[v2]/i;
258 $newname =~ s/\[(DVD 10bit)\]/[DVD 10bit]/i; 269 $newname =~ s/(\(|\[) *(10-?bit|10bit 480p H264|640x360|640x360 H264 AAC|h264\.aac|hi10p|10bit|\d+th Release|x264\.aac|xvid|divx5\.2\.1|divx5\.1|divx5\.05|divx5\.1\.1|h\.?264 AC3|848x480|H264 848x480|h264-480p AAC|h\.264-480p) *(\)|\])//i;
259 $newname =~ s/(\(|\[) *(DVD 704x480 H264 AC3|DVD 704x480|DVDRip\.Xvid\.864x480\.Vorbis|DVD H264 848x480|DVD 720x480|DVD H264 720x480|DVD, wmv, mp3) *(\)|\])/[DVD]/i; 270 $newname =~ s/\[(DVD 10bit)\]/[DVD]/i;
260 $newname =~ s/(\(|\[) *(BD 1080p Hi10P|BDRip 1080p x264 FLAC|BD-1080p-|BD-1080p-FLAC|1920x1038 Blu-Ray FLAC|1920x1080 Blu-Ray FLAC|1920x1080 h264 BD FLAC|1920x1080 BD|BD\.1080p\.FLAC|BD 1080p H\.264 AAC 5\.1|BD 1080p) *(\)|\])/[1080p BD]/i; 271 $newname =~ s/(\(|\[) *(DVD H264 720x480 AAC|DVD 704x480 H264 AC3|DVD 704x480|DVDRip\.Xvid\.864x480\.Vorbis|DVD H264 848x480|DVD 720x480|DVD H264 720x480|DVD, wmv, mp3) *(\)|\])/[DVD]/i;
261 $newname =~ s/(\(|\[) *(1280x720 Hi10P|1280x720 5\.1|1280x720 x264 AAC|1280x720 H264 AAC|720p H264 AAC|1280x720|1280x720 H\.?264 AAC) *(\)|\])/[720p]/i; 272 $newname =~ s/(\(|\[) *(BD\]\[1080p-FLAC|1920x1080 Hi10p h264 AAC|BD 1920x1080 x264 AAC|BD 1080p Hi10P|BDRip 1080p x264 FLAC|BD-1080p-|BD-1080p-FLAC|1920x1038 Blu-Ray FLAC|1920x1080 Blu-Ray FLAC|1920x1080 h264 BD FLAC|1920x1080 BD|BD\.1080p\.FLAC|BD 1080p H\.264 AAC 5\.1|BD 1080p) *(\)|\])/[1080p BD]/i;
273 $newname =~ s/(\(|\[) *(Hi10P 1280x720 H264|Hi10P 1280x720|1280x720 Hi10P|1280x720 5\.1|1280x720 x264 AAC|1280x720 H264 AAC|720p H264 AAC|1280x720|1280x720 H\.?264 AAC) *(\)|\])/[720p]/i;
262 $newname =~ s/(\(|\[) *(BD, 720p,|BD 720p H264-AAC|BDRip 720p|BD, 720p, ,|1280x720 BD|BD 1280x720 H264 AAC|BD 720p|BD 720p FLAC|BD 1280x720 H264 AAC) *(\)|\])/[720p BD]/i; 274 $newname =~ s/(\(|\[) *(BD, 720p,|BD 720p H264-AAC|BDRip 720p|BD, 720p, ,|1280x720 BD|BD 1280x720 H264 AAC|BD 720p|BD 720p FLAC|BD 1280x720 H264 AAC) *(\)|\])/[720p BD]/i;
263 $newname =~ s/(\(|\[) *(1024x576|H264 1024x576) *(\)|\])/[576p]/i; 275 $newname =~ s/(\(|\[) *(1024x576|H264 1024x576) *(\)|\])/[576p]/i;
264 $newname =~ s/(\(|\[) *(1920x1080) *(\)|\])/[1080p]/i; 276 $newname =~ s/(\(|\[) *(1920x1080) *(\)|\])/[1080p]/i;
265 ##SLICED BREAD pt.2 277 ##SLICED BREAD pt.2
266 $newname =~ s/(\d+)v(\d+)/$1 [v$2]/i; 278 $newname =~ s/(\d+)v(\d+)/$1 [v$2]/i;
435 $newname =~ s/ +/ /g; 447 $newname =~ s/ +/ /g;
436 $newname =~ s/^ +//; 448 $newname =~ s/^ +//;
437 $newname =~ s/(- )+/- /; 449 $newname =~ s/(- )+/- /;
438 $newname =~ s/^\[N - F\]/[N-F]/; 450 $newname =~ s/^\[N - F\]/[N-F]/;
439 $newname =~ s/^\[K-F & AKUPX\]/[K-F AKUPX]/; 451 $newname =~ s/^\[K-F & AKUPX\]/[K-F AKUPX]/;
440 $newname =~ s/^\[([\.\s\w\- ]+)\] (Yawara|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]/; 452 $newname =~ s/^\[([\.\s\w\- ]+)\] (Fairy Tail|Yawara|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]/;
441 $newname =~ s/^Naruto - (\d{2}) /Naruto - 0$1 /; 453 $newname =~ s/^Naruto - (\d{2}) /Naruto - 0$1 /;
454 $newname =~ s/^Fairy Tail - (\d{2}) /Fairy Tail - 0$1 /;
442 $newname =~ s/^Naruto - (\d{2})-(\d{2}) /Naruto - 0$1-0$2 /; 455 $newname =~ s/^Naruto - (\d{2})-(\d{2}) /Naruto - 0$1-0$2 /;
443 print(qq($_: $newname already exists, skipping\n)) and next() if -e $newname and $_ ne $newname; 456 print(qq($_: $newname already exists, skipping\n)) and next() if -e $newname and $_ ne $newname;
444 if ($_ eq $newname) { 457 if ($_ eq $newname) {
445 print("$_: no need to rename, skipping\n"); 458 print("$_: no need to rename, skipping\n");
446 } else { 459 } else {