Page 1 of 2

Ithiel's super crazy renaming scheme for perfectionists!

Posted: 28 Dec 2013, 12:45
by Ithiel
Hi guys,

After much testing, trialling, tweaking, and subsequent 'hey, how do I make it do ....' messages to Red (you're awesome mate), I think I've finally got my naming format finalised, and I'm hoping it will come in handy to a few other people. Of course, if you can see anywhere that I can make an improvement (or a way to make it a little less absurdly long), any input is also greatly appreciated :-)

The three types are 'Movies', TV Shows, and Anime.

-----------------------------------------------------------------------------------------------------------------------------

Movies:
Includes:
  • Organises movies based on 'collection',
    All names converted to Title Case (should re-capatalise Roman numerals in most situations though)
    List both Primary & Alternate Title (i.e. English & Japanese) if different
    Moves the 'The's to the end
    Replaces invalid characters from file, folder, and collection name
    Shows year and rating in the folder name
    Includes video resolution, video and audio codec, and audio channel info in the file name
    Retains tags for 3D, Extended, Uncut, Remastered, Unrated, Uncensored & Special Edition references
    Supports multi-part movies
Examples:
\\mynas\media\Movies\Twilight Saga, The\Twilight Saga - Eclipse, The (2010 PG-13)\Twilight Saga - Eclipse, The [720p x264 DTS 6ch].mkv
\\mynas\media\Movies\Rurôni Kenshin - Ishin Shishi E No Requiem (Samurai X - The Motion Picture) (1997 PG-15)\Rurôni Kenshin - Ishin Shishi E No Requiem [480p DivX MP3 2ch].avi
\\mynas\media\Movies\Alien Collection\Aliens (1986 R)\Aliens (Special Edition) Part 1 [360p XviD AC3 6ch].avi
\\mynas\media\Movies\Alien Collection\Aliens (1986 R)\Aliens (Special Edition) Part 2 [360p XviD AC3 6ch].avi
\\mynas\media\Movies\Sanctum 3D (2011 R)\Sanctum 3D [720p x264 AAC 6ch].mp4

Code: Select all

//mynas/media/Movies/{collection.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).replaceFirst(/^(?i)(Collection of the)\s(.+)/, /$2 Collection/).replaceAll(/Saga Collection/, "Saga").replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ")}\{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/ Ii/, " II").replaceAll(/ IIi/, " III").replaceAll(/ Iv /, " IV ").replaceAll(/ Vi /, " VI ").replaceAll(/ Vii/, " VII").replaceAll(/ Viii/, " VIII").replaceAll(/ Ix/, " IX").replaceAll(/ Xii/, " XII").replaceAll(/ XIIi/, " XIII").replaceAll(/ Xiv/, " XIV").replaceAll(/ Xv/, " XV").replaceAll(/ Xvi/, " XVI").replaceAll(/ Xvii/, " XVII").replaceAll(/ Xviii/, " XVIII").replaceAll(/ Xix/, " XIX").replaceAll(/ Xx/, " XX").replaceAll(/ Xxx/, " XXX").replaceAll(/1St/, "1st").replaceAll(/2Nd/, "2nd").replaceAll(/3Rd/, "3rd").replaceAll(/4Th/, "4th").replaceAll(/5Th/, "5th").replaceAll(/6Th/, "6th").replaceAll(/7Th/, "7th").replaceAll(/8Th/, "8th").replaceAll(/9Th/, "9th").replaceAll(/0Th/, "0th").replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{imdb.certification}{certification}.replaceAll(/^\d+$/, 'PG-$0')})/{norm(n)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{fn.contains('Extended') || fn.contains('EXTENDED') || fn.contains('extended.cut') ? ' (Extended)' : fn.contains('Special Edition') || fn.contains('SPECIAL EDITION') || fn.contains('SPECIAL.EDITION') ? ' (Special Edition)' : fn.contains('Unrated') || fn.contains('UNRATED') ? ' (Unrated)' : fn.contains('Uncensored') || fn.contains('UNCENSORED') ? ' (Uncensored)' : fn.contains('Remastered') || fn.contains('REMASTERED') ? ' (Remastered)':""}{" Part $pi"}{" [$vf $vc $ac $af]"}
-----------------------------------------------------------------------------------------------------------------------------

TV Shows:
Includes:
  • Season Based Folders & Episode Numbering
    All names converted to Title Case (should re-capatalise Roman numerals in most situations though)
    Includes full show name and episode title
    Replaces invalid characters from file and folder name
    Shows year and rating in the folder name, then organises episodes based on season or specials
    Includes video resolution, video and audio codec, and audio channel info in the file name
    Retains tags for 3D, Extended, Uncut, Remastered, Unrated, Uncensored & Special Edition references
Examples:
\\mynas\media\TV Shows\Pushing Daisies (2007 TV-PG)\Season 01\Pushing Daisies S01E01 Pie-Lette [360p XviD MP3 2ch].avi
\\mynas\media\TV Shows\Slap, The (2011 TV-MA)\Season 01\Slap, The S01E01 Hector [360p XviD MP3 2ch].avi
\\mynas\media\TV Shows\Straits, The (2012)\Season 01\Straits, The S01E01-E02 Proposition & The Trouble With Raskols, The [360p XviD MP3 2ch]
\\mynas\media\TV Shows\Looney Tunes (1930)\Season 1943\Looney Tunes S1943E01 Coal Black And De Sebben Dwarfs [240p MPEG MPEG Audio 2ch].mpeg

Code: Select all

//mynas/media/TV Shows/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/ Ii/, " II").replaceAll(/ IIi/, " III").replaceAll(/ Iv /, " IV ").replaceAll(/ Vi /, " VI ").replaceAll(/ Vii/, " VII").replaceAll(/ Viii/, " VIII").replaceAll(/ Ix/, " IX").replaceAll(/ Xii/, " XII").replaceAll(/ XIIi/, " XIII").replaceAll(/ Xiv/, " XIV").replaceAll(/ Xv/, " XV").replaceAll(/ Xvi/, " XVI").replaceAll(/ Xvii/, " XVII").replaceAll(/ Xviii/, " XVIII").replaceAll(/ Xix/, " XIX").replaceAll(/ Xx/, " XX").replaceAll(/ Xxx/, " XXX").replaceAll(/1St/, "1st").replaceAll(/2Nd/, "2nd").replaceAll(/3Rd/, "3rd").replaceAll(/4Th/, "4th").replaceAll(/5Th/, "5th").replaceAll(/6Th/, "6th").replaceAll(/7Th/, "7th").replaceAll(/8Th/, "8th").replaceAll(/9Th/, "9th").replaceAll(/0Th/, "0th").replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{imdb.certification}{certification}.replaceAll(/^\d+$/, 'PG-$0')})/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{norm(n)} {episode.special ? 'S00E'+special.pad(2) : s00e00} {norm(t)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{fn.contains('Extended') || fn.contains('EXTENDED') || fn.contains('extended.cut') ? ' (Extended)' : fn.contains('Special Edition') || fn.contains('SPECIAL EDITION') || fn.contains('SPECIAL.EDITION') ? ' (Special Edition)' : fn.contains('Unrated') || fn.contains('UNRATED') ? ' (Unrated)' : fn.contains('Uncensored') || fn.contains('UNCENSORED') ? ' (Uncensored)' : fn.contains('Remastered') || fn.contains('REMASTERED') ? ' (Remastered)':""}{" Part $pi"}{" [$vf $vc $ac $af]"}
-----------------------------------------------------------------------------------------------------------------------------

Anime:
Includes:
  • Absolute Episode Numbering (2 or 3 digits, auto calculating)
    All names converted to Title Case (should re-capatalise Roman numerals in most situations though)
    List both Primary & Alternate Title (i.e. English & Japanese) if different, and includes full episode title
    Moves the 'The's to the end
    Replaces invalid characters from file and folder name
    Shows year and rating in the folder name
    Includes video resolution, video and audio codec, and audio channel info in the file name
    Retains tags for 3D, Extended, Uncut, Remastered, Unrated, Uncensored & Special Edition references
Examples:
\\mynas\media\Anime\Blade Of The Immortal (Mugen No Juunin) (2008)\Blade Of The Immortal - 01 - Criminal [576p x264 AAC 2ch].mp4
\\mynas\media\Anime\Freezing (2011 N A)\Freezing - 01 - Untouchable Queen (Uncensored) [720p x264 AAC 2ch].mkv
\\mynas\media\Anime\One Piece (1999 TV-PG)\One Piece - 001 - I'm Luffy! The Man Who's Gonna Be King Of The Pirates! [480p XviD MP3 2ch].avi
\\mynas\media\Anime\Eternal Aseria, The [Eien No Aseria] (2005)\Eternal Aseria, The - 01 - Voice Of Motome [480p XviD MP3 2ch].avi

Code: Select all

//mynas/media/Anime/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/ Ii/, " II").replaceAll(/ IIi/, " III").replaceAll(/ Iv /, " IV ").replaceAll(/ Vi /, " VI ").replaceAll(/ Vii/, " VII").replaceAll(/ Viii/, " VIII").replaceAll(/ Ix/, " IX").replaceAll(/ Xii/, " XII").replaceAll(/ XIIi/, " XIII").replaceAll(/ Xiv/, " XIV").replaceAll(/ Xv/, " XV").replaceAll(/ Xvi/, " XVI").replaceAll(/ Xvii/, " XVII").replaceAll(/ Xviii/, " XVIII").replaceAll(/ Xix/, " XIX").replaceAll(/ Xx/, " XX").replaceAll(/ Xxx/, " XXX").replaceAll(/1St/, "1st").replaceAll(/2Nd/, "2nd").replaceAll(/3Rd/, "3rd").replaceAll(/4Th/, "4th").replaceAll(/5Th/, "5th").replaceAll(/6Th/, "6th").replaceAll(/7Th/, "7th").replaceAll(/8Th/, "8th").replaceAll(/9Th/, "9th").replaceAll(/0Th/, "0th").replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{imdb.certification}{certification}.replaceAll(/^\d+$/, 'PG-$0')})/{norm(n)} - {absolute.pad(episodelist.size() < 99 ? 2 : 3)}{'Special '+special.pad(episodelist.size() < 99 ? 2 : 3)} - {norm(t)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{fn.contains('Extended') || fn.contains('EXTENDED') || fn.contains('extended.cut') ? ' (Extended)' : fn.contains('Special Edition') || fn.contains('SPECIAL EDITION') || fn.contains('SPECIAL.EDITION') ? ' (Special Edition)' : fn.contains('Unrated') || fn.contains('UNRATED') ? ' (Unrated)' : fn.contains('Uncensored') || fn.contains('UNCENSORED') ? ' (Uncensored)' : fn.contains('Remastered') || fn.contains('REMASTERED') ? ' (Remastered)':""}{" Part $pi"}{" [$vf $vc $ac $af]"}
-----------------------------------------------------------------------------------------------------------------------------

Note: It kind of goes without saying, but be sure to replace '//mynas/media/' and what not with the path to wherever you're storing all your stuff.


Basically, I started with the Movie code, and then tweaked for the shows and everything. I'm sure that Red will probably have a mild heart-attack once he see's how long winded I've done everything (and will inevitably be able to produce some ~25 character magical string that instantly renders 1/3 of what I've got there redundant lol), but hey.. hopefully this proves to be a solid starting point for people to work with. :-)

