/usr/share/doc/graphicsmagick/www/batch.html is in graphicsmagick 1.3.23-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=us-ascii">
<title>GraphicsMagick GM Utility</title>
<style type=text/css>
<!--
@page { size: 8.5in 11in }
TD P { color: #000000; font-family: "Verdana", "Arial", "Helvetica", sans-serif; font-size: 12pt }
P { color: #000000; font-family: "Verdana", "Arial", "Helvetica", sans-serif; font-size: 12pt }
A:link { color: #00B04F }
A:visited { color: #007B37 }
-->
</style>
</head>
<body LANG="en-US" TEXT="#000000" LINK="#00B04F" VLINK="#007B37" BGCOLOR="#ffffff">
<a name="top"></a>
<table border=0 cellpadding=10 cellspacing=0 style="margin-top:-17px" width="100%"><tr><td>
<br> <br>
<table BORDER=0 WIDTH="100%">
<tr>
<td ALIGN=LEFT bgcolor="#FFFFFF"><img
SRC="images/right_triangle.png" ALT=">" BORDER=0
height=14 width=15><b><font face="Helvetica, Arial"><font
color="#00B04F"><font size="+1">
<a NAME="batch"></a>gm batch
</font></font></font></b></td></tr></table>
<table width="94%" border="0" cellspacing="0" cellpadding="8">
<tr><td width="3%"><br></td><td>
<table BORDER=0 WIDTH="100%">
<tr>
<td ALIGN=LEFT bgcolor="#FFFFFF"><img
SRC="images/right_triangle.png" ALT=">" BORDER=0
height=14 width=15><b><font face="Helvetica, Arial"><font
color="#00B04F"><font size="+1">
<a NAME="batch-top"></a>NAME
</font></font></font></b></td></tr></table>
<table width="94%" border="0" cellspacing="0" cellpadding="8">
<tr><td width="3%"><br></td><td>
batch - execute multiple gm commands as a script
</td></tr></table>
<table BORDER=0 WIDTH="100%">
<tr>
<td ALIGN=LEFT bgcolor="#FFFFFF"><img
SRC="images/right_triangle.png" ALT=">" BORDER=0
height=14 width=15><b><font face="Helvetica, Arial"><font
color="#00B04F"><font size="+1">
<a NAME="batch-contents"></a>Contents
</font></font></font></b></td></tr></table>
<table width="94%" border="0" cellspacing="0" cellpadding="8">
<tr><td width="3%"><br></td><td>
<dl>
<dt>
<a href="#batch-syno">Synopsis</a>
</dt>
<dt>
<a href="#batch-desc">Description</a>
</dt>
<dt>
<a href="#batch-exam">Examples</a>
</dt>
<dt>
<a href="#batch-opti">Options</a>
</dt>
</dl>
</td></tr></table>
<table BORDER=0 WIDTH="100%">
<tr>
<td ALIGN=LEFT bgcolor="#FFFFFF"><img
SRC="images/right_triangle.png" ALT=">" BORDER=0
height=14 width=15><b><font face="Helvetica, Arial"><font
color="#00B04F"><font size="+1">
<a NAME="batch-syno"></a>Synopsis
</font></font></font></b></td></tr></table>
<table width="94%" border="0" cellspacing="0" cellpadding="8">
<tr><td width="3%"><br></td><td>
<p>
<strong>gm batch</strong> <strong>[</strong> <em>options ...</em> <strong>]</strong> <strong>[</strong> <em>script</em> <strong>]</strong>
</td></tr></table>
<table BORDER=0 WIDTH="100%">
<tr>
<td ALIGN=LEFT bgcolor="#FFFFFF"><img
SRC="images/right_triangle.png" ALT=">" BORDER=0
height=14 width=15><b><font face="Helvetica, Arial"><font
color="#00B04F"><font size="+1">
<a NAME="batch-desc"></a>Description
</font></font></font></b></td></tr></table>
<table width="94%" border="0" cellspacing="0" cellpadding="8">
<tr><td width="3%"><br></td><td>
<p>
<strong>batch</strong> executes an arbitary number of the utility commands
(e.g. <strong>convert</strong>) in the form of a simple linear batch script in
order to improve execution efficiency, and/or to allow use as a
subordinate co-process under the control of an arbitrary script or
program.
</td></tr></table>
<table BORDER=0 WIDTH="100%">
<tr>
<td ALIGN=LEFT bgcolor="#FFFFFF"><img
SRC="images/right_triangle.png" ALT=">" BORDER=0
height=14 width=15><b><font face="Helvetica, Arial"><font
color="#00B04F"><font size="+1">
<a NAME="batch-exam"></a>Examples
</font></font></font></b></td></tr></table>
<table width="94%" border="0" cellspacing="0" cellpadding="8">
<tr><td width="3%"><br></td><td>
<p> To drive <strong>'gm batch'</strong> using a shell script (or a program
written in any language), have the script/program send commands to 'gm
batch' via its standard input. Specify that standard input should be
used by using <strong>'-'</strong> as the file name. The following example
converts all files matching '*.jpg' to TIFF format while rotating each
file by 90 degrees and stripping all embedded profiles. The shell
script syntax is standard Unix shell:
<pre>
for file in *.jpg
do
outfile=`basename $file .jpg`.tiff
echo convert -verbose "'$file'" -rotate 90 \
+profile "'*'" "'$outfile'"
done | gm batch -echo on -feedback on -
</pre>
<p>
We can accomplish the same as the previous example by putting all the
commands in a text file and then specifying the name of the text file
as the script to execute:
<pre>
for file in *.jpg
do
outfile=`basename $file .jpg`.tiff
echo convert -verbose "'$file'" -rotate 90 \
+profile "'*'" "'$outfile'"
done > script.txt
gm batch -echo on -feedback on script.txt
</pre>
</td></tr></table>
<p>
<i><a href="#top">Back to Contents</a></i>
</p>
<table BORDER=0 WIDTH="100%">
<tr>
<td ALIGN=LEFT bgcolor="#FFFFFF"><img
SRC="images/right_triangle.png" ALT=">" BORDER=0
height=14 width=15><b><font face="Helvetica, Arial"><font
color="#00B04F"><font size="+1">
<a NAME="batch-opti"></a>Options
</font></font></font></b></td></tr></table>
<table width="94%" border="0" cellspacing="0" cellpadding="8">
<tr><td width="3%"><br></td><td>
<p>
Options are processed from left to right and must appear before any filename argument.
<table BORDER=0 WIDTH="94%">
<tr>
<td width="3%"><br></td>
<td ALIGN=LEFT BGCOLOR="#FFFFFF">
<img SRC="images/right_triangle_option.png"
ALT=">" BORDER=0 height=14
width=15><b><font face="Helvetica, Arial"
><font color="#00B04F"><font size="+1">
-echo <i>on|off</i>
</font></font></font></b></td></tr></table>
<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>command echo on or off</td></tr></table>
<p>
Specify <strong>on</strong> to enable echoing commands to standard output as
they are read or <strong>off</strong> to disable. The default is
<strong>off</strong>.
<table BORDER=0 WIDTH="94%">
<tr>
<td width="3%"><br></td>
<td ALIGN=LEFT BGCOLOR="#FFFFFF">
<img SRC="images/right_triangle_option.png"
ALT=">" BORDER=0 height=14
width=15><b><font face="Helvetica, Arial"
><font color="#00B04F"><font size="+1">
-escape <i>unix|windows</i>
</font></font></font></b></td></tr></table>
<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>Parse using unix or windows syntax</td></tr></table>
<p>
Commands must be parsed from the input stream and escaping needs to be
used to protect spaces or quoting characters in the input. Specify
<strong>unix</strong> to use unix-style command line parsing or <strong>windows</strong>
for Microsoft Windows command shell style parsing. The default depends
on if the software is compiled for Microsoft Windows or for a
Unix-type system (including Cygwin on Microsoft Windows). It is
recommended to use unix syntax because it is more powerful and more
portable.
<table BORDER=0 WIDTH="94%">
<tr>
<td width="3%"><br></td>
<td ALIGN=LEFT BGCOLOR="#FFFFFF">
<img SRC="images/right_triangle_option.png"
ALT=">" BORDER=0 height=14
width=15><b><font face="Helvetica, Arial"
><font color="#00B04F"><font size="+1">
-fail <i>text</i>
</font></font></font></b></td></tr></table>
<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>text to print if a command fails</td></tr></table>
<p>
When feedback is enabled, this specifies the text to print when the
command fails. The default text is <strong>FAIL</strong>.
<table BORDER=0 WIDTH="94%">
<tr>
<td width="3%"><br></td>
<td ALIGN=LEFT BGCOLOR="#FFFFFF">
<img SRC="images/right_triangle_option.png"
ALT=">" BORDER=0 height=14
width=15><b><font face="Helvetica, Arial"
><font color="#00B04F"><font size="+1">
-feedback <i>on|off</i>
</font></font></font></b></td></tr></table>
<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>enable error feedback</td></tr></table>
<p>
Print text (see -pass and -fail options) feedback after each
command to indicate the result, the default is <strong>off</strong>.
<table BORDER=0 WIDTH="94%">
<tr>
<td width="3%"><br></td>
<td ALIGN=LEFT BGCOLOR="#FFFFFF">
<img SRC="images/right_triangle_option.png"
ALT=">" BORDER=0 height=14
width=15><b><font face="Helvetica, Arial"
><font color="#00B04F"><font size="+1">
-help
</font></font></font></b></td></tr></table>
<p>
Prints batch command help.
<table BORDER=0 WIDTH="94%">
<tr>
<td width="3%"><br></td>
<td ALIGN=LEFT BGCOLOR="#FFFFFF">
<img SRC="images/right_triangle_option.png"
ALT=">" BORDER=0 height=14
width=15><b><font face="Helvetica, Arial"
><font color="#00B04F"><font size="+1">
-pass <i>text</i>
</font></font></font></b></td></tr></table>
<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>text to print if a command passes</td></tr></table>
<p>
When feedback is enabled, this specifies the text to print when the
command passes. The default text is <strong>PASS</strong>.
<table BORDER=0 WIDTH="94%">
<tr>
<td width="3%"><br></td>
<td ALIGN=LEFT BGCOLOR="#FFFFFF">
<img SRC="images/right_triangle_option.png"
ALT=">" BORDER=0 height=14
width=15><b><font face="Helvetica, Arial"
><font color="#00B04F"><font size="+1">
-prompt <i>text</i>
</font></font></font></b></td></tr></table>
<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>Prompt text to use for command line</td></tr></table>
<p>
If no filename argument was specified, a simple command prompt appears
where you may enter GraphicsMagick commands. The default prompt is
<strong>GM></strong>. Use this option to change the prompt to something else.
<table BORDER=0 WIDTH="94%">
<tr>
<td width="3%"><br></td>
<td ALIGN=LEFT BGCOLOR="#FFFFFF">
<img SRC="images/right_triangle_option.png"
ALT=">" BORDER=0 height=14
width=15><b><font face="Helvetica, Arial"
><font color="#00B04F"><font size="+1">
-stop-on-error <i>on|off</i>
</font></font></font></b></td></tr></table>
<table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>Specify if command processing stops on error</td></tr></table>
<p>
Normally command processing continues if a command encounters an
error. Specify <strong>-stop-on-error on</strong> to cause processing to quit
immediately on error.
</td></tr></table>
<p>
<i><a href="#top">Back to Contents</a></i>
</p>
</td></tr></table>
|