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
FILTER issues #705
Comments
I'm certain that conf.py FILTERS has no effect. I added a print command in the filters.py code and nothing was printed. I then added |
Filters aren't mentioned in the galleries code which could explain why I can't get it to run. |
Indeed it seems we are not applying filters to the galleries. Easy to fix, created #708 so this issue is just for the quoting problems. |
Since the galleries not running filters is now in #708 I think this issue can be closed. |
The conf.py says to use things like
"jpegoptim --strip-all -m75 -v %s"
whilst the handbook says to use filters.The conf.py example won't work correctly with spaces in the filenames or directories since there is no quoting of the
%s
going on. The own created filters do get passed single quoted filenames, although single quotes are perfectly valid filename characters on Linux, Mac and Windows. Double quotes aren't allowed on Windows. (One of my image files uses single quotes it turns out.) The real problem here is trying to useshell=True
to subprocess. I strongly recommend that shlex is used to get a list if a string is supplied toruninplace
and then replace whole tokens and run withoutshell=True
. That will always work no matter what the filenames.At one point my source images all ended up deleted but I haven't been able to reproduce that yet.
In any event the FILTERS didn't appear to work either way. There was no difference in the output/galleries total size with it enabled or commented out. Running jpegoptim manually on the output/galleries image files did give a reduction in size of several percent.
The text was updated successfully, but these errors were encountered: