diff bin/ren @ 143:719b0687d974

Merge.
author Edho Arief <edho@myconan.net>
date Thu, 03 Nov 2011 10:00:40 +0700
parents f963d52c031a
children fbb03c862b63
line wrap: on
line diff
--- a/bin/ren	Thu Oct 27 16:31:43 2011 +0700
+++ b/bin/ren	Thu Nov 03 10:00:40 2011 +0700
@@ -13,9 +13,10 @@
   $newname =~ s/_/ /g;
   # GROUP NAMES
   $newname =~ s/\[UTW Mazui\]/[UTW-Mazui]/i;
+  $newname =~ s/\[t-n\]/[T-N]/i;
   #TITLE AND NAMES
   $newname =~ s/^(\(|\[)W B(\)|\])/[W_B]/;
-  if ($newname =~ m/\[Doremi/) {
+  if ($newname =~ m/\[(Doremi|Elysium)/) {
     $newname =~ s/\.([a-z0-9]+)$/,$1/i;
     $newname =~ s/\./ /g;
     $newname =~ s/,([a-z0-9]+)$/.$1/i;
@@ -23,6 +24,9 @@
   $newname =~ s/^Genesis of Aquarion - (\d+) \[3xR\]\[Blu-ray.720p.H264.FLAC.AC3\](v2|)/[3xR] Genesis of Aquarion - $1 [$2 720p BD]/;
   $newname =~ s/^Otogi Zoshi Act\.(\d+)\[x264 AAC\]\[SSP-Corp\]/[SSP-Corp] Otogi Zoshi - $1 /;
   $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 /;
+  $newname =~ s/^(Ayashi no Ceres|Chikyuu Shoujo Arjuna|Futari wa Precure  Splash Star) - (\d+)\[\d+\] - .*(\[DVD\])(\[[^]]+\])(\[[a-f0-9]{8}\]\.[^.]+)$/$4 $1 - $2 $3$5/i;
+  $newname =~ s/^(Futari wa Precure  Splash Star) - (C\d+)\[\d+\] - .*(\[DVD\])(\[[^]]+\])(\[[a-f0-9]{8}\]\.[^.]+)$/$4 $1 - $2 $3$5/i;
+  $newname =~ s/^(Air Master|Black Jack Special|Cinderella Boy|Damekko Doubutsu|Crystal Blaze) - (\d+)\[\d+\] - .*(\[[^]]+\])(\[[a-f0-9]{8}\]\.[^.]+)$/$3 $1 - $2 $4/i;
   $newname =~ s/^cor\.extras\.infinite\.ryvius\.textless\.opening(\d+)\./[cor] Infinite Ryvius - Opening $1 (Clean) /;
   $newname =~ s/^cor\.extras\.infinite\.ryvius\.textless\.ending(\d+)\./[cor] Infinite Ryvius - Ending $1 (Clean) /;
   $newname =~ s/^cor\.extras\.infinite\.ryvius\.art\.gallery\.and\.audio\.drama(\d+)\./[cor] Infinite Ryvius - Picture Drama $1 /;
@@ -36,12 +40,16 @@
   $newname =~ s/\] *Pocket Monsters - (\d+) - .*\[(H264 |)SUB\]/] Pokemon - $1 /i;
   $newname =~ s/\] Fafner - /] Soukyuu no Fafner - /;
   $newname =~ s/\] Mashiro iro symphony - /] Mashiro-iro Symphony - /i;
+  $newname =~ s/\] To Aru Kagaku no Railgun /] Toaru Kagaku no Railgun /i;
+  $newname =~ s/\] To Aru Majutsu no Index /] Toaru Majutsu no Index /i;
   $newname =~ s/\] Shakugan no Shana III /] Shakugan no Shana Final /i;
   $newname =~ s/\] Boku Ha Tomodachi Ga Sukunai - /] Boku wa Tomodachi ga Sukunai - /i;
   $newname =~ s/\] Seikon no Qwaser II BD - (\d+) \[720p\]/] Seikon no Qwaser II - $1 [720p BD]/i;
   $newname =~ s/\] Seikon no Qwaser Picture Drama - (\d+) /] Seikon no Qwaser - Picture Drama $1 /i;
   $newname =~ s/\] Fortune Arterial Akai Yakusoku - /] Fortune Arterial - /;