Good luck, happy renaming, and let me know how you fair with it. If you run into any problems, please let me know.

Cheers,

~Ithiel


MINIMUM VERSION REQUIREMENTS: You must have at least filebot-3.8-r1950 (released 2013/12/28) for the above to function properly. ^.^

Schemes have since been updated - See Note: http://www.filebot.net/forums/viewtopic ... 7490#p7490

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 28 Dec 2013, 15:32
by rednoah
I'm sure that Red will probably have a mild heart-attack
Hahaha, this is so funny, because it's true! :ugeek:


So here's some general tips Groovy Tips & Tricks:

1. Regex/Replace function can be a Groovy Closure:

Code: Select all

{n.replaceAll(/\b[IiVvXx]+\b/, { it.upper() })}

Code: Select all

{n.replaceAll(/\b[0-9](?i:th|nd)\b/, { it.lower() })}
2. You might be able to grab multiple tags with a single regex:

Code: Select all

{'(' + fn.matchAll(/uncensored|remastered|unrated/)*.upperInitial()*.lowerTrail().sort().join(', ') + ')'}

Though feel free to just copy & paste Ithiel code cause as long as it works why bother with making it shorter. :D

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 28 Dec 2013, 16:54
by Doomguard
Thanks a lot for your super crazy naming scheme. :D i personally love it a lot.

