New GM "batch" command
Bob Friesenhahn <[email protected]> Thu, 31 Jan 2013 21:07:32 -0600 (CST)
| Newsgroups | gmane.comp.video.graphicsmagick.help,gmane.comp.video.graphicsmagick.tools |
|---|---|
| Message-ID | <[email protected]> |
Kenneth Xu contributed a 'gm batch' command which allows running any
number of GM commands in a sequence with the commands being specified
at a command line with 'GM> ' prompt, from standard input, or from a
file. This can improve the performance quite a lot with many small
files, and allows the processing logic to be driven by a different
program or script.
This new feature is included in Mercurial and the latest GM snapshot
packages, including Windows installer packages. Please provide
feedback prior to the next release.
The following is the usage message from 'gm batch -help', which is all
the documentation currently available.
Usage: gm batch [options ...] [file|-]
Where options include:
-echo on|off echo command back to standard out, default is off
-escape unix|windows force use Unix or Windows escape format for command line
argument parsing, default is platform dependent
-fail text when feedback is on, output the designated text if the
command returns error, default is 'FAIL'
-feedback on|off print text (see -pass and -fail options) feedback after
each command to indicate the result, default is off
-help print program options
-pass text when feedback is on, output the designated text if the
command executed successfully, default is 'PASS'
-prompt text use the given text as command prompt. use text 'off' or
empty string to turn off prompt. default to 'GM> ' if
and only if batch mode was entered with no file argument
-stop-on-error on|off
when turned on, batch execution quits prematurely when
any command returns error
Unix escape allows the use backslash(\), single quote(') and double quote(") in
the command line. Windows escape only uses double quote("). For example,
Orignal Unix escape Windows escape
[a\b\c\d] [a\\b\\c\\d] [a\b\c\d]
[Text with space] [Text\ with\ space] ["Text with space"]
[Text with (")] ['Text with (")'] ["Text with ("")"]
[Mix: "It's a (\)"] ["Mix: \"It's a (\\)\""] ["Mix: ""It's a (\)"""]
Use '-' to read command from standard input without default prompt.
Bob
--
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan