Mercurial > ec-dotfiles
annotate bin/ren @ 115:7c3cdb235bbb
The reverse of putcrc: rmcrc.
author | Edho Prima Arief <edho@myconan.net> |
---|---|
date | Fri, 21 Oct 2011 13:38:18 +0700 |
parents | eb4dddd48f29 |
children | 6a7305364793 983beb13c736 |
rev | line source |
---|---|
4
94ee419ad047
Added bin-ec - a collection of scripts.
Edho Prima Arief <me@myconan.net>
parents:
diff
changeset
|
1 #!/usr/bin/env perl |
94ee419ad047
Added bin-ec - a collection of scripts.
Edho Prima Arief <me@myconan.net>
parents:
diff
changeset
|
2 |
94ee419ad047
Added bin-ec - a collection of scripts.
Edho Prima Arief <me@myconan.net>
parents:
diff
changeset
|
3 use warnings; |
94ee419ad047
Added bin-ec - a collection of scripts.
Edho Prima Arief <me@myconan.net>
parents:
diff
changeset
|
4 use strict; |
94ee419ad047
Added bin-ec - a collection of scripts.
Edho Prima Arief <me@myconan.net>
parents:
diff
changeset
|
5 use File::Basename; |
94ee419ad047
Added bin-ec - a collection of scripts.
Edho Prima Arief <me@myconan.net>
parents:
diff
changeset
|
6 |
94ee419ad047
Added bin-ec - a collection of scripts.
Edho Prima Arief <me@myconan.net>
parents:
diff
changeset
|
7 my @files = @ARGV or print("Usage: ",basename($0)," file1 ... fileN\n") && exit(1); |
94ee419ad047
Added bin-ec - a collection of scripts.
Edho Prima Arief <me@myconan.net>
parents:
diff
changeset
|
8 my $skip=0; |
94ee419ad047
Added bin-ec - a collection of scripts.
Edho Prima Arief <me@myconan.net>
parents:
diff
changeset
|
9 foreach (@files) { |
36 | 10 print(qq(Could not find file "$_", skipping\n)) and next() unless -e $_; |
11 my $newname = $_; | |
12 #START HERE | |
13 $newname =~ s/_/ /g; | |
87 | 14 # GROUP NAMES |
15 $newname =~ s/\[UTW Mazui\]/[UTW-Mazui]/i; | |
36 | 16 #TITLE AND NAMES |
87 | 17 $newname =~ s/^(\(|\[)W B(\)|\])/[W_B]/; |
114 | 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 } | |
87 | 23 $newname =~ s/^Genesis of Aquarion - (\d+) \[3xR\]\[Blu-ray.720p.H264.FLAC.AC3\](v2|)/[3xR] Genesis of Aquarion - $1 [$2 720p BD]/; |
24 $newname =~ s/^Otogi Zoshi Act\.(\d+)\[x264 AAC\]\[SSP-Corp\]/[SSP-Corp] Otogi Zoshi - $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 /; | |
26 $newname =~ s/^cor\.extras\.infinite\.ryvius\.textless\.opening(\d+)\./[cor] Infinite Ryvius - Opening $1 (Clean) /; | |
27 $newname =~ s/^cor\.extras\.infinite\.ryvius\.textless\.ending(\d+)\./[cor] Infinite Ryvius - Ending $1 (Clean) /; | |
28 $newname =~ s/^cor\.extras\.infinite\.ryvius\.art\.gallery\.and\.audio\.drama(\d+)\./[cor] Infinite Ryvius - Picture Drama $1 /; | |
29 $newname =~ s/^cor\.extras\.infinite\.ryvius\.ryvius\.vj\.mix(\d+)\./[cor] Infinite Ryvius - Ryvius VJ Mix $1 /; | |
30 $newname =~ s/^cor\.extras\.infinite\.ryvius\.ryvius\.illusion(\d+)\.mini-episode(\d+)\./[cor] Infinite Ryvius - Ryvius Illusion $1 - Mini Episode $2 /; | |
31 $newname =~ s/^cor\.extras\.infinite\.ryvius\.ryvius\.illusion(\d+)\.(introduction|ending)\./[cor] Infinite Ryvius - Ryvius Illusion $1 - $2 /; | |
32 $newname =~ s/ (Ryvius Illusion \d+) - ending / $1 - Ending /; | |
33 $newname =~ s/ (Ryvius Illusion \d+) - introduction / $1 - Introduction /; | |
34 $newname =~ s/^Arigatou\.Tokyo\.Majin\.Ep(\d+)\./[Arigatou] Tokyo Majin - $1 /; | |
35 $newname =~ s/ (Inazuma Eleven - )(\d{2}) / $1 0$2 /; | |
36 $newname =~ s/\] *Pocket Monsters - (\d+) - .*\[(H264 |)SUB\]/] Pokemon - $1 /i; | |
37 $newname =~ s/\] Fafner - /] Soukyuu no Fafner - /; | |
38 $newname =~ s/\] Mashiro iro symphony - /] Mashiro-iro Symphony - /i; | |
114 | 39 $newname =~ s/\] Shakugan no Shana III /] Shakugan no Shana Final /i; |
87 | 40 $newname =~ s/\] Boku Ha Tomodachi Ga Sukunai - /] Boku wa Tomodachi ga Sukunai - /i; |
41 $newname =~ s/\] Seikon no Qwaser II BD - (\d+) \[720p\]/] Seikon no Qwaser II - $1 [720p BD]/i; | |
42 $newname =~ s/\] Seikon no Qwaser Picture Drama - (\d+) /] Seikon no Qwaser - Picture Drama $1 /i; | |
43 $newname =~ s/\] Fortune Arterial Akai Yakusoku - /] Fortune Arterial - /; | |
44 $newname =~ s/\] Ookami to Koushinryou - /] Spice and Wolf - /; | |
45 $newname =~ s/\] Mobile Suit Gundam AGE - /] Gundam AGE - /i; | |
46 $newname =~ s/\] Soredemo Machi wa Mawatte Iru - /] Soredemo Machi wa Mawatteiru - /; | |
47 $newname =~ s/\] Spiral - (\d+) .* \[640 x 480\]\[H\.264\]/] Spiral - $1 /; | |
48 $newname =~ s/\] Mayo Chiki - / ] Mayo Chiki! - /i; | |
49 $newname =~ s/\] Naruto Shippuden - /] Naruto Shippuuden - /i; | |
114 | 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; | |
87 | 52 $newname =~ s/\] Tamayura - hitotose - /] Tamayura ~hitotose~ - /i; |
53 $newname =~ s/^Arigatou\.Tsubasa\.Chronicles\.(|2\.)(\d{2})(|v2)\./[Arigatou] Tsubasa Chronicles $1 - $2$3/; | |
54 $newname =~ s/^Niea\.Under\.Seven\.(\d+)\.\(Dual\.Audio\)\.XVID\.\[AM\]/[AM] Niea Under Seven - $1/; | |
55 $newname =~ s/ Tsubasa Chronicles 2\. - / Tsubasa Chronicles 2 /; | |
56 $newname =~ s/ *Moritasan wa Mukuchi */ Morita-san wa Mukuchi /i; | |
57 $newname =~ s/ Hanasakeru Seishonen / Hanasakeru Seishounen /i; | |
58 $newname =~ s/^YAMATO 3x(\d+).*/Yamato S3 - $1.mkv/i; | |
59 $newname =~ s/ - (Ending|Opening) (\d+ *[a-z]*) (Clean) / - $1 $2 ($3) /i; | |
60 $newname =~ s/^\[T-N\]Mirai Sentai TimeRanger (\d+)(\[[A-F0-9]{8}\])DVD(|ver2|ver3)(\.avi)$/[T-N] Mirai Sentai Time Ranger - $1 $3 [DVD]$2$4/; | |
61 $newname =~ s/^Yamato (\d+) - remaster \(Central Anime\)/[Central Anime] Yamato - $1 /i; | |
62 $newname =~ s/^Yamato S2 (\d+) - remaster \(Central Anime\)/[Central Anime] Yamato S2 - $1 /i; | |
63 $newname =~ s/\[TSuNDeRe\]Tsuyokiss\.(\d+)\./[Tsundere] Tsuyokiss - $1 /i; | |
64 $newname =~ s/\[RANDOMFAGGOTS\]/[Randomfaggots]/i; | |
65 $newname =~ s/\[Keroro\]\.(\d+)\.\[Xvid\.mp3\]\./[Keroro] Keroro Gunsou - $1 /i; | |
66 $newname =~ s/\[Keroro\] \.(\d+)\. \[\.mp3\] \. /[Keroro] Keroro Gunsou - $1 /i; | |
84 | 67 $newname =~ s/\[WPP & T-N\]/[WPP T-N]/; |
114 | 68 $newname =~ s/(\[Jumonji-Giri\]) *\[[A-Z0-9- ]+\]/$1/i; |
87 | 69 $newname =~ s/ Yuru Yuri / YuruYuri /i; |
70 $newname =~ s/ Clannad - After Story / Clannad After Story /i; | |
71 $newname =~ s/ Manyuu Hikenchou - (\d+) ~DC~ / Manyuu Hikenchou - $1 [Uncut]/; | |
84 | 72 $newname =~ s/\[Elysium\]K-ON!!\.EP(\d+)\(BD\.1080p\.FLAC\)/[Elysium] K-ON!! - $1 [1080p BD]/i; |
73 $newname =~ s/\[Elysium\]K-ON!!\.(ED|OP)(\d+)\(BD\.1080p\.FLAC\)/[Elysium] K-ON!! - $1 $2 [1080p BD]/i; | |
74 $newname =~ s/\[Elysium\]K-ON!!\.SP\d+\[EP(\d+)\]\(BD\.1080p\.FLAC\)/[Elysium] K-ON!! - $1 [1080p BD]/i; | |
75 $newname =~ s/^\[wpp\]digimon frontier /[wpp] Digimon Frontier /i; | |
76 $newname =~ s/^\[ACX\]Fantastic Children - (\d+) .*/[ACX] Fantastic Children - $1.mkv/i; | |
77 $newname =~ s/\[a-s\] sakigake!! cromartie high school - (\d+) - .* /[a-S] Sakigake!! Cromartie High School - $1 /; | |
78 $newname =~ s/zx\.tenchi-universe\./[zx] Tenchi Universe - /; | |
85 | 79 $newname =~ s/\[Saizen & Shinsen-Subs\]/[Saizen-SHS]/i; |
87 | 80 $newname =~ s/ ro-kyu-bu(!)? / Ro-Kyu-Bu! /i; |
81 $newname =~ s/^cor\.tv\.infinite\.ryvius\.(\d+)\./[cor] Infinite Ryvius - $1 /i; | |
85 | 82 $newname =~ s/ Ore no Imouto ga Konna ni Kawaii Wake ga Nai / Ore no Imouto /i; |
83 $newname =~ s/ no 6 / No. 6 /i; | |
87 | 84 $newname =~ s/\[ACX\]Gantz - (\d+) .* \[SaintDeath\] /[ACX] Gantz - $1 /i; |
85 $newname =~ s/ THE iDOLM\@STER / The Idolm\@ster /i; | |
85 | 86 $newname =~ s/^- (\d+) - (\[neo1024\])/$2 Luping III S3 - $2/i; |
87 $newname =~ s/ Luping III S3 / Lupin III S3 /i; | |
84 | 88 $newname =~ s/( Transformers Headmasters - \d+) - .*\[/$1 [/i; |
89 $newname =~ s/^cor\.tv\.getbackers\.(\d+)\./[cor] GetBackers - $1 /; | |
90 $newname =~ s/^cor\.extras\.getbackers\.(opening|ending)(\d+)\./[cor] GetBackers - $1 $2 /; | |
91 $newname =~ s/^Revolutionary Girl Utena /[Henshin] Revolutionary Girl Utena /; | |
92 $newname =~ s/His and Her Circumstances/His and Her Circumstances/i; | |
87 | 93 $newname =~ s/ Lime-iro Senkitan / Lime-Colored War Tales /i; |
94 $newname =~ s/(Ninja Scroll) TV Ep\.(\d+)\[.*(\[SSP-Corp\])/$3 $1 - $2 /i; | |
85 | 95 $newname =~ s/Magical Girl Madoka Magica/Puella Magi Madoka Magica/i; |
96 $newname =~ s/ Pretty Rhythm Aurora Dream / Pretty Rhythm - Aurora Dream /i; | |
84 | 97 $newname =~ s/(\[dvdrip\] Transformers \(1984\) -) E(\d+) .*(\.avi)/$1 $2 $3/; |
98 $newname =~ s/ Highschool of the Dead / High School of the Dead /i; | |
99 $newname =~ s/LOGH Gaiden 2 E(\d+) .*(\.avi|\.mkv)/Legend of Galactic Heroes Gaiden 2 - $1$2/i; | |
100 $newname =~ s/^\[RaX\] *Kiba - (\d+) - .* (\[v2\] \[|\[)/[RaX] Kiba - $1 $2/; | |
101 $newname =~ s/ (Gosick - \d+) \(Batch\) / $1 /; | |
102 $newname =~ s/ Clannad - After Story - / Clannad After Story - /; | |
87 | 103 $newname =~ s/ Ikoku Meiro no Croisée / Ikoku Meiro no Kurowaaze /i; |
84 | 104 $newname =~ s/^Mahoujin Guruguru TV2 - Doki Doki Densetsu Ep(\d+) \((Chamelenia)\)/[Chamelenia] Mahoujin Guruguru 2 - Doki Doki Densetsu - $1/i; |
105 $newname =~ s/\.divx5\.ogm$/.ogm/; | |
85 | 106 #$newname =~ s/\[(neo1024)\] Lupin III - (\d+) - .+ \[/[$1] Lupin III S2 - $2 [/; |
84 | 107 $newname =~ s/ Lupin S2 - / Lupin III S2 - /; |
108 $newname =~ s/ Prince of Tennis (\d+)/ Prince of Tennis - $1/i; | |
109 $newname =~ s/ Boogiepop - / Boogiepop Phantom - /i; | |
110 $newname =~ s/ Aika Zero OVA / Aika Zero /i; | |
111 $newname =~ s/^\[A-BT&Pakapuka\]PopoloCrois 2003 Ep/[A-BT Pakapuka] PopoloCrois (2003) - /; | |
112 $newname =~ s/^\[A-BT&Pakapuka\] PopoloCrois Story 1998 /[A-BT Pakapuka] PopoloCrois (1998) - /; | |
113 $newname =~ s/ (Pollyanna|Happy Kappi) Episode (\d+) / $1 - $2 /; | |
114 $newname =~ s/\(G P\) Now and Then Here and There \(R2J\)/[G P] Now and Then Here and There - /; | |
41 | 115 $newname =~ s/^\[Jumonji-Giri\]\[Soldats\]\[AonE&HQA\] D\.C\. Da Capo /[Jumonji-Giri] Da Capo /i; |
84 | 116 $newname =~ s/\[A-Flux&Lunar\]/[A-Flux Lunar]/i; |
117 $newname =~ s/^(Mushishi) - (\d+) - .* - (\[niizk\])/$3 $1 - $1/; | |
118 $newname =~ s/^(Saikano) (\d+)\[h\.264-AAC\](\[SSP-Corp\])/$3 $1 - $2 /; | |
36 | 119 $newname =~ s/^PitaTen.* Ep (\d+) .*\.avi/[Hnk] Pita Ten - $1.avi/; |
120 $newname =~ s/^\[a-S\] Inuyasha - (\d+|\d+-\d+) /Inuyasha - $1 [a-S]/; | |
121 $newname =~ s/\[DVD\]\[AHQ\]/[AHQ][DVD]/; | |
87 | 122 $newname =~ s/\[THORA\]/[Thora]/i; |
70 | 123 $newname =~ s/\[subdesu\]/[SubDesu]/i; |
124 $newname =~ s/ Zettai Shougeki - Platonic Heart / Zettai Shougeki /i; | |
87 | 125 $newname =~ s/^ef a tale of memories (prologue|- Opening \d+|- Ending \d+|- \d+) .*THORA/[Thora] ef - a tale of memories - $1 [1080p BD]/i; |
81 | 126 $newname =~ s/ A-Channel / A Channel /i; |
36 | 127 $newname =~ s/^mars daybreak /[V-A] Mars Daybreak - /; |
128 $newname =~ s/ Shuffle! Episode / Shuffle! /; | |
84 | 129 $newname =~ s/ A-Channel / A Channel /; |
130 $newname =~ s/ Moshidora \(Moshi Koko Yakyu no Joshi Manager ga Drucker no Management o Yondara\) / Moshidora /; | |
36 | 131 $newname =~ s/^\[ZA\]\.Saint\.Seiya\.Episode\.(\d+)\.DVDrip\.\[X264\.AAC\(Jpn-Fre\)\.Sub\(Fre-Eng\)\.Chap\]\.mkv$/[D-YFI] Saint Seiya - $1 [DVD].mkv/; |
132 $newname =~ s/^HajimeNoIppo.*Round(\d+)-.*\(anime-mx\)/[Anime-MX] Fighting Spirit - $1 /; | |
133 $newname =~ s/^(\[ACX\])(Final Fantasy Unlimited) - (\d+) .*\[ALI\] /$1 $2 - $3 /; | |
134 $newname =~ s/^\[a-s\] inuyasha - (\d+-\d+) rs2 /[a-S] Inuyasha - $1 /; | |
135 $newname =~ s/^(\[Kira-Fansub\]) Uchuu no (Stellvia) /$1 $2 /; | |
136 $newname =~ s/^(\[RaX\])(Chobits) - (\d+`\d) .*\(x264 aac\) /$1 $2 - $3 /; | |
137 $newname =~ s/ Maria( |†)Holic / Maria+Holic /i; | |
87 | 138 $newname =~ s/ C³ / C3 - Cube x Cursed x Curious /i; |
139 $newname =~ s/ C3 Cube x Cursed x Curious / C3 - Cube x Cursed x Curious /i; | |
140 $newname =~ s/ Fate( ⁄ | )Zero / Fate-Zero /i; | |
84 | 141 $newname =~ s/ Pollyanna Episode / Pollyanna /; |
36 | 142 $newname =~ s/^Legend of Galactic Heroes - (\d+) \(([A-F0-9]{8})\) \[Central Anime\]/[Central Anime] Legend of Galactic Heroes - $1 [$2]/; |
143 $newname =~ s/\[Hnk\]/[HnK]/; | |
144 $newname =~ s/^Inuyasha - (\d+|\d+-\d+)\[167\] - .*(\[DVD\]\[AHQ\])/Inuyasha - $1 $2/; | |
145 $newname =~ s/^Saint Seiya Hades OVA - (\d+) \[(AonE-SpA|SpA)\]/[$2] Saint Seiya Hades OVA - $1/; | |
146 $newname =~ s/\[\d+\] Saint Seiya Hades OVA - (\d+)/[SpA] Saint Seiya Hades OVA - $1/; | |
147 $newname =~ s/ Digimon Tamers - (\d)\./ Digimon Tamers - 0$1./; | |
148 $newname =~ s/ Kore wa Zombie Desu ka / Kore wa Zombie desu ka /i; | |
149 $newname =~ s/ Infinite Stratos - IS - / Infinite Stratos - /; | |
150 $newname =~ s/Shadow\.Star\.Narutaru\.(\d+)\.\(Dual\.Audio\)\.XVID\.\[AM\]/[AM] Narutaru - $1 /; | |
151 $newname =~ s/Outlaw Star Remastered E(\d+) .*'/ Outlaw Star - $1 /; | |
152 $newname =~ s/Ground Defense Force Mao-chan (\d+)\[h\.264-AAC\]\[SSP-Corp\]/[SSP-Corp] Mao-chan - $1 /; | |
153 $newname =~ s/Koi Kaze (\d+) \[NAG&anime fin\]/[NAG anime-fin] Koi Kaze - $1 /; | |
154 $newname =~ s/ Toradora - / Toradora! - /; | |
155 $newname =~ s/ Dragon Crisis / Dragon Crisis! /; | |
156 $newname =~ s/ Mao Chan / Mao-chan /; | |
157 $newname =~ s/^Arigatou\.Bleach\.(\d+)\.\[h264\.AAC\]/Bleach - $1 [Arigatou]/; | |
158 $newname =~ s/^Arigatou\.Bleach\.(\d+)\.\[x264\.AAC\]/Bleach - $1 [Arigatou]/; | |
159 $newname =~ s/^Arigatou\.Bleach\.(\d+)\. \[\.AAC\]/Bleach - $1 [Arigatou]/; | |
160 $newname =~ s/^Arigatou\.Bleach\.(\d+)v2\. \[\.AAC\]/Bleach - $1 [Arigatou][v2]/; | |
161 $newname =~ s/ Ep(\d+)v3 \[R2 Video\]/ - $1 [v3]/; | |
162 $newname =~ s/ Brighter Than The Dawning Blue - Crescent Love Ep(\d+) Subbed / Brigher Than The Dawning Blue - Crescent Love - $1 /; | |
163 $newname =~ s/ Brighter Than The Dawning Blue - Crescent Love - (\d+) Subbed / Brigher Than The Dawning Blue - Crescent Love - $1 /; | |
164 $newname =~ s/ Character Monologue 0/ Character Monologue /; | |
165 $newname =~ s/Ookami-san\.to\.Shichinin\.no\.Nakama-tachi\.EP(\d+)\(BD\.1080p\.AAC\)/Ookami-san - $1 [1080p BD]/; | |
84 | 166 $newname =~ s/Ore.?tachi ni tsubasa wa nai /Oretachi ni Tsubasa wa Nai /i; |
36 | 167 $newname =~ s/\[anime-rg . ray=out\]/[anime-rg ray=out]/; |
168 $newname =~ s/^Arigatou\.Soul\.Eater\.Ep(\d+)\. \[x264\.AAC\]/[Arigatou] Soul Eater - $1 /; | |
169 $newname =~ s/^\[Doremi\]\.HeartCatch\.PreCure!\.(\d+)\.\[1280x720\]\./[Doremi] HeartCatch PreCure! - $1 [720p]/; | |
170 $newname =~ s/^\[Doremi-CureCom\]\.Suite\.PreCure!\.(\d+)\.\[1280x720\]\./[Doremi-CureCom] Suite PreCure! - $1 [720p]/; | |
171 $newname =~ s/^\[Doremi\]\.Motto\.Ojamajo\.Doremi\.(\d+)\./[Doremi] Motto Ojamajo Doremi - $1 /; | |
87 | 172 $newname =~ s/^\[Doremi\] *\.Ojamajo\.Doremi\.Dokkaan!\.(\d+)\./[Doremi] Ojamajo Doremi Dokkaan! - $1 /; |
36 | 173 $newname =~ s/^\[HorribleSubs\] Lilpri /[HorribleSubs] Hime Chen! Otogi Chikku Idol Lilpri - /i; |
174 $newname =~ s/^\[Jumonji-Giri\] \[AnY\]/[Jumonji-Giri]/; | |
175 $newname =~ s/\[(BWS|PM)\]Pocket Monsters Best Wishes (\d+) .+\[H264 /[$1] Pokemon Best Wishes - $2 [/; | |
176 $newname =~ s/ Ookiku Furikabutte - The Summer Tournament Chapter / Ookiku Furikabutte S2 /; | |
177 $newname =~ s/Les Miserables Shoujo Cosette /Les Miserables /; | |
178 $newname =~ s/\[Elysium\]Baka\.to\.Test\.to\.Shoukanjuu\.(EP)?/[Elysium] Baka to Test to Shokanju/; | |
179 $newname =~ s/\[Elysium\] Baka to Test to Shokanju/[Elysium] Baka to Test to Shokanju /; | |
87 | 180 $newname =~ s/ Baka to Test to Shou?kanjuu? / Baka to Test to Shokanju /; |
36 | 181 $newname =~ s/\(BD\.1080p\.FLAC\)/[1080p BD]/; |
182 $newname =~ s/Saizen & SD/Saizen-SD/; | |
183 $newname =~ s/Bleach - (\d{2}) /Bleach - 0$1 /; | |
184 $newname =~ s/Omamori Himari - ED \(Clean\) - 0(\d) / Omamori Himari - Ending $1 (Clean) /; | |
185 $newname =~ s/Omamori Himari - Opening \(Clean\) - (\d{2}) / Omamori Himari - Opening $1 (Clean) /; | |
186 $newname =~ s/\(B-A\)Great Teacher Onizuka - Lesson /[B-A] Great Teacher Onizuka - /; | |
187 $newname =~ s/Xam'd Lost Memories - (\d+) .* \[1080p,BluRay,,DTS\] - THORA\.mkv/[THORA] Xam'd Lost Memories - $1 [1080p BD].mkv/; | |
188 $newname =~ s/\(G P\) Escaflowne \(Remastered\)/[G_P] Escaflowne/; | |
87 | 189 $newname =~ s/^\(G P\) /[G_P] /; |
36 | 190 $newname =~ s/SD&Taka/SD-Taka/; |
191 $newname =~ s/Seikai no Senki/Banner of the Stars/; | |
192 $newname =~ s/Onii-chan no Koto \.\.\. /Onii-chan no Koto Nanka Zenzen Suki Janain Dakara ne /; | |
193 $newname =~ s/Onii-chan no Koto Nanka Zenzen Suki Janain Dakara ne /Onii-chan no Koto Nanka Zenzen Suki Janain Dakara ne!! /; | |
194 $newname =~ s/^Strawberry 100% - (\d+\.?\d*) \[ReDone-MDC\]/[ReDone-MDC] Strawberry 100% - $1 /; | |
195 $newname =~ s/^Strawberry 100% - OVA 0(\d+\.?\d*) \[ReDone-MDC\]/[ReDone-MDC] Strawberry 100% OVA - $1 /; | |
196 $newname =~ s/Dragonball Kai/Dragon Ball Kai/; | |
197 $newname =~ s/Natsu no Arashi - Akinai-chuu/Summer Storm! - Open for Business/; | |
198 $newname =~ s/Natsu no Arashi/Summer Storm!/; | |
199 $newname =~ s/Naruto (\d+-\d+) /Naruto - $1 /; | |
200 $newname =~ s/Lupin III Series 1 - (\d+) - .+ \[neo1024\]/[neo1024] Lupin III - $1 /; | |
201 $newname =~ s/Mitsudomoe Picture Drama - 0/Mitsudomoe Picture Drama - /; | |
87 | 202 $newname =~ s/^(Star Driver .*)(\[AtsA\])/$2 $1 /i; |
203 $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]/; | |
204 $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]/; | |
36 | 205 $newname =~ s/Battle\.Programmer\.Shirase\./Battle Programmer Shirase /; |
206 $newname =~ s/Battle Programmer Shirase - 0/Battle Programmer Shirase - /; | |
207 $newname =~ s/ Kuragehime / Princess Jellyfish /; | |
208 $newname =~ s/^\[OZC\]Code Geass Lelouch of the Rebellion R2 E(\d+) .*/[OZC] Code Geass R2 - $1.mkv/; | |
209 $newname =~ s/ Panty and Stocking with Garterbelt / Panty & Stocking with Garterbelt /; | |
210 $newname =~ s/ Spice and Wolf S2 / Spice and Wolf II /; | |
211 $newname =~ s/\[A-E & Saizen\]/[A-E Saizen]/; | |
212 $newname =~ s/\[Flomp\]\[SD\]/[Flomp]/; | |
213 $newname =~ s/\[Jumonji-Giri\]\[Ishin\]/[Jumonji-Giri]/; | |
214 $newname =~ s/\[Jumonji-Giri\]\[F-B&A-E\]/[Jumonji-Giri]/; | |
215 $newname =~ s/\[Jumonji-Giri\] \[Lunar\]/[Jumonji-Giri]/; | |
216 $newname =~ s/\[A-Kraze & Diffusion\]/[A-Kraze Diffusion]/; | |
217 $newname =~ s/ The Story Of Saiunkoku / Saiunkoku Monogatari /i; | |
218 $newname =~ s/Code Geass Lelouch of the Rebellion Episode (\d+) .*(\.mkv)$/ Code Geass - $1$2/i; | |
219 $newname =~ s/ To LOVE-Ru / To Love-Ru /i; | |
220 $newname =~ s/ Inuyasha Kanketsuhen / Inuyasha Kanketsu-hen /; | |
221 $newname =~ s/ AIR / Air /; | |
222 $newname =~ s/ Sister Princess Re Pure / Sister Princess Repure /; | |
223 $newname =~ s/C:\\Users\\Gad\\Desktop\\yankee-megane\\Release\\//; | |
114 | 224 $newname =~ s/ Ep(\d+)/ $1/i; |
36 | 225 $newname =~ s/\(END\)/[End]/i; |
226 $newname =~ s/\(BD 1280x720 h264 JP.EN AAC\)/[720p BD]/i; | |
227 $newname =~ s/\[Final\]//i; | |
228 $newname =~ s/DB&L-E/DB L-E/; | |
229 $newname =~ s/IY-F&Oki/IY-F Oki/; | |
230 $newname =~ s/L-E&AonE/AonE L-E/; | |
4
94ee419ad047
Added bin-ec - a collection of scripts.
Edho Prima Arief <me@myconan.net>
parents:
diff
changeset
|
231 $newname =~ s/^(Detective Conan - [[:digit:]]+-?[[:digit:]]*) (\[DCTP[^]]*\])(.+)$/$2 $1 $3/; |
36 | 232 $newname =~ s/^(Detective Conan - [[:digit:]]+-?[[:digit:]]*) (\[AZFS[^]]*\])(.+)$/$2 $1 $3/; |
233 $newname =~ s/^\[Derp\] Legend of the Legendary Heroes /[Derp] The Legend of the Legendary Heroes /; | |
234 $newname =~ s/ Sengoku BASARA Two / Sengoku Basara Two /; | |
235 $newname =~ s/ Asobi ni Ikuyo! / Asobi ni Iku Yo! /; | |
236 $newname =~ s/ Shinrei Tantei Yakumo / Psychic Detective Yakumo /; | |
237 $newname =~ s/ Ikkitousen Xtreme Xecutor OVA - 0/ Ikkitousen Xtreme Xecutor OVA - /; | |
238 $newname =~ s/ Megane na Kanojo OVA - 0/ Megane na Kanojo OVA - /; | |
239 $newname =~ s/\.Strange\.Dawn\.(\d+)\./ Strange Dawn - $1 /; | |
240 $newname =~ s/ (Tegami Bachi|Letter Bee) REVERSE / Letter Bee Reverse /i; | |
241 $newname =~ s/ Sora No Otoshimono / Sora no Otoshimono /; | |
242 $newname =~ s/ Kidou Tenshi Angelic Layer (ep)?/ Angelic Layer /i; | |
243 $newname =~ s/ Sora No Otoshimono - Forte / Sora no Otoshimono Forte /i; | |
244 $newname =~ s/ Shinryaku! Ika Musume / Squid Girl /; | |
245 #$newname =~ s/ Squid Girl / Shinryaku! Ika Musume /; | |
11 | 246 $newname =~ s/ Seikimatsu Occult Gakuin / Occult Academy /; |
36 | 247 $newname =~ s/ Arakawa Under the Bridge ×2 / Arakawa Under the Bridge x2 /; |
248 $newname =~ s/ K-ON!! S2 / K-ON!! /; | |
249 $newname =~ s/ Ookami-san To Shichinin No Nakama-tachi / Ookami-san /; | |
250 $newname =~ s/ K-On!! / K-ON!! /; | |
251 $newname =~ s/ Ore No Imouto / Ore no Imouto /; | |
252 $newname =~ s/ A Certain Magical Index II / Toaru Majutsu no Index II /i; | |
253 $newname =~ s/ TV Broadcast \[720p/ [LQ 720p/; | |
87 | 254 $newname =~ s/ ED(\d+[a-z]*)/ - Ending $1 /i; |
255 $newname =~ s/ OP(\d+[a-z]*)/ - Opening $1 /i; | |
36 | 256 $newname =~ s/ ED / - Ending /; |
114 | 257 $newname =~ s/ Clean (Opening|Ending) v2/ - $1 (Clean) [v2]/i; |
87 | 258 $newname =~ s/ Creditless Opening (\d+) / - Opening $1 (Clean) /i; |
259 $newname =~ s/ Ep(\d+) Creditless Ending / - Ending $1 (Clean) /i; | |
260 $newname =~ s/ (NCED|Ending Clean) / - Ending (Clean) /i; | |
85 | 261 $newname =~ s/ NCED(\d+) / - Ending $1 (Clean) /i; |
87 | 262 $newname =~ s/ (NCOP|Opening Clean) / - Opening (Clean)/i; |
11 | 263 $newname =~ s/ OP / - Opening /; |
87 | 264 $newname =~ s/ (\d+-\d+) / - $1 /; |
265 $newname =~ s/ - - / - /g; | |
36 | 266 $newname =~ s/ Ep / /ig; |
84 | 267 ##SLICED BREAD |
114 | 268 $newname =~ s/(\(|\[) *(10bit-v2) *(\)|\])/[v2]/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; | |
270 $newname =~ s/\[(DVD 10bit)\]/[DVD]/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; | |
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; | |
87 | 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; |
275 $newname =~ s/(\(|\[) *(1024x576|H264 1024x576) *(\)|\])/[576p]/i; | |
276 $newname =~ s/(\(|\[) *(1920x1080) *(\)|\])/[1080p]/i; | |
84 | 277 ##SLICED BREAD pt.2 |
278 $newname =~ s/(\d+)v(\d+)/$1 [v$2]/i; | |
279 $newname =~ s/\[BD\]\[1920x1080 H264-Flac\]/[1080p BD]/i; | |
87 | 280 $newname =~ s/\[BD\]\[720p-AAC\]/[720p BD]/i; |
36 | 281 $newname =~ s/\.DVD/[DVD]/; |
87 | 282 #$newname =~ s/ ~(.+)~ / - $1 /; |
36 | 283 $newname =~ s/v2 \(BD-1080p\) / [v2 1080p BD]/i; |
284 $newname =~ s/v2 \(BD H264 1280x960 24fps AAC\) / [v2 960p BD]/i; | |
285 $newname =~ s/BD 1280x720 FLAC\]/ 720p BD]/i; | |
286 $newname =~ s/\[HD\]\.mp4/.mp4/; | |
287 $newname =~ s/\[\.?AC3\]//i; | |
288 $newname =~ s/\[720p H264 AAC5\.1\]/[720p]/; | |
289 $newname =~ s/\[BD 720p\]/[720p BD]/; | |
290 $newname =~ s/ \(BD H264 1280x960 24fps AAC\) / [960p BD]/i; | |
291 $newname =~ s/ \(h\.264\) //i; | |
292 $newname =~ s/\(xvid-mp3\)//i; | |
293 $newname =~ s/\(BD 1920x1080 *\)/[1080p BD]/i; | |
84 | 294 $newname =~ s/\[BD 1080p\]/[1080p BD]/i; |
36 | 295 $newname =~ s/v3 \(BD-1080p\) / [v3 1080p BD]/i; |
296 $newname =~ s/v0 \[720p\]/ [v0 720p]/i; | |
297 $newname =~ s/v0 \[/ [v0 /i; | |
84 | 298 $newname =~ s/\[BD 1920x1080\]/[1080p BD]/; |
36 | 299 $newname =~ s/\[1080p - Bluray\]/[1080p BD]/; |
300 $newname =~ s/\[Bluray - 1080p\]/[1080p BD]/; | |
301 $newname =~ s/\[BD 1080p AAC\]/[1080p BD]/; | |
302 $newname =~ s/ \(BD-1080p\) / [1080p BD]/i; | |
303 $newname =~ s/ \(720p, BD\) / [720p BD]/i; | |
304 $newname =~ s/ \(BD 1280x960 24fps 5\.1ch\) / [960p BD]/i; | |
305 $newname =~ s/ \(Bluray, 720p, AAC\) / [720p BD]/i; | |
306 $newname =~ s/ \(720p,BluRay\) / [720p BD]/i; | |
307 $newname =~ s/ \(BD, 720p, FLAC\) / [720p BD]/i; | |
308 $newname =~ s/\[END\]/[End]/; | |
309 $newname =~ s/\[BD\]\[720p FLAC\]/[720p BD]/; | |
310 $newname =~ s/\[BD\]\[720p\]/[720p BD]/; | |
311 $newname =~ s/\[BD\]\[1080p\]/[1080p BD]/; | |
312 $newname =~ s/\[h264-480p AAC\]//; | |
313 $newname =~ s/\[h.264-480p\]//i; | |
314 $newname =~ s/ v3 \[720p\]/[v3 720p]/i; | |
315 $newname =~ s/1280x720 H264 OGG/720p/; | |
316 $newname =~ s/ \[BD 1080p FLAC\]/ [1080p BD]/i; | |
317 $newname =~ s/ \[720p BD FLAC\]/ [720p BD]/i; | |
318 $newname =~ s/ \[720p Blu-ray AAC\]/ [720p BD]/i; | |
319 $newname =~ s/ \[BD\]\[h264-1080p FLAC\]/ [1080p BD]/i; | |
320 $newname =~ s/ \(1920x1080\) \[BD\]/ [1080p BD]/i; | |
321 $newname =~ s/ \(960x720 Blu-Ray FLAC\) / [720p BD]/i; | |
322 $newname =~ s/ \(1920x1080 Blu-Ray FLAC\) / [1080p BD]/i; | |
323 $newname =~ s/ \(1280x720 Blu-Ray FLAC\) / [720p BD]/i; | |
324 $newname =~ s/ \(1280x720 h264 BD FLAC\) / [720p BD]/i; | |
84 | 325 $newname =~ s/\((704|720)x480 DVD (AC3|AAC)\)/ [DVD]/i; |
36 | 326 $newname =~ s/ \(960x720\) \[BD\]/ [720p BD]/i; |
327 $newname =~ s/\(704x396\)//; | |
328 $newname =~ s/\(1280x720\)/ [720p]/i; | |
329 $newname =~ s/\(1920x1080\)/ [1080p]/i; | |
330 $newname =~ s/\(1024x576\)/ [576p]/i; | |
85 | 331 $newname =~ s/\[v(\d+) 1024x576\]/[v$1 576p]/i; |
36 | 332 $newname =~ s/\(1280x720 h264\)/ [720p]/i; |
333 $newname =~ s/\(1280x720 ?(h264|x264)?( aac)?\)/ [720p]/i; | |
334 $newname =~ s/\(720p\)/[720p]/i; | |
335 $newname =~ s/\(1080p\)/[1080p]/i; | |
336 $newname =~ s/\(1080p,BD\)/[1080p BD]/i; | |
337 $newname =~ s/\(BD,1080p\)/[1080p BD]/i; | |
338 $newname =~ s/\((BD 720p)\)/ [720p BD]/i; | |
339 $newname =~ s/\(DVD\)/ [DVD]/i; | |
340 $newname =~ s/\[h264-480p\]//i; | |
341 $newname =~ s/\[H264\]//i; | |
342 $newname =~ s/\[DVD\]\[v2\]/[v2 DVD]/i; | |
343 $newname =~ s/xvid//i; | |
84 | 344 $newname =~ s/\[(AC3|AAC|H264|X264)\]//i; |
36 | 345 $newname =~ s/\[H264&MP3\]//i; |
346 $newname =~ s/\[H264-AAC\]//i; | |
347 $newname =~ s/\+AAC//i; | |
348 $newname =~ s/\[720x480 H264-Vorbis\]//i; | |
349 $newname =~ s/\[BD\]\[1280x720 H264-Flac\]/[720p BD]/i; | |
350 $newname =~ s/\[h264 Vorbis\]//i; | |
351 $newname =~ s/\[640x480 h\.264 AAC\]//i; | |
352 $newname =~ s/\[720x480 AR h\.264 AAC\]//i; | |
353 $newname =~ s/\[DVD H264 640x476\]/[DVD]/i; | |
354 $newname =~ s/\[720p\]/[720p]/i; | |
355 $newname =~ s/\[720p\]\[BD\]/[720p BD]/i; | |
356 $newname =~ s/\[H264 1280x720\]/[720p]/i; | |
357 $newname =~ s/\[H264 1280x720 OGG\]/[720p]/i; | |
358 $newname =~ s/\[1280x720\]/[720p]/i; | |
359 $newname =~ s/\[1280x720 BD\]/[720p BD]/i; | |
360 $newname =~ s/\[h264-720p\]/[720p]/i; | |
361 $newname =~ s/\[h264-1080p FLAC\]/[1080p]/i; | |
362 $newname =~ s/\[BD\]\[h264-1080p AC3\]/[1080p BD]/i; | |
363 $newname =~ s/\[-/[/i; | |
364 $newname =~ s/ \(1280x720 x264 AAC\)/ [720p]/i; | |
84 | 365 $newname =~ s/ *\( *\d+x(1080|960|720|576) *Blu-Ray *(FLAC|) *\) */[$1p BD]/i; |
36 | 366 $newname =~ s/\[720p\]\[v2\]/[v2 720p]/i; |
367 $newname =~ s/\[480p\]//i; | |
368 $newname =~ s/\[v2\]\[720p\]/[v2 720p]/i; | |
87 | 369 $newname =~ s/\[(v\d)\]\[(\d+p)(| BD)\]/[$1 $2$3]/i; |
36 | 370 $newname =~ s/\[H264 - AAC\]//i; |
371 $newname =~ s/\[H264 1280x720 AAC\] /[720p]/i; | |
84 | 372 $newname =~ s/\[DVD 480p\]/[DVD]/i; |
373 $newname =~ s/\[704x480 DVD\]/[DVD]/i; | |
36 | 374 $newname =~ s/\[720p\]\[End\]/[End 720p]/i; |
375 $newname =~ s/ R2 DVD\(H264\.AC3\)/ [DVD]/i; | |
376 $newname =~ s/ - Ep / - /i; | |
377 $newname =~ s/(h|x)\.?264//i; | |
378 $newname =~ s/\[BD\]\[1080p-?\]/[1080p BD]/; | |
379 $newname =~ s/AAC5\.1//; | |
380 $newname =~ s/FLAC//; | |
381 $newname =~ s/ aac//i; | |
382 $newname =~ s/ ac3//i; | |
383 $newname =~ s/\.DVD/ [DVD]/i; | |
384 $newname =~ s/ DVD / [DVD] /i; | |
385 $newname =~ s/\(DVD ?\)/ [DVD] /i; | |
386 $newname =~ s/ Ep(\d+) / - $1 /; | |
387 $newname =~ s/ Ep(\d+)v2 / - $1 [v2]/; | |
388 $newname =~ s/ (\d+) / - $1 /; | |
389 $newname =~ s/ (\d+)v(2|3) / $1 [v${2}]/; | |
390 $newname =~ s/\[720x480 AR FLAC\]//i; | |
391 $newname =~ s/\[DVD 640x480\]/[DVD]/; | |
84 | 392 $newname =~ s/\[BD 1280x720\]/[720p BD]/i; |
393 $newname =~ s/\[v(\d+) (1280x)(720)\]/[v$1 $3p]/i; | |
36 | 394 $newname =~ s/ Episode (- )+(\d+) / - $2 /; |
84 | 395 $newname =~ s/ - (\d+) *v(\d) / - $1 [v$2]/i; |
396 $newname =~ s/\[V(\d)\]/[v$1]/; | |
36 | 397 #DANGEROUS CLEANUPS |
398 $newname =~ s/ \[v(2|3)\]\[(.+)\]\[([0-9A-Fa-f]{8})\]/ [v$1 $2][$3]/; | |
399 $newname =~ s/\]/] /g; | |
400 $newname =~ s/\[/ [/g; | |
401 $newname =~ s/\] +\[/][/g; | |
87 | 402 $newname =~ s/(\[|\() +/$1/g; |
403 $newname =~ s/ +(\]|\))/$1/g; | |
36 | 404 $newname =~ s/( -)+ / - /g; |
405 $newname =~ s/(\[|\()([0-9a-fA-F]{8})(\]|\))/[\U$2]/; | |
406 $newname =~ s/ +(\.\w{3})$/$1/; | |
407 $newname =~ s/\[\]//g; | |
408 $newname =~ s/\(\)//g; | |
84 | 409 $newname =~ s/ - (\d+) - (\d+) / $1 - $2 /; |
36 | 410 #EXCEPTIONS |
411 $newname =~ s/^\[DB&L-E\]/[DB L-E]/; | |
11 | 412 $newname =~ s/ VS Knight Lamune & - 40 fire / VS Knight Lamune & 40 fire /; |
36 | 413 $newname =~ s/ RAINBOW / Rainbow /; |
87 | 414 $newname =~ s/ (Infinite Ryvius - Ryvius Illusion|Infinite Ryvius - Ryvius VJ Mix|Kara no Kyoukai - Cinema Intro) - / $1 /; |
36 | 415 $newname =~ s/ Golgo - 13 / Golgo 13 /; |
416 $newname =~ s/ Strike Witches - 2 / Strike Witches 2 - /; | |
417 $newname =~ s/ 07-GHOST / 07-Ghost /; | |
418 $newname =~ s/ K-ON!! B-Side Theater - Uraon!! - / K-ON!! B-Side Theater - Uraon!! /; | |
419 $newname =~ s/ Captain Tsubasa Road to - 2002 / Captain Tsubasa Road to 2002 /; | |
84 | 420 $newname =~ s/ Ultraviolet Code - 044 - / Ultraviolet Code 044 - /; |
87 | 421 $newname =~ s/ Persona - 3 Picture Drama - She Goes For A Walk / Persona 3 Picture Drama - She Goes For A Walk - /; |
36 | 422 $newname =~ s/ SP0/ - Special /; |
87 | 423 $newname =~ s/ SP(\d+) / - Special $1 /; |
36 | 424 $newname =~ s/ Special - / - Special /; |
87 | 425 $newname =~ s/ - Picture Drama - / - Picture Drama /; |
426 $newname =~ s/ (Mayoi Neko Overrun! - Theater) - / $1 /; | |
36 | 427 $newname =~ s/ Opening - / Opening /; |
428 $newname =~ s/ Ending - / Ending /; | |
429 $newname =~ s/ Hidamari Sketch Hoshimittsu - Special / Hidamari Sketch Hoshimittsu Special - /; | |
430 $newname =~ s/ Spice and Wolf S2 - BD Menu - 0/ Spice and Wolf S2 - BD Menu /; | |
431 $newname =~ s/ Canvas - 2 - / Canvas 2 - /; | |
87 | 432 $newname =~ s/ Tsubasa Chronicles - 2 (\d{2}) / Tsubasa Chronicles 2 - $1 /; |
36 | 433 $newname =~ s/ Mitsudomoe - 2 - / Mitsudomoe 2 - /; |
87 | 434 $newname =~ s/ Morita-san wa Mukuchi - 2 / Morita-san wa Mukuchi 2 /i; |
36 | 435 $newname =~ s/ Eyeshield - 21 - / Eyeshield 21 - /; |
84 | 436 $newname =~ s/ - opening - (\d+) / - Opening $1 /i; |
437 $newname =~ s/ - ending - (\d+) / - Ending $1 /i; | |
36 | 438 $newname =~ s/ Eyeshield 21 - (\d{2}) / Eyeshield 21 - 0$1 /; |
439 $newname =~ s/ Eyeshield 21 - (\d{2})-(\d{2}) / Eyeshield 21 - 0$1-0$2 /; | |
440 $newname =~ s/ - 2010 Young Animator / 2010 Young Animator /; | |
84 | 441 $newname =~ s/ Mahoujin Guruguru - 2 - Doki Doki Densetsu - / Mahoujin Guruguru 2 - Doki Doki Densetsu - /; |
442 $newname =~ s/ The World God Only Knows - 2 - / The World God Only Knows 2 - /; | |
443 $newname =~ s/ Legend of Galactic Heroes Gaiden - 2 - / Legend of Galactic Heroes Gaiden 2 - /; | |
87 | 444 $newname =~ s/ Kara no Kyoukai - (\d+) / Kara no Kyoukai - Chapter $1/; |
36 | 445 $newname =~ s/\[G P\]/[G_P]/i; |
446 #SAFE CLEANUPS | |
447 $newname =~ s/ +/ /g; | |
448 $newname =~ s/^ +//; | |
449 $newname =~ s/(- )+/- /; | |
450 $newname =~ s/^\[N - F\]/[N-F]/; | |
451 $newname =~ s/^\[K-F & AKUPX\]/[K-F AKUPX]/; | |
85 | 452 $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]/; |
36 | 453 $newname =~ s/^Naruto - (\d{2}) /Naruto - 0$1 /; |
454 $newname =~ s/^Naruto - (\d{2})-(\d{2}) /Naruto - 0$1-0$2 /; | |
455 print(qq($_: $newname already exists, skipping\n)) and next() if -e $newname and $_ ne $newname; | |
456 if ($_ eq $newname) { | |
457 print("$_: no need to rename, skipping\n"); | |
458 } else { | |
459 if($skip==1) { print("Result: $_ --> $newname\n"); } | |
460 else { | |
461 if(rename($_, $newname)) { print("$_ -> $newname\n"); } | |
462 else { print("$_: rename failed\n"); } | |
463 } | |
464 } | |
465 next(); | |
4
94ee419ad047
Added bin-ec - a collection of scripts.
Edho Prima Arief <me@myconan.net>
parents:
diff
changeset
|
466 } |
94ee419ad047
Added bin-ec - a collection of scripts.
Edho Prima Arief <me@myconan.net>
parents:
diff
changeset
|
467 |
94ee419ad047
Added bin-ec - a collection of scripts.
Edho Prima Arief <me@myconan.net>
parents:
diff
changeset
|
468 exit(0); |