AMC Script: problems with escaping seriesformat
Posted: 16 Sep 2013, 20:59
Hi,
first of all thanks for this great piece of software!
I'm trying to setup the amc script with my usual renaming pattern. Unfortunately I'm strugging with the escaping of the special characters (I'm not an linux expert):
environment:
I'm using the latest version of FileBot (3.62) with the newest amc script.
Pattern (that works perfectly in the GUI):
Command Line:
Unfortunately it doesn't work.
Output is:
I tried to find an automated online tools that can help with the correct escaping but without success.
Any help is very much appreciated!
Thanks in advance,
Marcus
first of all thanks for this great piece of software!
I'm trying to setup the amc script with my usual renaming pattern. Unfortunately I'm strugging with the escaping of the special characters (I'm not an linux expert):
environment:
Code: Select all
ms@rv-linux:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.04
DISTRIB_CODENAME=raring
DISTRIB_DESCRIPTION="Ubuntu 13.04"
ms@rv-linux:~$ uname -a
Linux rv-linux 3.8.0-30-generic #44-Ubuntu SMP Thu Aug 22 20:52:24 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
ms@rv-linux:~$ java -version
java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.13.04.2)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
Pattern (that works perfectly in the GUI):
Code: Select all
/home/ms/videos/series/{n}/{n.replaceTrailingBrackets().replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'").lowerTrail()} - Season {s}/{n.replaceTrailingBrackets().replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'").lowerTrail()} - {s00e00} - {t.replaceTrailingBrackets().replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'").lowerTrail().replacePart(', Part $1')} ({airdate.format('yyyy-MM-dd')})
Command Line:
Code: Select all
#!/bin/bash
filebot.sh -script fn:amc "/home/ms/series_tosort/" --output "/home/ms/videos/series/" --def music=n --def subtitles=en,de --def clean=y --def "seriesFormat={n}/{n.replaceTrailingBrackets().replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, \"\'\").lowerTrail()} - Season {s}/{n.replaceTrailingBrackets().replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, \"\'\").lowerTrail()} - {s00e00} - {t.replaceTrailingBrackets().replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, \"\'\").lowerTrail().replacePart(\', Part $1\')} ({airdate.format(\'yyyy-MM-dd\')})" --log-file amc.log --action copy -non-strict
Output is:
Code: Select all
"-" is not a valid option
Any help is very much appreciated!
Thanks in advance,
Marcus