feat: checkbox for cleaning input dirs (#7) #11
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This update adds a checkbox to the main window. If checked, it cleans up all the files in input directories (
decensor_input/and alsodecensor_input_original/in case if it deals with mosaic censorship).Similar to what we had in #7 (credits to @ghost), but as a checkbox.
And it cleans only input directory, not decensor_ouput (cause i'm not really sure about how to design it, i mean i can add a button like "Remove all pictures in
decensor_output/", but it's purpose would be quite obscure; maybe we should rather add setting output directory via UI).CC: @naphteine
MainWindowto enable cleaning input directories after processing images.clean_up_input_dirsflag attribute inDecensorclass to manage the cleanup operation.clean_input_directories()method inDecensorto remove.png,.jpg, and.jpegfiles from input directories.do_post_jobs()method being called after decensoring process is completed (later we can put here any other logic for post-processing as well).clean_up_input_dirsvia a signal emitted fromMainWindow.