Skip to content

chongyangma/python-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Scripts

Build Status

Some useful python scripts (mostly for batch processing of files). Launching each script without any argument will print out the usage information.

Descriptions

Reverse the order of a file sequence in an input folder and save the renamed file sequence into an output folder.

usage: reverse_sequence.py [-h] [--pattern PATTERN] input_path output_path

Resize images in a folder. Python Imaging Library (PIL) is required.

usage: resize_images.py [-h] [--wd WD] [--ht HT] input_path output_path

Draw text on images in a folder. Python Imaging Library (PIL) is required.

usage: draw_text.py [-h] [--text TEXT] [--font_size FONT_SIZE] [--pos_x POS_X]
                    [--pos_y POS_Y] [--color_r COLOR_R] [--color_g COLOR_G]
                    [--color_b COLOR_B]
                    input_path output_path

List files in a folder.

usage: list_files.py [-h] [--output_file OUTPUT_FILE] [--pattern PATTERN]
                     input_path

Fill the background of images of RGBA format in a folder with a certain color. Python Imaging Library (PIL) is required.

usage: fill_background.py [-h] [--color_r COLOR_R] [--color_g COLOR_G]
                          [--color_b COLOR_B] [--wd WD] [--ht HT]
                          input_path output_path