| Crates.io | images_matching_subdirectories |
| lib.rs | images_matching_subdirectories |
| version | 0.1.0 |
| created_at | 2025-06-07 00:44:34.466318+00 |
| updated_at | 2025-06-07 00:44:34.466318+00 |
| description | Find images inside named subdirectories of a parent directory |
| homepage | https://github.com/rickprice/images_matching_subdirectories |
| repository | https://github.com/rickprice/images_matching_subdirectories |
| max_upload_size | |
| id | 1703623 |
| size | 19,509 |
A Rust command-line tool for finding image files within specified subdirectories of a given directory.
This tool recursively searches for image files in specified subdirectories and provides flexible output options including random sampling and compact formatting.
cargo build --release
cargo run -- <directory> <subdirectory1> [subdirectory2] ... [OPTIONS]
<directory>: The main directory to search in<subdirectory1> [subdirectory2] ...: Names of subdirectories within the main directory to search-l, --limit <NUMBER>: Maximum number of images to display (random selection)-n, --names-only: Print only image paths separated by spaces (suppresses other output)-h, --help: Print help informationFind all images in specific subdirectories:
cargo run -- /home/user/photos 2023 2024
Show only 5 randomly selected images:
cargo run -- /home/user/photos vacation work --limit 5
Get space-separated paths (useful for scripting):
cargo run -- /home/user/photos family events --names-only
Get 3 random image paths in compact format:
cargo run -- /home/user/photos 2023 2024 --limit 3 --names-only
Found 15 image(s):
/home/user/photos/2023/vacation1.jpg
/home/user/photos/2023/sunset.png
/home/user/photos/2024/birthday.gif
...
/home/user/photos/2023/vacation1.jpg /home/user/photos/2023/sunset.png /home/user/photos/2024/birthday.gif