Issue with syntax on Mac

All about user-defined episode / movie / file name format expressions
Post Reply
spk911
Posts: 4
Joined: 21 Jan 2018, 19:19

Issue with syntax on Mac

Post by spk911 »

Hello all,

I’m running the following: FileBot 4.7.9 (r4984) / Java(TM) SE Runtime Environment 1.8.0_121 / Mac OS X 10.12.6 (x86_64)

I want to use AMC with the default naming schemes but my main folders have different names than Movies and TV Shows, so I tried creating my own format based on AMC Default formats, which looks like this (I also got rid of the lang extensions and changed the name of Specials folder but I don’t think that’s relevant):

Code: Select all

filebot -script fn:amc --output "Media" --action move -non-strict "Downloads/Torrent" --log-file amc.log --def excludeList=amc.txt --def movieFormat="Filmy/{n} ({y})/{n} ({y})" seriesFormat="Serialy/{n}/{episode.special ? 'Season 00' : 'Season '+s.pad(2)}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replaceAll(/[`´‘’ʻ]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part $1')}" --def clean=y
The issue is that the AMC Default format (when defined explicitly) doesn’t run for me at all (even the original one copied from the forum). When I try to execute that in Terminal, it is just not doing anything, no error message etc. I have to restart the Terminal then. I tried leaving out parts of the format to find out which part causes the trouble and I found it’s:

Code: Select all

.replaceAll(/[`´‘’ʻ]/, /'/)
I know I probably have to add some characters to make it Mac compatible but I have to confess I don’t really understand the syntax of that particular example (why all the slashes?) so I can’t figure out what to add. Any hint please?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Issue with syntax on Mac

Post by rednoah »

/.../ is Groovy syntax for a String value:
http://groovy-lang.org/syntax.html#_slashy_string

If you're using the command-line then you need to consider command-line escaping as well:
viewtopic.php?f=4&t=1899


:idea: Use the @file syntax for reading command-line arguments from external text files so you don't have to worry about command-line escaping.
:idea: Please read the FAQ and How to Request Help.
Post Reply