Skip to content

Commit f549d1e

Browse files
committed
add help file to print out usage to terminal
1 parent 5526566 commit f549d1e

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

batch_resizer/help.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
def print_help():
2+
print("""
3+
Process images by converting them to different formats and/or resizing them.
4+
You may provide one or more images and they'll be processed in parallel
5+
for extra speed (actual gains depend on the hardware it runs on).
6+
7+
usage: main.py input [input ...] [-o OUTPUT] [-p] [-w width] [-h height]
8+
[-f {.jpg,.jpeg,.png,.webp} [{.jpg,.jpeg,.png,.webp} ...]]
9+
[-v] [--version] [--help]
10+
11+
positional arguments:
12+
input One or more image files to process
13+
14+
optional arguments:
15+
-o [OUTPUT], --output-dir [OUTPUT]
16+
Directory where processed images will be saved to
17+
-p, --create-parents Recursively creates any missing parent directories
18+
-w WIDTH, --resize WIDTH
19+
Pixel width for the output image (preserves aspect-ratio)
20+
-h HEIGHT, --resize HEIGHT
21+
Pixel height for the output image (preserves aspect-ratio)
22+
-f {webp,jpeg,jpg,png} [{webp,jpeg,jpg,png} ...], --formats {webp,jpeg,jpg,png} [{webp,jpeg,jpg,png} ...]
23+
Convert processed file to the selected image format
24+
-v, --verbose Writes additional output to the terminal as the program runs
25+
--help Show this help message
26+
--version Prints the current version for the script
27+
28+
""")

0 commit comments

Comments
 (0)