trufanov-nok / scantailor-universal

ScanTailor Universal - a fork based on Enhanced+Featured+Master versions of ST
http://scantailor.org
Other
181 stars 16 forks source link

create project file by CLI #93

Closed femifrak closed 2 years ago

femifrak commented 3 years ago

I really like ST universe's CLI to automate editing. However, every now and then there is a need to manually revise some projects with GUI. Is there a possibility to edit a project edited first with CLI afterwards with GUI? Or in other words: Is it possible to create a project file with the CLI?

My intention is to save time for processing. Let's say all but one page was correctly processed by CLI. In this case using the GUI to process all pages again would be more time consuming than using the GUI only to alter this one page.

Or is there an even more elegant way?

trufanov-nok commented 3 years ago

I'm personally not using -cli version at all and it's quite outdated in terms of functionality. I'm not 100% sure how it works.
But I just looked into the code and realized that it can save project files. At least it's supposed to be able to do this. This functionality was inherited from Scan Tailor Enhanced fork.
The "-cli" version accepts the --output-project <project_file> key that should save the settings file just before it end its work. Please check if this option still works. If so, I'll add its description to a --help output.

trufanov-nok commented 3 years ago

If so, I'll add its description to a --help output.

It is in --help output:

...
 --end-filter=<1...6>                    -- default: 6
 --output-project=, -o=<project_name>
 --tiff-compression=<lzw|deflate|packbits|jpeg|none>     -- default: lzw
...
femifrak commented 3 years ago

sorry, it did not realize that it already exists. Thanks for pointing me to this. Opening the project file works, great. However, it is not listed and cannot be selected in the GUI if the file name extension is not .ScanTailor. It is not directly obvious that this extension is needed. If possible, I would suggest to add this extension automatically in the cli-version if the user does not provide it.