-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep track of files that have already been compressed #549
Comments
Hm, I understand your issue but this seems like an incredibly niche feature which I would say falls out of scope of what oxipng should be providing. Can you explain your scenario a little more? Like, could you just run oxipng on a subset of your files at a time so you know where you're up to? |
I have run oxipng at my home folder yesterday, but it has take forever and I have abort it. Today I started it again, but it starts from the beginning. Because I have absolute no idea where it has stop I can not continue without starting from scratch. (It would also be a pain to define this per argument). Some thing like
I think this should also be possible. But it much more complicated and annoying . You do not know how long this would take and if you abort the process you still don not know where you have stop. You must also note/remember which files you have compress before. |
I would say this is how all png optimizers work. Handling of bulk jobs is normally done by a script / coded GUI, etc. ... Not sure it should be a core function here, due to portability and maintaining that extra code... |
Yeah, I hear the frustration but you should be able to script something yourself outside of oxipng. E.g. you could start by constructing a list of all your png files and then making a script to work through them. Or you could try only finding files modified before a given date, so as to exclude ones that were recently optimised (assuming Windows has some sort of I'm afraid I just don't agree that this should be built-in to oxipng. That is just my opinion though - @AlexTMjugador or @shssoichiro may have different ideas. [edit] Keeping track of a file queue is a feature you might expect from a GUI program such as FileOptimizer. Have you tried using this instead? |
I agree with @andrews05 and @ace-dent that this feature is out of scope for OxiPNG. In my opinion, tracking the progress of a batch optimization job is better suited to a script or higher level application with more context about the job, and I find the alternative approaches suggested by @andrews05 to be spot-on.
This statement made me curious as to why I think this is a substantially different scenario than that of OxiPNG: video sources can change at indeterminate times, and there are no good ways to keep track of changes to video sources outside of All in all, I think this feature would trade complexity on one side for another, in a way that I'm not sure OxiPNG would do better than a custom script. It's also not that hard to process a few PNG files at a time and record their names in a temporary file to resume the job if necessary. |
For anyone who wants this feature, feel free to grab and compile my branch: https://github.com/aaronfranke/oxipng/tree/cache-opt-files and then run
It really isn't much complexity. My branch accomplishes this in under a hundred lines of code (plus a dependency on the |
Just to comment further here: @aaronfranke It might be good if you could detail your specific use case here, just for reference. I'll stress again though, that this is not a direction we want to take oxipng in at this time. |
Let's say I have a folder of 100 PNG files. I may run |
I personal would prefer if the cache file stored at a user definded place. So it can be moved together with the pngs. |
FileOptimizer now supports oxipng 🙂 |
If the user has a slow pc or using a high compression, he might can not compress all images at once.
But after aborting it is not possible to continue at the last compressed image anymore.
So I would suggests adding an option to define an archive file (similar to youtube-dl) which store the path of all images, which where already compressed. This would make it possible to continue compressing where you have stopped.
I can implement this, if this feature is wanted.
The text was updated successfully, but these errors were encountered: