Page 1 of 1

Feature Request: batch return values

Posted: 20 Dec 2017, 12:12
by noviceiii
Dear all

Thank you for the enormous effort you put into filebot.
A great tool indeed!

I'd like to introduce an idea, based on a question I have raised earlier here. viewtopic.php?t=5536
(Sorry, if it would be possible already. Then I would be glad for guide line)

use case:
I can call filebot in scripts in windows or unix-like shell environments.
It allows me to store its return values into a variable or array for further processing.

Example usage:
returnvariable='filebot.....'
- or -
filebot -screen="returnvariable"


# my return
echo "PathFrom: $returnvariable[2]"
echo "PathTo: $returnvariable[3]"

Possible solution
Adding a new flag, maybe --def "batch" enables a new formating of the output. Or like putting the output directly into a variable like filebot -screen.

Greetings
Oliver

Re: Feature Request: batch return values

Posted: 20 Dec 2017, 15:02
by rednoah
AFAIK this is impossible.

But you're welcome to do some research on the topic and see if it's even possible for a process to return complex data structures for the bash interpreter.

PS: the Groovy scripting interfaces gives you exactly what you want, so if you have more complex processing needs, then FileBot/Groovy scripting is the way to go