Copyright © Fred Weinhaus My scripts are available free of charge for non-commercial (non-profit) use, ONLY. For use of my scripts in commercial (for-profit) environments or non-free applications, please contact me (Fred Weinhaus) for licensing arrangements. My email address is fmw at alink dot net. If you: 1) redistribute, 2) incorporate any of these scripts into other free applications or 3) reprogram them in another scripting language, then you must contact me for permission, especially if the result might be used in a commercial or for-profit environment. Usage, whether stated or not in the script, is restricted to the above licensing arrangements. It is also subject, in a subordinate manner, to the ImageMagick license, which can be found at: http://www.imagemagick.org/script/license.php Please read the Pointers For Use on my home page to properly install and customize my scripts. |
Runs another script over a folder of images. |
last modified: February 15, 2019
USAGE: scriptbatch -c command [-i inputfolder] [-o outputfolder] [-f format]
[-s suffix] [-p path2imagemagick]
-c ... command ............ path to the script file with all its argument, except the PURPOSE: To run another script over a folder of images. DESCRIPTION: SCRIPTBATCH runs another script over a folder of images, but only those scripts that take one input and create one output and do not use arguments that need quoting. ARGUMENTS: -c command ... COMMAND is the path to the script script file with all its arguments as specified by the script in question. Do not include the input and output images. If an argument is a color definition, then it can only be a color name or a hex color without quotes. Other color specifications do not work. Also the script cannot handle any other arguments that require quoting. If the path to the script in in your PATH environment variable, then the path to the script may be left off. Use the script[.sh] as it is on your system. COMMAND is a required argument. Enclose it all in single or double quotes. -i inputfolder ... INPUTFOLDER is the path to the the folder of input images and must include the folder name. The default is folder from which scriptbatch is called. -o outputfolder ... OUTPUTFOLDER is the path to the output image folder including the folder name. The default is the same folder as the input folder. If the folder does not already exist, it will be created. -f format ... FORMAT for filtering input images. Space and/or comma separate list. The default is to process all files in the inputfolder. Typical formats are: jpg, png, tiff (case insensitive). Example: "jpg,png" or "jpg png" or "jpg, png" will only process jpg and png format images. -s suffix ... SUFFIX is the extension to add to the output images without the period. The default is the same suffix as the input. Typical suffixes are jpg, png, tiff. -p path2imagemagick ... PATH2IMAGEMAGICK is the path to imagemagick convert/magick, excluding convert or magick. The default assumes it is in your PATH environment variable. Typical locations are: /usr/local/bin, /usr/bin, /opt/local/bin, etc. NOTE: The scriptbatch script can use commands for scripts that take one input and one output only, respectively and do not use arguments that need quoting such as a list of control points or color specifications with parentheses, such as rgb(...). The exception is that colors may be specified as color names or hex values without quoting. The hex value must include the leading # symbol. Some scripts can use control points specified via a text file. Those scripts will work when using the textfile. CAVEAT: No guarantee that this script will work on all platforms, nor that trapping of inconsistent parameters is complete and foolproof. Use At Your Own Risk. |
Runs Script, 2colorthresh (no arguments), providing full paths |
Runs Script, 2colorthresh (no arguments), with scriptbatch, script and |
Runs Script, textcleaner with its arguments, with scriptbatch, script and |
Runs Script, bordergrid with its arguments, with scriptbatch, script and |
Runs Script, curves with its arguments including pointfile.txt containing control points, |