Feature Request: Script Converter between GUI/CLI and Windows/Linux versions.

All your suggestions, requests and ideas for future development
Post Reply
DevXen
Power User
Posts: 164
Joined: 12 Oct 2014, 21:15

Feature Request: Script Converter between GUI/CLI and Windows/Linux versions.

Post by DevXen »

Maybe an option or a separate mini program to convert my GUI script to a CLI Script. also maybe allow it to switch between Windows CLI and Linux CLI.

I just recently installed unraid and i get the feeling a CLI version of my scripts would be much more useful. but my scripts haven't very easily translated over to a workable CLI. - so a small converter would be awesome.


Thanks,
-Dev
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Feature Request: Script Converter between GUI/CLI and Windows/Linux versions.

Post by rednoah »

1.
By "GUI scripts", do you mean format expressions? or Presets? or something else?


2.
What exactly is giving you a hard time? Where are you stuck?
:idea: Please read the FAQ and How to Request Help.
DevXen
Power User
Posts: 164
Joined: 12 Oct 2014, 21:15

Re: Feature Request: Script Converter between GUI/CLI and Windows/Linux versions.

Post by DevXen »

I meant format expressions. I haven't tried to do it in a while but when I took my format expressions and moved it to the filebot docker on unRAID it had several errors so I actually installed a windows 10 VM on it just to use filebot cause of that issue.


And presets? What? How did I not know that was a thing. I was looking at the post you linked. I think that might come in pretty useful.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Feature Request: Script Converter between GUI/CLI and Windows/Linux versions.

Post by rednoah »

Well, in that case it's just copy & paste:

1. Open FileBot Format Editor ➔ CTRL+A / CTRL+C
2. Open a text editor ➔ CTRL+V ➔ Save as MyMovieFormat.groovy
3. Call filebot with --format /path/to/MyMovieFormat.groovy


:idea: You can also just use /path/to/MyMovieFormat.groovy as format in the Format Editor, if you prefer editing your format via your preferred code editor.
:idea: Please read the FAQ and How to Request Help.
DevXen
Power User
Posts: 164
Joined: 12 Oct 2014, 21:15

Re: Feature Request: Script Converter between GUI/CLI and Windows/Linux versions.

Post by DevXen »

I think the problem with the Linux was the format of the expression since I use many csv files for checks and changes. I would assume they paths of those were an issue but I'm not sure. I just know when I tried to paste it as a cki it didn't like it.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Feature Request: Script Converter between GUI/CLI and Windows/Linux versions.

Post by rednoah »

DevXen wrote: 20 Oct 2019, 01:46 I use many csv files.
Well, this requirement effectively makes the OP impossible, since you'd probably have modify the absolute file paths and make them point to corresponding files on the Linux machine.

In this case, having a single very large *.groovy format file that includes both format code and related csv data, and use that in both GUI and CLI, might be a good idea.
:idea: Please read the FAQ and How to Request Help.
DevXen
Power User
Posts: 164
Joined: 12 Oct 2014, 21:15

Re: Feature Request: Script Converter between GUI/CLI and Windows/Linux versions.

Post by DevXen »

Oh my csv files are all in the same place. So changing the relative path for Linux shouldn't be a problem. I was thinking there were other os specific issues I'll try it again and see exactly what it does when I can.

Also didn't know I could put the csv data in a groovy file. Though that might make it more difficult to update. It might definitely be worth looking into. Thank you.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Feature Request: Script Converter between GUI/CLI and Windows/Linux versions.

Post by rednoah »

Well, the csv function gives you a Map object, so you can of course define the same Map object in code directly as well.


:idea: If you use groovy files, there's no longer a 8K format length limit either.
:idea: Please read the FAQ and How to Request Help.
DevXen
Power User
Posts: 164
Joined: 12 Oct 2014, 21:15

Re: Feature Request: Script Converter between GUI/CLI and Windows/Linux versions.

Post by DevXen »

I didn't know there was a format format length.
Groovy is sounding better. So in theory I should be able to copy my format to. Groovy file. And fix the csv paths and it should work either with the gui or the cli in unraid? Or would that be just for the cli?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Feature Request: Script Converter between GUI/CLI and Windows/Linux versions.

Post by rednoah »

It'll work for all instances of FileBot. Internally, it's the same engine that evaluates your format expressions, and works the same on all platforms.
:idea: Please read the FAQ and How to Request Help.
DevXen
Power User
Posts: 164
Joined: 12 Oct 2014, 21:15

Re: Feature Request: Script Converter between GUI/CLI and Windows/Linux versions.

Post by DevXen »

Awesome I'll mess with that tomorrow. See what I can do. I appreciate all your help.
Post Reply