MarcusCemes/image-processing-pipeline

Option to clean directory before running image processing

marcfilleul opened this issue · 5 comments

Hi,

After using RIB successfully, I've managed to setup IPP and it works well too.

But there is a difference:

RIB was cleaning the output directory before running unless we add a --no-clean flag.
IPP doesn't seems to clean the output directory before running and I can't find any option to change that.

Is there any flag we can use to clean the output directory when running a pipeline?

Thanks in advance.

Hi Marc,

Such an option is not yet available 🙄

The recent efforts were focussed on redesigning the core to allow for much better customizability and versatility, allowing for new pipes and adapters. To support the new release, the CLI was quickly scaffolded with a new renderer but is still lacking many important features.

So bear with me, it has not been forgotten! The next phase is to improve and polish the CLI, including safe deletion mechanisms to avoid accidental deletion of important files in case of misspelt or badly-parsed cross-platform paths.

For now, I recommend either rm -r on Linux/macOS, del /S on Windows or rimraf using npm if possible.

Great thank you! I hadn’t thought of using rimraf but it will do the trick ;)

Well, if it can help others, I finally used del-cli because I already had it installed in my packages.

Hi Marc,

Check out version 1.2.0 of @ipp/cli, it has a new config option clean, which when set to true, removes the output directory prior to processing. Documentation will follow soon.

Just bear in mind it does not check if there are any important files that get removed, use with caution.

Great! Thank you.
Will check this ;)