However,

i cant rename this properly, [HorribleSubs] Kuroko's Basketball 2 - 37 [720p].mkv

using anidb database.

it will just goes to season 1 ( 2012 ) and rename according to season 1 database

what can i do? amc script rename just fine to (season 2) folder.

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 28 Dec 2013, 17:17
by rednoah
Different issue. AniDB doesn't have the concept of 'season'. The format can only format an Episode, if the matched Episode is wrong in the first place nothing the format can do about that.

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 28 Dec 2013, 22:34
by Ithiel
Hi Doom,

you mean this one? http://anidb.net/perl-bin/animedb.pl?sh ... e&aid=9603

Be sure you use the anime (not the tv episode) naming scheme (entered in 'Episodes') and then hold shift while pressing the AniDB button to have it run the lookup.

when the input box appears (holding shift means "let me tell you what to search for"), enter this:
Kuroko no Baske (2013)

Often, if the second season doesn't have its own unique name, AniDB will identify a 'season 2' with the year it aired.

Let me know if that works :-)

P.s. You may also have to set the option for episode numbering method to absolute (although be sure to change it back to airing order once done, or tv shows will go all funky).

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 29 Dec 2013, 05:30
by Ithiel
Righto, so that Red doesn't die quite as much inside when he looks at my renaming scheme, I've taken his advise and optimised things a little: :-)

