noob Mac Auto Folder help

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
elgallo
Posts: 40
Joined: 29 Apr 2014, 10:33

noob Mac Auto Folder help

Post by elgallo »

I've managed to get my AMC transmission-postprocess to finally work after some trial and error. It was a bit unique in that torrents are downloaded to Volume/downloads, then sorted into /Volumes/Media/Muzik, /Volumes/Media/TV and /Volumes/Video/M0vies. The screenshots were extremely helpful.


However in searching through the forum I am unable to find any visual examples or clear explanations on how to write a script/shell? what I'm trying to do is make a script that I can make Hazel.prefpane run when a folder meets X criteria (file Kind is Media, date last modified is not in the last 10 mins) to run embedded shell (same as script?) or open a script similar to transmission-postprocess.

I've tried

Code: Select all

#!/bin/bash
/Applications/FileBot.app/Contents/MacOS/filebot.sh -script fn:amc --output "/Volumes/path/to/watch/folder" --log-file amc.log --action copy --conflict override -non-strict --def deleteAfterExtract=y artwork=y subtitles=en clean=y backdrops=y "seriesFormat=/Volumes/Media/TV/{n.replaceTrailingBrackets()}/Season {s}/{n.replaceTrailingBrackets()} -S{s}E{e.pad(2)} - {t}" "movieFormat=/Volumes/Video/M0vies/{n} ({y})/{n} ({y}) [{certification}]" "musicFormat=/Volumes/Media/Muzik/{n}/{fn}"  plex=gallo clean=y
I end up with the following error in terminal
Locking /Users/gallo/.filebot/logs/amc.log
Parameter: deleteAfterExtract = y
Parameter: artwork = y
Parameter: subtitles = en
Parameter: clean = y
Parameter: backdrops = y
Parameter: seriesFormat = /Volumes/Media/TV/{n.replaceTrailingBrackets()}/Season {s}/{n.replaceTrailingBrackets()} -S{s}E{e.pad(2)} - {t}
Parameter: movieFormat = /Volumes/Video/M0vies/{n} ({y})/{n} ({y}) [{certification}]
Parameter: musicFormat = /Volumes/Media/Muzik\ to\ add\ to\ iTunes/{n}/{fn}
Parameter: plex = gallo
Parameter: clean = y
Exception: Conflicting arguments: pass in either file arguments or ut_dir/ut_file parameters but not both
Failure (°_°)
any suggestions on how to make this all work would be greatly appreciated
User avatar
rednoah
The Source
Posts: 23940
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: noob Mac Auto Folder help

Post by rednoah »

So what files would you like to process? You naturally need to pass in the files/folders you want to process.
:idea: Please read the FAQ and How to Request Help.
elgallo
Posts: 40
Joined: 29 Apr 2014, 10:33

Re: noob Mac Auto Folder help

Post by elgallo »

any file that I place in "/path/folder/to/watch" which would only be movies, TV shows or music.

I'm thinking I could just make it just a script to run and have Hazel worry about "watching the folder" in which case should I specify

Code: Select all

--input "/Users/myname/watchFolder"


which I presume would process any file in the folder once the script is told (by Hazel.prefpane) to run?
User avatar
rednoah
The Source
Posts: 23940
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: noob Mac Auto Folder help

Post by rednoah »

I don't know how Hazel works but you really just need to add cmdline arguments like with any other cmdline tool.
:idea: Please read the FAQ and How to Request Help.
Post Reply