diff bin/ren @ 138:f963d52c031a

Merge.
author Edho Arief <edho@myconan.net>
date Wed, 02 Nov 2011 22:12:16 +0700
parents 983beb13c736 cf328bd06078
children fbb03c862b63
line wrap: on
line diff
--- a/bin/ren	Wed Nov 02 22:10:49 2011 +0700
+++ b/bin/ren	Wed Nov 02 22:12:16 2011 +0700
@@ -13,6 +13,7 @@
   $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|Elysium)/) {
@@ -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 /;
@@ -43,7 +47,9 @@
   $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 /;
@@ -68,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]/;
@@ -269,7 +275,7 @@
   $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;
@@ -435,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;
@@ -455,9 +462,11 @@
   $newname =~ s/(- )+/- /;
   $newname =~ s/^\[N - F\]/[N-F]/;
   $newname =~ s/^\[K-F & AKUPX\]/[K-F AKUPX]/;
-  $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]/;
+  $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");