Skip to content
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

[Enhancement] Recursive processing option #20

Open
shssoichiro opened this issue Jan 13, 2015 · 5 comments
Open

[Enhancement] Recursive processing option #20

shssoichiro opened this issue Jan 13, 2015 · 5 comments

Comments

@shssoichiro
Copy link

I would like to request a recursive (-R) option built into jpegoptim. I believe this would be very beneficial to the usefulness of the application. I do understand that recursive processing can be done using the "find -type f -name "*.jpg" -exec jpegoptim --strip-all {} ;" command. However, this has two issues:

  1. Requires advanced Linux terminal knowledge or using Google to find the command
  2. Does not work with the --totals option, since essentially it's running jpegoptim separately for each file
@TheLastGimbus
Copy link

TheLastGimbus commented Aug 19, 2022

As I see it, jpegoptim wants you to use wildcards etc

That is, just pass it: jpegoptim myDirectory/* for all files

or, if you have folder with files AND other folders with other files, just do: jpegoptim myDirectory/** for a recursive wildcard

jpegoptim will skip everything it can't do like pngs and movies 🤷

And it does work with --totals

@adampatterson
Copy link

Unfortunately that doesn't work

$ jpegoptim 2023/**

jpegoptim: skipping directory: 2023/01
jpegoptim: skipping directory: 2023/02
jpegoptim: skipping directory: 2023/03
jpegoptim: skipping directory: 2023/04
jpegoptim: skipping directory: 2023/05
jpegoptim: skipping directory: 2023/06

@TheLastGimbus
Copy link

But does it skip directory AND it's files, or maybe it just told you that it skipped a directory, but actually did the files in it?

@adampatterson
Copy link

But does it skip directory AND it's files, or maybe it just told you that it skipped a directory, but actually did the files in it?

Humm, I don't think so. It didn't output any messaging and had a couple gigs of images.

@benzkji
Copy link

benzkji commented Jan 8, 2024

can confirm that it does indeed skip and not processes anything in nested folders, even when using xy/**.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants