Feature Request: CLI interactive mode

All your suggestions, requests and ideas for future development
Post Reply
Pator
Power User
Posts: 15
Joined: 04 Oct 2016, 07:29

Feature Request: CLI interactive mode

Post by Pator »

It would be great to have a
-i
--interactive
for the cli
to be asked before any action is taken

Possibility 1 (when filebot has aleady the destination file name)
(yes/no)?
n would be like test mode
y like the real modes

Possibility 2 (when filebot decides to skip due to multiple matches)
Chosen match (1), 2, 3, 4?
giving the choice to choose one among multiple matches (maybe with 1 as default)

Possibility 1b)
(yes/no/edit)
Give the chance to edit/retouch the final filename at the prompt.

I achieve something similar with a bash script that calls filebot twice (and twice dB query). But it is extremely inefficient and slow
Last edited by Pator on 23 Nov 2016, 16:28, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 23924
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Feature Request: CLI interactive mode

Post by rednoah »

--action test will give you non-interactive test mode. --q and --filter allow control matching. Running filebot repeatedly in test mode until it looks good is all the interaction you will need. FileBot does cache everything for a few days, so even if you call FileBot many times in a row it won't hit the database more than once.

You could easily build an interactive script around that though. As shell script it will indeed be a bit slow on older machines because it'll have to load Java/Groovy/FileBot multiple times, but this is not an issue if you write your interactive script in Groovy. This would definitely be something I'd merge into the repository.
:idea: Please read the FAQ and How to Request Help.
Pator
Power User
Posts: 15
Joined: 04 Oct 2016, 07:29

Re: Feature Request: CLI interactive mode

Post by Pator »

--mode test
--mode move
I used them both in my script
(Calling filebot twice) for reviewing before an action is taken (-q need to check). So yes, all is loaded twice, and TMDB is queried twice... per file!!! So all this is multiplied by hundreds.

The goal is to mass rename with one by one review, all from within amc without reinventing the wheel
User avatar
rednoah
The Source
Posts: 23924
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Feature Request: CLI interactive mode

Post by rednoah »

You could run --action test and parse all the input/output mappings and then just call mv A B for the ones you OK, or if you want the amc script to do the move operations, then you can just call the amc script with the files you OKed instead of the whole folder.

Making both filebot -rename and the amc script is completely out of the question. Scripts can call other scripts (e.g. the amc script calls the artwork and cleaner scripts internally) so you could save startup time there, but it's complex and not meant to be used this way, so there'll probably be many unexpected issues.


PS: best to identify the aspects of the amc script that you actually need and prevent you from using simple -rename calls because using the amc script is probably not a good idea for what you're trying to do


EDIT:

I played with making an interactive Terminal UI:
https://gist.github.com/rednoah/931cf41 ... c40628ad56

If you're interested in coding, then you can look into that. I only made a simple UI for Show History / Revert Selected though.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 23924
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Feature Request: CLI interactive mode

Post by rednoah »

FileBot r4603 supports --mode interactive which will switch into console-interactive mode at certain key points were making a manual selection or confirmation might make sense.

@see viewtopic.php?f=3&t=4398

Code: Select all

--mode interactive
Image
Image
:idea: Please read the FAQ and How to Request Help.
Post Reply