Crates.io | imgorisort |
lib.rs | imgorisort |
version | 0.3.0 |
source | src |
created_at | 2020-07-06 16:06:26.121845 |
updated_at | 2020-07-18 09:00:30.035118 |
description | Quickly sort images into directories by orientation: tall, wide, and square. |
homepage | https://github.com/catleeball/image-orientation-sorter |
repository | https://github.com/catleeball/image-orientation-sorter |
max_upload_size | |
id | 262004 |
size | 58,371 |
Quickly sort images into directories by orientation: tall, wide, and square.
Supported filetypes:
This small tool's first release includes only the basic functionality: move images to direcotires named after their orientations.
Move images to 'tall', 'wide', and 'square' directories. Use --overwrite if these directories exist, and you want files with the same name to overwrite files in destination directories instread of appending a number to the name.
$ tree /path/to/images
/path/to/images
├── foo
│ └── square.jpg
├── portrait.jpg
└── landscape.jpg
$ imgorisort -r /path/to/images
Processed 3 files successfully.
$ tree /path/to/images
/path/to/images
├── foo
├── wide
│ └── landscape.jpg
├── tall
│ └── portrait.jpg
└── sqr
└── square.jpg
Rename images, adding 'tall', 'square', or 'wide' to the beginning of the filename.
Using --rename will not move images to new directories, in contrast to the above example.
$ tree /path/to/images
/path/to/images
├── foo
│ └── square.jpg
├── portrait.jpg
└── landscape.jpg
$ imgorisort -r --rename /path/to/images
Processed 3 files successfully.
$ tree /path/to/images
/path/to/images
├── foo
│ └── sqr_square.jpg
├── tall_portrait.jpg
└── wide_landscape.jpg
Run imgorisort --help
to see the usage text:
imgorisort 0.3.0
Image Orientation Sorter
USAGE:
imgorisort [FLAGS] <input-dir> [output-dir]
FLAGS:
-h, --help Prints help information
--overwrite Overrwite files in the destination directory if file names are the same. Without this flag set,
the default behavior is to append a number to make the filename unique.
-q, --quiet Do not print anything to stdout or stderr.
-r, --recursive Recurse into subdirectories.
--rename Prepend image orientation to filename instead of moving file.
-V, --version Prints version information
-v, --verbose Increase output verbosity by adding more flags: [-v|-vv|-vvv|-vvvv|-vvvvv]
ARGS:
<input-dir> Directory containing image files to sort by orientation.
<output-dir> Directory to output sorted images into. [default: .]