-----------------------------------------------------------------------------------------------------------------------------

Movies:

Code: Select all

//mynas/media/Movies/{collection.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).replaceFirst(/^(?i)(Collection of the)\s(.+)/, /$2 Collection/).replaceAll(/Saga Collection/, "Saga").replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ")}\{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{imdb.certification}{certification}.replaceAll(/^\d+$/, 'PG-$0')})/{norm(n)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|special[ ._-]edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[.]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}
-----------------------------------------------------------------------------------------------------------------------------

TV Shows:

Code: Select all

//mynas/media/TV Shows/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{imdb.certification}{certification}.replaceAll(/^\d+$/, 'PG-$0')})/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{norm(n)} {episode.special ? 'S00E'+special.pad(2) : s00e00} {norm(t)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|special[ ._-]edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[.]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}
-----------------------------------------------------------------------------------------------------------------------------

Anime:

Code: Select all

//mynas/media/Anime/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{imdb.certification}{certification}.replaceAll(/^\d+$/, 'PG-$0')})/{norm(n)} - {absolute.pad(episodelist.size() < 99 ? 2 : 3)}{'Special '+special.pad(episodelist.size() < 99 ? 2 : 3)} - {norm(t)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|special[ ._-]edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[.]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}
-----------------------------------------------------------------------------------------------------------------------------

Now, this should still do everything that the earlier version, but it's a little less wordy and should better handle any files that are multiple 'special types' (i.e. if it's extended, remastered, unrated, and uncensored all at the same time or something spastic like that). From the tests I've run, it also seems to handle roman numerals a little better as well.

As always, if you run into any problems, please let me know... so that I can ask Red how to fix it :-P

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 29 Dec 2013, 05:48
by rednoah
I guess he's looking for "Kuroko's Basketball 2nd Season" which doesn't exist on AniDB yet, no episode data, not even a series entry. Wait a few months before you rename it. ;)

