changeset 86:4a22703b183c

Merge.
author Edho Prima Arief <me@myconan.net>
date Sat, 09 Jul 2011 15:39:00 +0700
parents b65925c07cf6 (current diff) 14435bd3f01c (diff)
children c884853b25d1 1057412834a5
files bin/ren
diffstat 1 files changed, 83 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/bin/ren	Sat Jul 09 15:34:55 2011 +0700
+++ b/bin/ren	Sat Jul 09 15:39:00 2011 +0700
@@ -12,7 +12,49 @@
   #START HERE
   $newname =~ s/_/ /g;
   #TITLE AND NAMES
+  $newname =~ s/\[WPP & T-N\]/[WPP T-N]/;
+  $newname =~ s/\[Elysium\]K-ON!!\.EP(\d+)\(BD\.1080p\.FLAC\)/[Elysium] K-ON!! - $1 [1080p BD]/i;
+  $newname =~ s/\[Elysium\]K-ON!!\.(ED|OP)(\d+)\(BD\.1080p\.FLAC\)/[Elysium] K-ON!! - $1 $2 [1080p BD]/i;
+  $newname =~ s/\[Elysium\]K-ON!!\.SP\d+\[EP(\d+)\]\(BD\.1080p\.FLAC\)/[Elysium] K-ON!! - $1 [1080p BD]/i;
+  $newname =~ s/^\[wpp\]digimon frontier /[wpp] Digimon Frontier /i;
+  $newname =~ s/^\[ACX\]Fantastic Children - (\d+) .*/[ACX] Fantastic Children - $1.mkv/i;
+  $newname =~ s/\[a-s\] sakigake!! cromartie high school - (\d+) - .* /[a-S] Sakigake!! Cromartie High School - $1 /;
+  $newname =~ s/zx\.tenchi-universe\./[zx] Tenchi Universe - /;
+  $newname =~ s/\[Saizen & Shinsen-Subs\]/[Saizen-SHS]/i;
+  $newname =~ s/ ro-kyu-bu! / Ro-Kyu-Bu! /i;
+  $newname =~ s/ Ore no Imouto ga Konna ni Kawaii Wake ga Nai / Ore no Imouto /i;
+  $newname =~ s/ no 6 / No. 6 /i;
+  $newname =~ s/ THE iDOLM\@STER / The iDOLM\@STER /i;
+  $newname =~ s/^- (\d+) - (\[neo1024\])/$2 Luping III S3 - $2/i;
+  $newname =~ s/ Luping III S3 / Lupin III S3 /i;
+  $newname =~ s/( Transformers Headmasters - \d+) - .*\[/$1 [/i;
+  $newname =~ s/^cor\.tv\.getbackers\.(\d+)\./[cor] GetBackers - $1 /;
+  $newname =~ s/^cor\.extras\.getbackers\.(opening|ending)(\d+)\./[cor] GetBackers - $1 $2 /;
+  $newname =~ s/^Revolutionary Girl Utena /[Henshin] Revolutionary Girl Utena /;
+  $newname =~ s/His and Her Circumstances/His and Her Circumstances/i;
+  $newname =~ s/Magical Girl Madoka Magica/Puella Magi Madoka Magica/i;
+  $newname =~ s/ Pretty Rhythm Aurora Dream / Pretty Rhythm - Aurora Dream /i;
+  $newname =~ s/(\[dvdrip\] Transformers \(1984\) -) E(\d+) .*(\.avi)/$1 $2 $3/;
+  $newname =~ s/ Highschool of the Dead / High School of the Dead /i;
+  $newname =~ s/LOGH Gaiden 2 E(\d+) .*(\.avi|\.mkv)/Legend of Galactic Heroes Gaiden 2 - $1$2/i;
+  $newname =~ s/^\[RaX\] *Kiba - (\d+) - .* (\[v2\] \[|\[)/[RaX] Kiba - $1 $2/;
+  $newname =~ s/ (Gosick - \d+) \(Batch\) / $1 /;
+  $newname =~ s/ Clannad - After Story - / Clannad After Story - /;
+  $newname =~ s/^Mahoujin Guruguru TV2 - Doki Doki Densetsu Ep(\d+) \((Chamelenia)\)/[Chamelenia] Mahoujin Guruguru 2 - Doki Doki Densetsu - $1/i;
+  $newname =~ s/\.divx5\.ogm$/.ogm/;
+  #$newname =~ s/\[(neo1024)\] Lupin III - (\d+) - .+ \[/[$1] Lupin III S2 - $2 [/;
+  $newname =~ s/ Lupin S2 - / Lupin III S2 - /;
+  $newname =~ s/ Prince of Tennis (\d+)/ Prince of Tennis - $1/i;
+  $newname =~ s/ Boogiepop - / Boogiepop Phantom - /i;
+  $newname =~ s/ Aika Zero OVA / Aika Zero /i;
+  $newname =~ s/^\[A-BT&Pakapuka\]PopoloCrois 2003 Ep/[A-BT Pakapuka] PopoloCrois (2003) - /;
+  $newname =~ s/^\[A-BT&Pakapuka\] PopoloCrois Story 1998 /[A-BT Pakapuka] PopoloCrois (1998) - /;
+  $newname =~ s/ (Pollyanna|Happy Kappi) Episode (\d+) / $1 - $2 /;
+  $newname =~ s/\(G P\) Now and Then Here and There \(R2J\)/[G P] Now and Then Here and There - /;
   $newname =~ s/^\[Jumonji-Giri\]\[Soldats\]\[AonE&HQA\] D\.C\. Da Capo /[Jumonji-Giri] Da Capo /i;
+  $newname =~ s/\[A-Flux&Lunar\]/[A-Flux Lunar]/i;
+  $newname =~ s/^(Mushishi) - (\d+) - .* - (\[niizk\])/$3 $1 - $1/;
+  $newname =~ s/^(Saikano) (\d+)\[h\.264-AAC\](\[SSP-Corp\])/$3 $1 - $2 /;
   $newname =~ s/^PitaTen.* Ep (\d+) .*\.avi/[Hnk] Pita Ten - $1.avi/;
   $newname =~ s/^\[a-S\] Inuyasha - (\d+|\d+-\d+) /Inuyasha - $1 [a-S]/;
   $newname =~ s/\[DVD\]\[AHQ\]/[AHQ][DVD]/;
@@ -21,6 +63,8 @@
   $newname =~ s/ A-Channel / A Channel /i;
   $newname =~ s/^mars daybreak /[V-A] Mars Daybreak - /;
   $newname =~ s/ Shuffle! Episode / Shuffle! /;
+  $newname =~ s/ A-Channel / A Channel /;
+  $newname =~ s/ Moshidora \(Moshi Koko Yakyu no Joshi Manager ga Drucker no Management o Yondara\) / Moshidora /;
   $newname =~ s/^\[ZA\]\.Saint\.Seiya\.Episode\.(\d+)\.DVDrip\.\[X264\.AAC\(Jpn-Fre\)\.Sub\(Fre-Eng\)\.Chap\]\.mkv$/[D-YFI] Saint Seiya - $1 [DVD].mkv/;
   $newname =~ s/^HajimeNoIppo.*Round(\d+)-.*\(anime-mx\)/[Anime-MX] Fighting Spirit - $1 /;
   $newname =~ s/^(\[ACX\])(Final Fantasy Unlimited) - (\d+) .*\[ALI\] /$1 $2 - $3 /;
@@ -28,6 +72,7 @@
   $newname =~ s/^(\[Kira-Fansub\]) Uchuu no (Stellvia) /$1 $2 /;
   $newname =~ s/^(\[RaX\])(Chobits) - (\d+`\d) .*\(x264 aac\) /$1 $2 - $3 /;
   $newname =~ s/ Maria( |†)Holic / Maria+Holic /i;
+  $newname =~ s/ Pollyanna Episode / Pollyanna /;
   $newname =~ s/^Legend of Galactic Heroes - (\d+) \(([A-F0-9]{8})\) \[Central Anime\]/[Central Anime] Legend of Galactic Heroes - $1 [$2]/;
   $newname =~ s/\[Hnk\]/[HnK]/;
   $newname =~ s/^Inuyasha - (\d+|\d+-\d+)\[167\] - .*(\[DVD\]\[AHQ\])/Inuyasha - $1 $2/;
@@ -54,7 +99,7 @@
   $newname =~ s/ Brighter Than The Dawning Blue - Crescent Love - (\d+) Subbed / Brigher Than The Dawning Blue - Crescent Love - $1 /;
   $newname =~ s/ Character Monologue 0/ Character Monologue /;
   $newname =~ s/Ookami-san\.to\.Shichinin\.no\.Nakama-tachi\.EP(\d+)\(BD\.1080p\.AAC\)/Ookami-san - $1 [1080p BD]/;
-  $newname =~ s/Ore.?tachi ni tsubasa wa nai /Oretachi ni Tsubasa wa nai /i;
+  $newname =~ s/Ore.?tachi ni tsubasa wa nai /Oretachi ni Tsubasa wa Nai /i;
   $newname =~ s/\[anime-rg . ray=out\]/[anime-rg ray=out]/;
   $newname =~ s/^Arigatou\.Soul\.Eater\.Ep(\d+)\. \[x264\.AAC\]/[Arigatou] Soul Eater - $1 /;
   $newname =~ s/^\[Doremi\]\.HeartCatch\.PreCure!\.(\d+)\.\[1280x720\]\./[Doremi] HeartCatch PreCure! - $1 [720p]/;
@@ -139,12 +184,26 @@
   $newname =~ s/ ED(\d)/ - Ending $1 /;
   $newname =~ s/ OP(\d)/ - Opening $1 /;
   $newname =~ s/ ED / - Ending /;
-  $newname =~ s/ NCED / - Ending (Clean) /;
-  $newname =~ s/ NCOP / - Opening (Clean)/;
+  $newname =~ s/ NCED / - Ending (Clean) /i;
+  $newname =~ s/ NCED(\d+) / - Ending $1 (Clean) /i;
+  $newname =~ s/ NCOP / - Opening (Clean)/i;
   $newname =~ s/ OP / - Opening /;
   $newname =~ s/ - - / - /;
   $newname =~ s/ Ep / /ig;
   #GENERAL RULES
+  $newname =~ s/\(1280x720 x264 AAC\)/[720p]/i;
+  $newname =~ s/\( *(1920x1038 Blu-Ray FLAC|1920x1080 h264 BD FLAC|1920x1080 BD) *\)/[1080p BD]/i;
+  $newname =~ s/\(BD\.1080p\.FLAC\)/[1080p BD]/;
+  ##SLICED BREAD
+  $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;
+  $newname =~ s/\[(DVD 720x480|DVD H264 720x480)\]/[DVD]/i;
+  $newname =~ s/\[(1280x720 H264 AAC)\]/[720p]/i;
+  $newname =~ s/\[(BD 1280x720 H264 AAC)\]/[720p BD]/i;
+  $newname =~ s/\( *(BD 720p|BD 720p FLAC|BD 1280x720 H264 AAC) *\)/[720p BD]/i;
+  $newname =~ s/\( *(1280x720|1280x720 H\.?264 AAC) *\)/[720p]/i;
+  ##SLICED BREAD pt.2
+  $newname =~ s/(\d+)v(\d+)/$1 [v$2]/i;
+  $newname =~ s/\[BD\]\[1920x1080 H264-Flac\]/[1080p BD]/i;
   $newname =~ s/\.DVD/[DVD]/;
   $newname =~ s/ ~(.+)~ / - $1 /;
   $newname =~ s/v2 \(BD-1080p\) / [v2 1080p BD]/i;
@@ -158,9 +217,11 @@
   $newname =~ s/ \(h\.264\) //i;
   $newname =~ s/\(xvid-mp3\)//i;
   $newname =~ s/\(BD 1920x1080 *\)/[1080p BD]/i;
+  $newname =~ s/\[BD 1080p\]/[1080p BD]/i;
   $newname =~ s/v3 \(BD-1080p\) / [v3 1080p BD]/i;
   $newname =~ s/v0 \[720p\]/ [v0 720p]/i;
   $newname =~ s/v0 \[/ [v0 /i;
+  $newname =~ s/\[BD 1920x1080\]/[1080p BD]/;
   $newname =~ s/\[1080p - Bluray\]/[1080p BD]/;
   $newname =~ s/\[Bluray - 1080p\]/[1080p BD]/;
   $newname =~ s/\[BD 1080p AAC\]/[1080p BD]/;
@@ -187,13 +248,14 @@
   $newname =~ s/ \(1920x1080 Blu-Ray FLAC\) / [1080p BD]/i;
   $newname =~ s/ \(1280x720 Blu-Ray FLAC\) / [720p BD]/i;
   $newname =~ s/ \(1280x720 h264 BD FLAC\) / [720p BD]/i;
-  $newname =~ s/ \(704x480 DVD AAC\) / [DVD]/i;
+  $newname =~ s/\((704|720)x480 DVD (AC3|AAC)\)/ [DVD]/i;
   $newname =~ s/ \(960x720\) \[BD\]/ [720p BD]/i;
   $newname =~ s/\(704x396\)//;
   $newname =~ s/\(1280x720\)/ [720p]/i;
   $newname =~ s/\(1920x1080\)/ [1080p]/i;
-  $newname =~ s/\(720x480 DVD AC3\)/ [DVD]/i;
   $newname =~ s/\(1024x576\)/ [576p]/i;
+  $newname =~ s/\[1024x576\]/[576p]/i;
+  $newname =~ s/\[v(\d+) 1024x576\]/[v$1 576p]/i;
   $newname =~ s/\(1280x720 h264\)/ [720p]/i;
   $newname =~ s/\(1280x720 ?(h264|x264)?( aac)?\)/ [720p]/i;
   $newname =~ s/\(720p\)/[720p]/i;
@@ -206,7 +268,7 @@
   $newname =~ s/\[H264\]//i;
   $newname =~ s/\[DVD\]\[v2\]/[v2 DVD]/i;
   $newname =~ s/xvid//i;
-  $newname =~ s/\[AC3\]//i;
+  $newname =~ s/\[(AC3|AAC|H264|X264)\]//i;
   $newname =~ s/\[H264&MP3\]//i;
   $newname =~ s/\[H264-AAC\]//i;
   $newname =~ s/\+AAC//i;
@@ -227,11 +289,14 @@
   $newname =~ s/\[BD\]\[h264-1080p AC3\]/[1080p BD]/i;
   $newname =~ s/\[-/[/i;
   $newname =~ s/ \(1280x720 x264 AAC\)/ [720p]/i;
+  $newname =~ s/ *\( *\d+x(1080|960|720|576) *Blu-Ray *(FLAC|) *\) */[$1p BD]/i;
   $newname =~ s/\[720p\]\[v2\]/[v2 720p]/i;
   $newname =~ s/\[480p\]//i;
   $newname =~ s/\[v2\]\[720p\]/[v2 720p]/i;
   $newname =~ s/\[H264 - AAC\]//i;
   $newname =~ s/\[H264 1280x720 AAC\] /[720p]/i;
+  $newname =~ s/\[DVD 480p\]/[DVD]/i;
+  $newname =~ s/\[704x480 DVD\]/[DVD]/i;
   $newname =~ s/\[720p\]\[End\]/[End 720p]/i;
   $newname =~ s/ R2 DVD\(H264\.AC3\)/ [DVD]/i;
   $newname =~ s/ - Ep / - /i;
@@ -250,7 +315,11 @@
   $newname =~ s/ (\d+)v(2|3) / $1 [v${2}]/;
   $newname =~ s/\[720x480 AR FLAC\]//i;
   $newname =~ s/\[DVD 640x480\]/[DVD]/;
+  $newname =~ s/\[BD 1280x720\]/[720p BD]/i;
+  $newname =~ s/\[v(\d+) (1280x)(720)\]/[v$1 $3p]/i;
   $newname =~ s/ Episode (- )+(\d+) / - $2 /;
+  $newname =~ s/ - (\d+) *v(\d) / - $1 [v$2]/i;
+  $newname =~ s/\[V(\d)\]/[v$1]/;
   #DANGEROUS CLEANUPS
   $newname =~ s/ \[v(2|3)\]\[(.+)\]\[([0-9A-Fa-f]{8})\]/ [v$1 $2][$3]/;
   $newname =~ s/\]/] /g;
@@ -263,6 +332,7 @@
   $newname =~ s/ +(\.\w{3})$/$1/;
   $newname =~ s/\[\]//g;
   $newname =~ s/\(\)//g;
+  $newname =~ s/ - (\d+) - (\d+) / $1 - $2 /;
   #EXCEPTIONS
   $newname =~ s/^\[DB&L-E\]/[DB L-E]/;
   $newname =~ s/ VS Knight Lamune & - 40 fire / VS Knight Lamune & 40 fire /;
@@ -272,6 +342,7 @@
   $newname =~ s/ 07-GHOST / 07-Ghost /;
   $newname =~ s/ K-ON!! B-Side Theater - Uraon!! - / K-ON!! B-Side Theater - Uraon!! /;
   $newname =~ s/ Captain Tsubasa Road to - 2002 / Captain Tsubasa Road to 2002 /;
+  $newname =~ s/ Ultraviolet Code - 044 - / Ultraviolet Code 044 - /;
   $newname =~ s/ SP0/ - Special /;
   $newname =~ s/ Special - / - Special /;
   $newname =~ s/ Opening - / Opening /;
@@ -281,9 +352,14 @@
   $newname =~ s/ Canvas - 2 - / Canvas 2 - /;
   $newname =~ s/ Mitsudomoe - 2 - / Mitsudomoe 2 - /;
   $newname =~ s/ Eyeshield - 21 - / Eyeshield 21 - /;
+  $newname =~ s/ - opening - (\d+) / - Opening $1 /i;
+  $newname =~ s/ - ending - (\d+) / - Ending $1 /i;
   $newname =~ s/ Eyeshield 21 - (\d{2}) / Eyeshield 21 - 0$1 /;
   $newname =~ s/ Eyeshield 21 - (\d{2})-(\d{2}) / Eyeshield 21 - 0$1-0$2 /;
   $newname =~ s/ - 2010 Young Animator / 2010 Young Animator /;
+  $newname =~ s/ Mahoujin Guruguru - 2 - Doki Doki Densetsu - / Mahoujin Guruguru 2 - Doki Doki Densetsu - /;
+  $newname =~ s/ The World God Only Knows - 2 - / The World God Only Knows 2 - /;
+  $newname =~ s/ Legend of Galactic Heroes Gaiden - 2 - / Legend of Galactic Heroes Gaiden 2 - /;
   $newname =~ s/\[G P\]/[G_P]/i;
   #SAFE CLEANUPS
   $newname =~ s/ +/ /g;
@@ -291,7 +367,7 @@
   $newname =~ s/(- )+/- /;
   $newname =~ s/^\[N - F\]/[N-F]/;
   $newname =~ s/^\[K-F & AKUPX\]/[K-F AKUPX]/;
-  $newname =~ s/^\[([\s\w\- ]+)\] (Kyou Kara Maou|Bleach|Naruto|One Piece|Detective Conan) - (Opening \d+|Special \d+|\d+|\d+-\d+) /$2 - $3 [$1]/;
+  $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/^Naruto - (\d{2}) /Naruto - 0$1 /;
   $newname =~ s/^Naruto - (\d{2})-(\d{2}) /Naruto - 0$1-0$2 /;
   print(qq($_: $newname already exists, skipping\n)) and next() if -e $newname and $_ ne $newname;