+  $newname =~ s/\[HorribleSubs\] Hunter X Hunter - /[HorribleSubs] Hunter x Hunter (2011) - /i;
   $newname =~ s/\] Ookami to Koushinryou - /] Spice and Wolf - /;
+  $newname =~ s/\] Kamen Rider Blade /] Kamen Rider Blade /i;
   $newname =~ s/\] Mobile Suit Gundam AGE - /] Gundam AGE - /i;
   $newname =~ s/\] Soredemo Machi wa Mawatte Iru - /] Soredemo Machi wa Mawatteiru - /;
   $newname =~ s/\] Spiral - (\d+) .* \[640 x 480\]\[H\.264\]/] Spiral - $1 /;
@@ -50,6 +58,7 @@
   $newname =~ s/\] Maji de Watashi ni Koi Shinasai!! /] Maji de Watashi ni Koi Shinasai! /i;
   $newname =~ s/\] Sei Juushi Bismarck /] Sei Juushi Bismark /i;
   $newname =~ s/\] Tamayura - hitotose - /] Tamayura ~hitotose~ - /i;
+  $newname =~ s/\] Yumekui Merry /] Dream Eater Merry /i;
   $newname =~ s/^Arigatou\.Tsubasa\.Chronicles\.(|2\.)(\d{2})(|v2)\./[Arigatou] Tsubasa Chronicles $1 - $2$3/;
   $newname =~ s/^Niea\.Under\.Seven\.(\d+)\.\(Dual\.Audio\)\.XVID\.\[AM\]/[AM] Niea Under Seven - $1/;
   $newname =~ s/ Tsubasa Chronicles 2\. - / Tsubasa Chronicles 2 /;
@@ -65,7 +74,7 @@
   $newname =~ s/\[Keroro\]\.(\d+)\.\[Xvid\.mp3\]\./[Keroro] Keroro Gunsou - $1 /i;
   $newname =~ s/\[Keroro\] \.(\d+)\. \[\.mp3\] \. /[Keroro] Keroro Gunsou - $1 /i;
   $newname =~ s/\[WPP & T-N\]/[WPP T-N]/;
-  $newname =~ s/(\[Jumonji-Giri\]) *\[[A-Z0-9- ]+\]/$1/i;
+  $newname =~ s/(\[Jumonji-Giri\]) *\[[^]]+\]/$1/i;
   $newname =~ s/ Yuru Yuri / YuruYuri /i;
   $newname =~ s/ Clannad - After Story / Clannad After Story /i;
   $newname =~ s/ Manyuu Hikenchou - (\d+) ~DC~ / Manyuu Hikenchou - $1 [Uncut]/;
@@ -199,7 +208,7 @@
   $newname =~ s/Naruto (\d+-\d+) /Naruto - $1 /;
   $newname =~ s/Lupin III Series 1 - (\d+) - .+ \[neo1024\]/[neo1024] Lupin III - $1 /;
   $newname =~ s/Mitsudomoe Picture Drama - 0/Mitsudomoe Picture Drama - /;
-  $newname =~ s/^(Star Driver .*)(\[AtsA\])/$2 $1 /i;
+  $newname =~ s/^(Fullmetal Alchemist Brotherhood .*|Star Driver .*)(\[AtsA\])/$2 $1 /i;
   $newname =~ s/(Sora no Woto|Ichiban Ushiro no Daimaou|Mayoi Neko Overrun!) - ([^ ]+|OP Clean|ED Clean|Theater [a-z0-9]+) \[BD 1080p\]\[AtsA\]/[AtsA] $1 - $2 [1080p BD]/;
   $newname =~ s/(Sora no Woto|Ichiban Ushiro no Daimaou|Mayoi Neko Overrun!) ([^ ]+|Opening Clean|Ending Clean|Theater - [a-z0-9]+) \[1080p BD\]\[AtsA\]/[AtsA] $1 - $2 [1080p BD]/;
   $newname =~ s/Battle\.Programmer\.Shirase\./Battle Programmer Shirase /;