EDIT: Oh! They call it "Kuroko no Baske (2013)" and "Kuroko no Baske" as two different shows. Yeah, that kinda stuff can't be helped, it's even tricking the humans. :P

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 29 Dec 2013, 07:51
by Doomguard
It does exist but my kuroko no baske named in the form of kuroko's basketball 2 episode 37.

This make the anidb think that it is still on season 1 as there is no record in anidb which they do have but name in kuroko no baske 2013.

Hence i guess there nothing we can do except for manually choosing the correct anime. :)

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 29 Dec 2013, 10:21
by Ithiel
Hi Doom,

"Kuroko's Basketball Season 2" (http://thetvdb.com/?tab=season&seriesid ... 6308&lid=7)
[Ep 1 - I Never Thought We'd Meet Here]

is on anidb.net as:

"Kuroko no Baske (2013)" (http://anidb.net/perl-bin/animedb.pl?sh ... e&aid=9603)
[Ep 1 - I Never Thought We`d Meet Here]

You need to specifically have it search for it with the (2013) at the end, as that's the name it's given season 2. After holding shift as you click the option to manually select what FileBot should search via anidb.net for, type in "Kuroko no Baske (2013)" into the input box (without quotes), and it should find the proper thing. If you run into problems, put the episodes you're trying to rename in a folder called "Kuroko no Baske (2013)" and select the whole folder FileBot. :-)

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 05 Jan 2014, 22:53
by Ithiel
Most up to date version of this naming scheme can be found here:

GitHub Repository (always the most up to date):
Movies: https://raw.github.com/CapriciousSage/s ... movies.txt
Anime: https://raw.github.com/CapriciousSage/s ... /anime.txt
TV Shows: https://raw.github.com/CapriciousSage/s ... _shows.txt

Main 'share your schemes' thread:
http://www.filebot.net/forums/viewtopic ... 7320#p7320

If you run into any problems with the scheme, please feel free to raise them in this thread. :-)

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 09 Feb 2014, 09:35
by Whispering Klaxon
This is awesome! Thanks Ithiel, thanks Red :)

I just wish I could make it work, in CLI or script, on Mac.

I started in the FileBot GUI, where it produced dodgy output paths until I changed the first "\{norm" to "/{norm" (because Mac).

So then I got Hazel to call amc using Ithiel's kick-ass naming scheme, like this:

Code: Select all

filebot -script fn:amc --log-file amc.log --action copy -non-strict "$1" --conflict override --def music=n subtitles=en artwork=y  backdrops=y clean=n minLengthMS=180,000 plex=minion "movieFormat=/Volumes/Cinema/Cinema/{collection.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).replaceFirst(/^(?i)(Collection of the)\s(.+)/, /$2 Collection/).replaceAll(/Saga Collection/, "Saga").replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ")}/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{certification}{imdb.certification}.replaceAll(/^\d+$/, 'PG-$0')})/{norm(n)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}" "seriesFormat=/Volumes/TV/Television/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{certification}{imdb.certification}.replaceAll(/^\d+$/, 'PG-$0')})/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{norm(n)} {episode.special ? 'S00E'+special.pad(2) : s00e00} {norm(t)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}" "animeFormat=/Volumes/TV/Anime/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{certification}{imdb.certification}.replaceAll(/^\d+$/, 'PG-$0')})/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{norm(n)} {episode.special ? 'S00E'+special.pad(2) : s00e00} {norm(t)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}"
But Hazel's log sez

Error: Select all

 Shell script failed: Error processing shell script on file /Volumes/Cinema Backup/cinema test/The Hunger Games 2012 720p BluRay x264-MgB.mp4.
hazelworker[442] Shellscript exited with non-successful status code: 2[/quote]

Which (according to the googles) means:
[quote]2	|	Misuse of shell builtins (according to Bash documentation)	|	empty_function() {}	|	Missing keyword or command[/quote]


So I tried it from the command line:
[code]filebot -script fn:amc --log-file amc.log --action copy -non-strict "/Volumes/Cinema Backup/cinema test/The Hunger Games 2012 720p BluRay x264-MgB.mp4" --conflict override --def music=n subtitles=en artwork=y  backdrops=y clean=n minLengthMS=180,000 plex=minion "movieFormat=/Volumes/Cinema/Cinema{collection.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).replaceFirst(/^(?i)(Collection of the)\s(.+)/, /$2 Collection/).replaceAll(/Saga Collection/, "Saga").replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ")}/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{certification}{imdb.certification}.replaceAll(/^\d+$/, 'PG-$0')})/{norm(n)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}" "seriesFormat=/Volumes/TV/Television{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{certification}{imdb.certification}.replaceAll(/^\d+$/, 'PG-$0')})/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{norm(n)} {episode.special ? 'S00E'+special.pad(2) : s00e00} {norm(t)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}" "animeFormat=/Volumes/TV/Anime{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{certification}{imdb.certification}.replaceAll(/^\d+$/, 'PG-$0')})/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{norm(n)} {episode.special ? 'S00E'+special.pad(2) : s00e00} {norm(t)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}"[/code]

But terminal does nothing - and if I hit the up arrow key to show the previous command, it only shows this:
[code]> filebot -script fn:amc --log-file amc.log --action copy -non-strict "/Volumes/Cinema Backup/cinema test/The Hunger Games 2012 720p BluRay x264-MgB.mp4" --conflict override --def music=n subtitles=en artwork=y  backdrops=y clean=n minLengthMS=180,000 plex=minion "movieFormat=/Volumes/Cinema/Cinema{collection.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).replaceFirst(/^(?i)(Collection of the)\s(.+)/, /$2 Collection/).replaceAll(/Saga Collection/, "Saga").replaceAll(/[`´[/code]

I've tried several variants here, and the truncated command shown when I up-arrow always ends with "replaceAll(/[`´"

So I tried from the command line without amc:
[code]filebot -rename "/Volumes/Cinema Backup/cinema test/The Hunger Games 2012 720p BluRay x264-MgB.mp4" --format "/Volumes/Cinema/Cinema/{collection.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).replaceFirst(/^(?i)(Collection of the)\s(.+)/, /$2 Collection/).replaceAll(/Saga Collection/, "Saga").replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ")}/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{certification}{imdb.certification}.replaceAll(/^\d+$/, 'PG-$0')})/{norm(n)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}"[/code]

