Help with FileBot and Hazel please !

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
magefesa
Posts: 8
Joined: 28 Feb 2014, 09:50

Help with FileBot and Hazel please !

Post by magefesa »

Hi !
I m trying to recover subs via Hazel using this command :

filebot -get-subtitles "$1" --lang en --output srt --encoding utf8 -non-strict

All gets ok, but i need to know if the subtitle has been found or not, i mean, when a sub is not found i need a command flag "false" or "0" return, and actually it returns a a large string "No matches found:xxxxxxxx"

Could somebody help me ??

The idea is to do something like this in Sheel script and Hazel :

k=$(filebot -get-subtitles "$1" --lang en --output srt --encoding utf8 -non-strict)

if ($k=0) then
exit 1
else
exit 0
fi

Thanks in advance !
User avatar
rednoah
The Source
Posts: 23924
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help with FileBot and Hazel please !

Post by rednoah »

I guess you could simply have your shell script parse the output and then return the appropriate error code for Hazel.
:idea: Please read the FAQ and How to Request Help.
Post Reply