Thanks to visit codestin.com
Credit goes to github.com

Skip to content

thevipinsaini/thumb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

thumb

Create thumbnails for all images in a directory with one simple command.

Getting Started

  1. Download thumb.py.

  2. Run chmod a+x thumb.py.

  3. Create a soft link to the script using sudo ln -s path/to/downloads/webp.py /usr/bin/webp.

Usage and Syntax

Note: You can run thumb -h to see a list of all available options.

This script creates thumbnails for all valid images in a directory (and potentially all nested directories, if the recursive flag is enabled). The only required argument is the size of the thumbnails.

Syntax:

usage: thumb [-h] [--dir DIR] [--recursive] [--tail TAIL] size

Create thumbnails for all images in a directory.

positional arguments:
  size         The target resolution of the thumbnails (e.g., 32 for 32x32).

optional arguments:
  -h, --help   show this help message and exit
  --dir DIR    The directory to walk. If omitted, this is assumed to be the
               directory from which thumb was called.
  --recursive  Walks all nested subdirectories if enabled.
  --tail TAIL  The string tail to append to all thumbnail images, before the
               file extension (e.g., "32x32", "-thumbnail", etc.). By default,
               this will be nxn, where n is whatever size you specified.

Example:

thumb 32 --recursive

This will create 32x32 thumbnails for all images in the directory from which the command was run. All thumbnail file names will end in '32x32' before the extension. For example, if the script processes my-image.JPG, the thumbnail will be saved as my-image32x32.JPG.

Note 1: Files that don't end in a valid image extension will not be processed.

Note 2: Files that end in the specified tail will not be processed. This is to prevent re-processing any thumbnails you create (if this weren't prevented, you'd create thumbnails for your thumbnails).

About

Create thumbnails for all images in a directory with one simple command.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%