@@ -255,7 +264,7 @@
   $newname =~ s/ OP(\d+[a-z]*)/ - Opening $1 /i;
   $newname =~ s/ ED / - Ending /;
   $newname =~ s/ Clean (Opening|Ending) v2/ - $1 (Clean) [v2]/i;
-  $newname =~ s/ Creditless Opening (\d+) / - Opening $1 (Clean) /i;
+  $newname =~ s/ Creditless (Opening|Ending) (\d+) / - $1 $2 (Clean) /i;
   $newname =~ s/ Ep(\d+) Creditless Ending / - Ending $1 (Clean) /i;
   $newname =~ s/ (NCED|Ending Clean) / - Ending (Clean) /i;
   $newname =~ s/ NCED(\d+) / - Ending $1 (Clean) /i;
@@ -266,12 +275,13 @@
   $newname =~ s/ Ep / /ig;
   ##SLICED BREAD
   $newname =~ s/(\(|\[) *(10bit-v2) *(\)|\])/[v2]/i;
-  $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;
+  $newname =~ s/(\(|\[) *(720x480|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;
   $newname =~ s/\[(DVD 10bit)\]/[DVD]/i;
   $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;
   $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;
   $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;
-  $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;
+  $newname =~ s/(\(|\[) *(BDrip 720p Vorbis|BD 720p Hi10P AAC|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;
+  $newname =~ s/(\(|\[) *(BD 540p) *(\)|\])/[BD]/i;
   $newname =~ s/(\(|\[) *(1024x576|H264 1024x576) *(\)|\])/[576p]/i;
   $newname =~ s/(\(|\[) *(1920x1080) *(\)|\])/[1080p]/i;
   ##SLICED BREAD pt.2
@@ -422,6 +432,8 @@
   $newname =~ s/ SP0/ - Special /;
   $newname =~ s/ SP(\d+) / - Special $1 /;
   $newname =~ s/ Special - / - Special /;
+  $newname =~ s/ Animated Commentary - / - Animated Commentary /;
+  $newname =~ s/ Fullmetal Alchemist Brotherhood (- |)Skit - / Fullmetal Alchemist Brotherhood - Skit /i;
   $newname =~ s/ - Picture Drama - / - Picture Drama /;
   $newname =~ s/ (Mayoi Neko Overrun! - Theater) - / $1 /;
   $newname =~ s/ Opening - / Opening /;
@@ -429,6 +441,7 @@
   $newname =~ s/ Hidamari Sketch Hoshimittsu - Special / Hidamari Sketch Hoshimittsu Special - /;
   $newname =~ s/ Spice and Wolf S2 - BD Menu - 0/ Spice and Wolf S2 - BD Menu /;
   $newname =~ s/ Canvas - 2 - / Canvas 2 - /;
+  $newname =~ s/ To Heart - 2 / To Heart 2 /;
   $newname =~ s/ Tsubasa Chronicles - 2 (\d{2}) / Tsubasa Chronicles 2 - $1 /;
   $newname =~ s/ Mitsudomoe - 2 - / Mitsudomoe 2 - /;
   $newname =~ s/ Morita-san wa Mukuchi - 2 / Morita-san wa Mukuchi 2 /i;
@@ -449,10 +462,11 @@
   $newname =~ s/(- )+/- /;
   $newname =~ s/^\[N - F\]/[N-F]/;
   $newname =~ s/^\[K-F & AKUPX\]/[K-F AKUPX]/;
-  $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]/;
+  $newname =~ s/^\[([&!\.\s\w\- ]+)\] (Air Master|Crystal Blaze|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]/;
   $newname =~ s/^Naruto - (\d{2}) /Naruto - 0$1 /;
   $newname =~ s/^Fairy Tail - (\d{2}) /Fairy Tail - 0$1 /;
   $newname =~ s/^Naruto - (\d{2})-(\d{2}) /Naruto - 0$1-0$2 /;
+  if ($^O eq "MSWin32") { $newname =~ s/ *\\ */\\/g; }
   print(qq($_: $newname already exists, skipping\n)) and next() if -e $newname and $_ ne $newname;
   if ($_ eq $newname) {
     print("$_: no need to rename, skipping\n");