But Terminal sez:
[quote]-bash: syntax error near unexpected token `('[/quote]

Which means that I'm at my wits end.

Has anyone got this working on Mac? All advice or suggestions gratefully received!

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 16 Feb 2014, 08:05
by Ithiel
Hi Whispering Klaxon,

Unfortunately, I am highly allergic to Macs.. or they're highly allergic to me.. I'm not sure - either way, whenever I touch a Mac, one of us bursts into flames. It's a very peculiar medical condition :-/

Something that might help you though is this AMC guide for Transmission on a Mac... Hopefully it might shed some insight onto your issue and help point you in the right direction?

[GUIDE] Fully Automated Media Center with Transmission (Mac)

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 20 Feb 2014, 11:51
by Whispering Klaxon
Thanks Ithiel, I'll give that another try when I have a chance.

I'm pretty sure something is being mis-parsed or mis-escaped in the environments I'm most unable to debug it. Sigh.

I empathise with your Mac allergy. I have a similar thing with Windows; convulsions, spasms, cold sweats… which is quite a strong reaction for a machine not even equipped with sweat glands :-∫

-wk

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 09 Mar 2014, 03:07
by Whispering Klaxon
In the end I gave up on the super crazy scheme. I have my own quite nutty scheme almost working how I want it to.

Given the weeks and hours I've sunk into making filebot work, I'm calling it good enough and walking away with the tattered threads of my sanity.

Thanks for your help.

RedNoah's Escape tool http://www.filebot.net/forums/viewtopic.php?f=4&t=1041 was invaluable.

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 07 Apr 2014, 22:57
by spikedzombies
Hey Ithiel i love the renaming scheme your using.. but im kinda stuck on using periods instead of spacing..

what would I have to change in order to use the . instead of a space in the file names?

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 12 May 2014, 18:22
by Tekki23
Hi, this is great but I keep getting the character \ before the new file name in my movie directory. I changed the expression to the following:

/Users/Tekki/media/Movies/{collection.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).replaceFirst(/^(?i)(Collection of the)\s(.+)/, /$2 Collection/).replaceAll(/Saga Collection/, "Saga").replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ")}\{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{certification}{imdb.certification}.replaceAll(/^\d+$/, 'PG-$0')})/{norm(n)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}

It would be great if someone could point me in the right direction with this as the bot keeps firing "invalid character" warningings when I try to rename.

cheers
tekki

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 02 Jun 2014, 05:36
by gijosh28
Hi Ithiel,

I am using the one from the github link. The only thing I have done different is remove the last $vc. I don't need it. But I would like to add one thing and I just don't know how. If I wanted it to put Disney movies in folders that start with [Disney]. Would that be possible?

For example, right now these three would come out like this:

Movies/A Bug's Life (1998 G)/A Bug's Life [1080p AAC 6ch]
Movies/Aladdin Collection/Aladdin (1992 G)/Aladdin [720p AC3 6ch]
Movies/Beauty and the Beast Collection/Beauty And The Beast (1991 G)/Beauty And The Beast [1080p WMA 6ch]

I'd like for them to come out like this:

Movies/[Disney] A Bug's Life (1998 G)/A Bug's Life [1080p AAC 6ch]
Movies/[Disney] Aladdin Collection/Aladdin (1992 G)/Aladdin [720p AC3 6ch]
Movies/[Disney] Beauty and the Beast Collection/Beauty And The Beast (1991 G)/Beauty And The Beast [1080p WMA 6ch]

Thanks,
Josh

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 29 Jun 2014, 09:40
by rednoah
Dear perfectionists,

I could use your input on a new standard binding for tags like uncut, remastered, etc ;)

@see http://www.filebot.net/forums/viewtopic.php?f=5&t=1774

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 22 Jul 2014, 19:21
by gijosh28
gijosh28 wrote:Hi Ithiel,

I am using the one from the github link. The only thing I have done different is remove the last $vc. I don't need it. But I would like to add one thing and I just don't know how. If I wanted it to put Disney movies in folders that start with [Disney]. Would that be possible?

For example, right now these three would come out like this:

Movies/A Bug's Life (1998 G)/A Bug's Life [1080p AAC 6ch]
Movies/Aladdin Collection/Aladdin (1992 G)/Aladdin [720p AC3 6ch]
Movies/Beauty and the Beast Collection/Beauty And The Beast (1991 G)/Beauty And The Beast [1080p WMA 6ch]

I'd like for them to come out like this:

Movies/[Disney] A Bug's Life (1998 G)/A Bug's Life [1080p AAC 6ch]
Movies/[Disney] Aladdin Collection/Aladdin (1992 G)/Aladdin [720p AC3 6ch]
Movies/[Disney] Beauty and the Beast Collection/Beauty And The Beast (1991 G)/Beauty And The Beast [1080p WMA 6ch]

Thanks,
Josh
Bump... anyone have a way to do this?

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 18 Sep 2014, 22:35
by Urlryn
Hey Guys,

Love the scheme Ithiel! I just started useing filebot and i'm curious on the Anime one...... where you would add the option to limit the titles to the 100 character limit or less?

I'm looking through it trying to figure it out but my attempts always fail lol.

Also another issue i tend to see is the alternate name is exactly the same as the primary...anyway to exclude those? I just manually delete them but if it could be done then great.

Thanks again.

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 30 Dec 2014, 13:46
by fattony
Hi, first post here so firstly i would like to say thank you so much to the developers/contributors to filebot
I spent many days trying & failing to achieve a file rename solution for xbmc until i finally stumbled on this little beauty.

Now to my new headache,

I am trying to get ithiel's renaming scheme to work via command line on linux in combination with filebot -script fn:amc
Here's the code i tried within a executable script "filebot.sh"

Code: Select all

filebot -script fn:amc "/xbmc/test/processing" --output "/xbmc/test" --log-file amc.log --action move --conflict skip -non-strict --def unsorted=y --def subtitles=en --def deleteAfterExtract=y --def clean=y --def excludeList=amc_processed.txt --def "movieFormat=Movies/{collection.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).replaceFirst(/^(?i)(Collection of the)\s(.+)/, /$2 Collection/).replaceAll(/Saga Collection/, "Saga").replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ")}\{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{imdb.certification}{certification}.replaceAll(/^\d+$/, 'PG-$0')})/{norm(n)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|special[ ._-]edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[.]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}" --def "seriesFormat=TV Shows/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{imdb.certification}{certification}.replaceAll(/^\d+$/, 'PG-$0')})/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{norm(n)} {episode.special ? 'S00E'+special.pad(2) : s00e00} {norm(t)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|special[ ._-]edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[.]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}"
This is the output from terminal

Code: Select all

drew@NAS:~$ /home/drew/filebot.sh 
/home/drew/filebot.sh: line 1: syntax error near unexpected token `('
/home/drew/filebot.sh: line 1: `filebot -script fn:amc "/xbmc/test/processing" --output "/xbmc/test" --log-file amc.log --action move --conflict skip -non-strict --def unsorted=y --def subtitles=en --def deleteAfterExtract=y --def clean=y --def excludeList=amc_processed.txt --def "movieFormat=Movies/{collection.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).replaceFirst(/^(?i)(Collection of the)\s(.+)/, /$2 Collection/).replaceAll(/Saga Collection/, "Saga").replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ")}\{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{imdb.certification}{certification}.replaceAll(/^\d+$/, 'PG-$0')})/{norm(n)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|special[ ._-]edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[.]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}" --def "seriesFormat=TV Shows/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{imdb.certification}{certification}.replaceAll(/^\d+$/, 'PG-$0')})/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{norm(n)} {episode.special ? 'S00E'+special.pad(2) : s00e00} {norm(t)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|special[ ._-]edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[.]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}"'

I would be very grateful if someone would be willing to help & give some pointers.

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 30 Dec 2014, 17:34
by rednoah
Do things the smart way:
viewtopic.php?f=4&t=1041#p9794

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 30 Dec 2014, 21:46
by fattony
Thanks rednoah, if only I was smart.

Tried your suggestion from viewtopic.php?f=4&t=1041#p9794 with no luck.

I created a text file amc.arguments & formatted it similar to the screen shot in your linked thread

Code: Select all

-script
fn:amc
/xbmc/test/processing
--output
/xbmc/test
--log-file
amc.log
--action
move
--conflict
skip
-non-strict
--def
unsorted=y
subtitles=en
deleteAfterExtract=y
clean=y
excludeList=amc_processed.txt
I then run...
cat amc.arguments &
cat amc.arguments | tr '\n' '\0' | xargs -0 filebot
this was the output from terminal
Screen Shot 2014-12-30 at 21.19.01.png
Thanks again

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 01 Jan 2015, 17:52
by rednoah
There is SPACE characters in your amc.arguments file, which of course gets passed in as part of the argument.

"-script " is not a valid option, while "-script" is. Got it?

Re: Ithiel's super crazy renaming scheme for perfectionists!

Posted: 17 Jan 2015, 20:37
by elgallo
Whispering Klaxon wrote:In the end I gave up on the super crazy scheme. I have my own quite nutty scheme almost working how I want it to.

Given the weeks and hours I've sunk into making filebot work, I'm calling it good enough and walking away with the tattered threads of my sanity.

Thanks for your help.

RedNoah's Escape tool http://www.filebot.net/forums/viewtopic.php?f=4&t=1041 was invaluable.
messing around with Ithiel's format I ended up removing all the

Code: Select all

fn.3D
references and deleted all after

Code: Select all

{norm(t)}
did the trick. besides has anyone ever seen/downloaded a 3D show? plus theres no need for uncut/unrated etc for TV shows. did the same for anime and got it to work on a Mac. hope it helps.