Mercurial > ec-dotfiles
comparison bin/ren @ 259:1e214a53237d
Even more rules.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Thu, 24 Nov 2011 09:42:16 +0700 |
parents | fbb03c862b63 |
children | 5ef99c47e636 |
comparison
equal
deleted
inserted
replaced
258:0cd601956a9a | 259:1e214a53237d |
---|---|
22 $newname =~ s/,([a-z0-9]+)$/.$1/i; | 22 $newname =~ s/,([a-z0-9]+)$/.$1/i; |
23 } | 23 } |
24 $newname =~ s/(\[ACX\])(Spiral)( - \d+) - .* (\[[a-f0-9]{8}\]\.mkv)$/$1 $2$3 $4/i; | 24 $newname =~ s/(\[ACX\])(Spiral)( - \d+) - .* (\[[a-f0-9]{8}\]\.mkv)$/$1 $2$3 $4/i; |
25 $newname =~ s/^Genesis of Aquarion - (\d+) \[3xR\]\[Blu-ray.720p.H264.FLAC.AC3\](v2|)/[3xR] Genesis of Aquarion - $1 [$2 720p BD]/; | 25 $newname =~ s/^Genesis of Aquarion - (\d+) \[3xR\]\[Blu-ray.720p.H264.FLAC.AC3\](v2|)/[3xR] Genesis of Aquarion - $1 [$2 720p BD]/; |
26 $newname =~ s/^Otogi Zoshi Act\.(\d+)\[x264 AAC\]\[SSP-Corp\]/[SSP-Corp] Otogi Zoshi - $1 /; | 26 $newname =~ s/^Otogi Zoshi Act\.(\d+)\[x264 AAC\]\[SSP-Corp\]/[SSP-Corp] Otogi Zoshi - $1 /; |
27 $newname =~ s/(Ending) (\(Clean\)) - 0(\d+)/$1 $3 $2/; | |
28 $newname =~ s/(Opening) (\(Clean\))0(\d+)/$1 $3 $2/; | |
29 $newname =~ s/ A\+Channel / A Channel - Special /; | |
27 $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 /; | 30 $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 /; |
28 $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; | 31 $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; |
29 $newname =~ s/^(Futari wa Precure Splash Star) - (C\d+)\[\d+\] - .*(\[DVD\])(\[[^]]+\])(\[[a-f0-9]{8}\]\.[^.]+)$/$4 $1 - $2 $3$5/i; | 32 $newname =~ s/^(Futari wa Precure Splash Star) - (C\d+)\[\d+\] - .*(\[DVD\])(\[[^]]+\])(\[[a-f0-9]{8}\]\.[^.]+)$/$4 $1 - $2 $3$5/i; |
30 $newname =~ s/^(Air Master|Black Jack Special|Cinderella Boy|Damekko Doubutsu|Crystal Blaze) - (\d+)\[\d+\] - .*(\[[^]]+\])(\[[a-f0-9]{8}\]\.[^.]+)$/$3 $1 - $2 $4/i; | 33 $newname =~ s/^(Air Master|Black Jack Special|Cinderella Boy|Damekko Doubutsu|Crystal Blaze) - (\d+)\[\d+\] - .*(\[[^]]+\])(\[[a-f0-9]{8}\]\.[^.]+)$/$3 $1 - $2 $4/i; |
31 $newname =~ s/^cor\.extras\.infinite\.ryvius\.textless\.opening(\d+)\./[cor] Infinite Ryvius - Opening $1 (Clean) /; | 34 $newname =~ s/^cor\.extras\.infinite\.ryvius\.textless\.opening(\d+)\./[cor] Infinite Ryvius - Opening $1 (Clean) /; |
33 $newname =~ s/^cor\.extras\.infinite\.ryvius\.art\.gallery\.and\.audio\.drama(\d+)\./[cor] Infinite Ryvius - Picture Drama $1 /; | 36 $newname =~ s/^cor\.extras\.infinite\.ryvius\.art\.gallery\.and\.audio\.drama(\d+)\./[cor] Infinite Ryvius - Picture Drama $1 /; |
34 $newname =~ s/^cor\.extras\.infinite\.ryvius\.ryvius\.vj\.mix(\d+)\./[cor] Infinite Ryvius - Ryvius VJ Mix $1 /; | 37 $newname =~ s/^cor\.extras\.infinite\.ryvius\.ryvius\.vj\.mix(\d+)\./[cor] Infinite Ryvius - Ryvius VJ Mix $1 /; |
35 $newname =~ s/^cor\.extras\.infinite\.ryvius\.ryvius\.illusion(\d+)\.mini-episode(\d+)\./[cor] Infinite Ryvius - Ryvius Illusion $1 - Mini Episode $2 /; | 38 $newname =~ s/^cor\.extras\.infinite\.ryvius\.ryvius\.illusion(\d+)\.mini-episode(\d+)\./[cor] Infinite Ryvius - Ryvius Illusion $1 - Mini Episode $2 /; |
36 $newname =~ s/^cor\.extras\.infinite\.ryvius\.ryvius\.illusion(\d+)\.(introduction|ending)\./[cor] Infinite Ryvius - Ryvius Illusion $1 - $2 /; | 39 $newname =~ s/^cor\.extras\.infinite\.ryvius\.ryvius\.illusion(\d+)\.(introduction|ending)\./[cor] Infinite Ryvius - Ryvius Illusion $1 - $2 /; |
37 $newname =~ s/ (Ryvius Illusion \d+) - ending / $1 - Ending /; | 40 $newname =~ s/ (Ryvius Illusion \d+) - ending / $1 - Ending /; |
41 $newname =~ s/ (Mitsudomoe Zouryouchuu\! - )0/ $1/; | |
38 $newname =~ s/ (Ryvius Illusion \d+) - introduction / $1 - Introduction /; | 42 $newname =~ s/ (Ryvius Illusion \d+) - introduction / $1 - Introduction /; |
39 $newname =~ s/^Arigatou\.Tokyo\.Majin\.Ep(\d+)\./[Arigatou] Tokyo Majin - $1 /; | 43 $newname =~ s/^Arigatou\.Tokyo\.Majin\.Ep(\d+)\./[Arigatou] Tokyo Majin - $1 /; |
40 $newname =~ s/ (Inazuma Eleven - )(\d{2}) / $1 0$2 /; | 44 $newname =~ s/ (Inazuma Eleven - )(\d{2}) / $1 0$2 /; |
41 $newname =~ s/\] *Pocket Monsters - (\d+) - .*\[(H264 |)SUB\]/] Pokemon - $1 /i; | 45 $newname =~ s/\] *Pocket Monsters - (\d+) - .*\[(H264 |)SUB\]/] Pokemon - $1 /i; |
42 $newname =~ s/\] Fafner - /] Soukyuu no Fafner - /; | 46 $newname =~ s/\] Fafner - /] Soukyuu no Fafner - /; |
277 ##SLICED BREAD | 281 ##SLICED BREAD |
278 $newname =~ s/(\(|\[) *(10bit-v2) *(\)|\])/[v2]/i; | 282 $newname =~ s/(\(|\[) *(10bit-v2) *(\)|\])/[v2]/i; |
279 $newname =~ s/(\(|\[) *(h\.264-Hi10P|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; | 283 $newname =~ s/(\(|\[) *(h\.264-Hi10P|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; |
280 $newname =~ s/\[(DVD 10bit)\]/[DVD]/i; | 284 $newname =~ s/\[(DVD 10bit)\]/[DVD]/i; |
281 $newname =~ s/(\(|\[) *(DVD H264 640x480|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; | 285 $newname =~ s/(\(|\[) *(DVD H264 640x480|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; |
282 $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; | 286 $newname =~ s/(\(|\[) *(BD\]\[1080p-FLAC|BD 1080|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; |
283 $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; | 287 $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; |
284 $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; | 288 $newname =~ s/(\(|\[) *(BD, 720, 10bit, AAC|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; |
285 $newname =~ s/(\(|\[) *(BD 540p) *(\)|\])/[BD]/i; | 289 $newname =~ s/(\(|\[) *(BD 540p) *(\)|\])/[BD]/i; |
286 $newname =~ s/(\(|\[) *(1024x576|H264 1024x576) *(\)|\])/[576p]/i; | 290 $newname =~ s/(\(|\[) *(1024x576|H264 1024x576) *(\)|\])/[576p]/i; |
287 $newname =~ s/(\(|\[) *(1920x1080) *(\)|\])/[1080p]/i; | 291 $newname =~ s/(\(|\[) *(1920x1080) *(\)|\])/[1080p]/i; |
288 ##SLICED BREAD pt.2 | 292 ##SLICED BREAD pt.2 |
289 $newname =~ s/(\d+)v(\d+)/$1 [v$2]/i; | 293 $newname =~ s/(\d+)v(\d+)/$1 [v$2]/i; |
458 $newname =~ s/ Kara no Kyoukai - (\d+) / Kara no Kyoukai - Chapter $1/; | 462 $newname =~ s/ Kara no Kyoukai - (\d+) / Kara no Kyoukai - Chapter $1/; |
459 $newname =~ s/\[G P\]/[G_P]/i; | 463 $newname =~ s/\[G P\]/[G_P]/i; |
460 #SAFE CLEANUPS | 464 #SAFE CLEANUPS |
461 $newname =~ s/ +/ /g; | 465 $newname =~ s/ +/ /g; |
462 $newname =~ s/^ +//; | 466 $newname =~ s/^ +//; |
467 $newname =~ s/ *(\.[^ ]+$)/$1/; | |
463 $newname =~ s/(- )+/- /; | 468 $newname =~ s/(- )+/- /; |
464 $newname =~ s/^\[N - F\]/[N-F]/; | 469 $newname =~ s/^\[N - F\]/[N-F]/; |
465 $newname =~ s/^\[K-F & AKUPX\]/[K-F AKUPX]/; | 470 $newname =~ s/^\[K-F & AKUPX\]/[K-F AKUPX]/; |
466 $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]/; | 471 $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]/; |
467 $newname =~ s/^Naruto - (\d{2}) /Naruto - 0$1 /; | 472 $newname =~ s/^Naruto - (\d{2}) /Naruto - 0$1 /; |