Skip to content

Directory Iteration and Recursion #69

@EmilianoJordan

Description

@EmilianoJordan

Is your feature request related to a problem? Please describe.
For some of my use cases it would be nice to be able to pass arguments/flags to iterate directories or recursively process images. This is, for the most part, for convenience. Most functionality can be done by the caller and and CLI. Python has glob, pathlib etc for accomplishing this from the caller. And the CLI could used something like this ls -R | grep '.jpeg\|.jpg' | xargs exif-stripper.

But it might still be worth implementing something in this package. I'd be happy to PR a full working example if you're open to that.

Describe the solution you'd like
I have a very rough proposal, The CLI would need updates to support the new function args but this should give an idea.

This does have some issues that will need to be addressed that I know of:

  1. symlinks: I added recurse_symlinks: bool = False but the similar Path().glob() arg did not get added until python 3.13. I think this functionality should be included in this (>=3.8).
  2. case sensitivity: very similar to symlinks but different.
  3. file suffixes: There might be better strategies than the white list one I went with.

Thanks for this package in the first place!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions