/usr/share/doc/rest2web/html/command_line.html is in rest2web-doc 0.5.2~alpha+svn-r248-2.
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 277 278 279 280 281 282 283 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Command Line Options</title>
<link rel="stylesheet" href="stylesheets/rest2web.css" type="text/css" />
<link rel="stylesheet" href="stylesheets/voidspace_docutils2.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="rest2web - build websites with Python and docutils." />
<meta name="author" content="Michael Foord" />
<meta name="copyright" content="© 2003-2006 Michael Foord, subject to BSD License" />
<meta name="keywords" content="rest2web - build websites with Python and docutils,
rest, restructured text, text, website, internet, web, net, web builder, site,
site builder, docutils, i18n, internationalization, templates, templating,
python, " />
</head>
<body style="background: url(images/logos/img_background.gif) top center repeat-y;">
<div id="wrap">
<div id="header-section">
<a href="http://www.voidspace.org.uk/python/index.shtml" title="Voidspace"><img src="images/logos/header760.gif" alt="Voidspace"/></a>
<p align="center" class="headertitle"><span style="font-size:130%">rest2web:</span> Building Websites Across the Known Universe</p>
</div>
<div id="header">
<ul>
<li><a href="index.html">rest2web</a></li>
<li>></li>
<li>Command Line</li>
</ul>
</div>
<table>
<tr>
<td><img src="images/logos/1.gif" width="1" height="1" alt="" /></td>
<!-- main content cell first, with rowspan=2 -->
<td valign="top" align="left" rowspan="2">
<div id="middle-column">
<a name="startcontent" id="startcontent"></a>
<div id="gallery">
<div class="document" id="command-line-options">
<h1 class="title">Command Line Options</h1>
<h2 class="subtitle" id="configuring-rest2web-from-the-command-line">Configuring Rest2web from the Command Line</h2>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#introduction" id="id2">Introduction</a></li>
<li><a class="reference internal" href="#basic-usage" id="id3">Basic Usage</a></li>
<li><a class="reference internal" href="#the-config-file" id="id4">The Config File</a></li>
<li><a class="reference internal" href="#verbosity-level" id="id5">Verbosity Level</a></li>
<li><a class="reference internal" href="#template-file" id="id6">Template File</a></li>
<li><a class="reference internal" href="#id1" id="id7">Uservalues</a></li>
<li><a class="reference internal" href="#force-mode" id="id8">Force Mode</a></li>
<li><a class="reference internal" href="#no-pause" id="id9">No Pause</a></li>
<li><a class="reference internal" href="#skiperrors" id="id10">skiperrors</a></li>
</ul>
</div>
<div class="section" id="introduction">
<h1><a class="toc-backref" href="#id2">Introduction</a></h1>
<p>Most <strong>rest2web</strong> configuration is done through the config file. It is
generally easier to edit a single text file than to have to remember lots of
arcane command line options. <img src="images/smilies/smile.gif" alt="Smile" /> </p>
<p>There are several things you can control from the command line. These include :</p>
<ul class="simple">
<li>The <a class="reference external" href="config_file.html">Config File</a></li>
<li>The verbosity level (how much information rest2web outputs as it runs</li>
<li>Override the template file</li>
<li>Go into force mode</li>
<li>Specify global <a class="reference external" href="reference/uservalues.html">uservalues</a></li>
</ul>
</div>
<div class="section" id="basic-usage">
<h1><a class="toc-backref" href="#id3">Basic Usage</a></h1>
<p>If you type <tt class="docutils literal"><span class="pre">r2w.py</span> <span class="pre">--help</span></tt> at the command line, this is the message it
<em>should</em> print :</p>
<pre class="literal-block">
usage: r2w.py [options] config_file
options:
--version show program's version number and exit
-h, --help show this help message and exit
-v Verbose output (default).
-a Display warnings & actions only.
-w Display warnings only.
-t TEMPLATE, --template-file=TEMPLATE
Specify a template file. (Overrides first template.)
-u USERVALUES, --uservalues=USERVALUES
Global uservalues for the site, in the form
"name=value".
-f, --force Force site without indexes, restindexes or template.
-n, --nopause Do not pause after processing (overrides setting in config file).
-s, --skiperrors Skip errors (continue processing).
</pre>
<div class="note">
<p class="first admonition-title">Note</p>
<p>Command line options are processed using <a class="reference external" href="http://docs.python.org/lib/module-optparse.html">optparse</a>.</p>
<p class="last">This only comes with Python 2.3 and more recent. On Python 2.2 you will
only be able to pass the config file at the command line.</p>
</div>
</div>
<div class="section" id="the-config-file">
<h1><a class="toc-backref" href="#id4">The Config File</a></h1>
<p>If you run <tt class="docutils literal"><span class="pre">r2w.py</span></tt> <em>without</em> any command line options, it looks for a file
called <tt class="docutils literal"><span class="pre">r2w.ini</span></tt> in the current working directory.</p>
<p>Alternatively you can specify a <a class="reference external" href="config_file.html">config file</a> as the last argument to <tt class="docutils literal"><span class="pre">r2w.py</span></tt>.</p>
</div>
<div class="section" id="verbosity-level">
<h1><a class="toc-backref" href="#id5">Verbosity Level</a></h1>
<p>By default rest2web outputs a lot of information about what it does. This
includes which directories and files it is processing, as well any errors
raised along the way.</p>
<p>This may be too much information. There are three different verbosity levels :</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">-v</span></tt> - Verbose, the default level. Information, actions and errors.</li>
<li><tt class="docutils literal"><span class="pre">-a</span></tt> - Action level. Actions and errors only.</li>
<li><tt class="docutils literal"><span class="pre">-w</span></tt> - Warning level. Warnings only.</li>
</ul>
</div>
<div class="section" id="template-file">
<h1><a class="toc-backref" href="#id6">Template File</a></h1>
<p>rest2web uses template files to generate the output pages. See <a class="reference external" href="templating.html">Templating</a>
for the details of this.</p>
<p>Often you will only use a single template, specified in the <a class="reference external" href="restindex.shtml">restindex</a>
of your top level index page. Sometimes you may want to use alternative templates
for the same site. For example one for the online version and one for the
distributed documentation.</p>
<p>You can override the top level template from the command line, using either :</p>
<blockquote>
<p><tt class="docutils literal"><span class="pre">r2w.py</span> <span class="pre">-t</span> <span class="pre">path/to/template.txt</span></tt></p>
<p><tt class="docutils literal"><span class="pre">r2w.py</span> <span class="pre">--template-file=path/to/template.txt</span></tt></p>
</blockquote>
</div>
<div class="section" id="id1">
<h1><a class="toc-backref" href="#id7">Uservalues</a></h1>
<p><a class="reference external" href="reference/uservalues.html">The Uservalues</a> are a way of providing values to
use in your content and templates. They can be useful for multiple translations,
or for values that you want to specify at the time you build your site.</p>
<p>You can specify uservalues in the restindex of each page. You can also specify
<em>global</em> uservalues (available in every page) in the config file, or at the
command line.</p>
<p>If you specify the same values in your config file <em>and</em> at the command line,
the command line takes higher priority.</p>
<p>A uservalue needs a name (this is how you refer to it in pages/templates) and
a value. The name and value should be separated by an equals sign.</p>
<p>This means that you can specify uservalues at the command line using either :</p>
<blockquote>
<p><tt class="docutils literal"><span class="pre">r2w.py</span> <span class="pre">-u</span> <span class="pre">"name=value"</span></tt></p>
<p><tt class="docutils literal"><span class="pre">r2w.py</span> <span class="pre">--uservalues="name=value"</span></tt></p>
</blockquote>
<p>The double quotes are optional, but useful if the value has spaces.</p>
<p>Uservalues in pages will override global uservalues specified in either the
config file or at the command line.</p>
</div>
<div class="section" id="force-mode">
<h1><a class="toc-backref" href="#id8">Force Mode</a></h1>
<p><a class="reference external" href="force_mode.html">force mode</a> allows you to build websites without specifying
a template, providing indexes, or having restindexes in the ReST documents that
form your pages.</p>
<p>You can supply any of these that you want, but where they are missing rest2web
will supply defaults.</p>
<p>To switch force mode onfrom the command line, use :</p>
<blockquote>
<p><tt class="docutils literal"><span class="pre">r2w.py</span> <span class="pre">-f</span></tt></p>
<p><tt class="docutils literal"><span class="pre">r2w.py</span> <span class="pre">--force</span></tt></p>
</blockquote>
</div>
<div class="section" id="no-pause">
<h1><a class="toc-backref" href="#id9">No Pause</a></h1>
<p>This overrides the 'pause' option in the config file, and forces 'r2w.py' to
<em>not pause</em> after running.</p>
</div>
<div class="section" id="skiperrors">
<h1><a class="toc-backref" href="#id10">skiperrors</a></h1>
<p>This option determines how rest2web will handle exceptions (like our old friend <tt class="docutils literal"><span class="pre">UnicodeDecodeError</span></tt>) that happen when processing pages.</p>
<p>If set, rest2web will display the error and move to the next file. The default is off.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p>If an error occurs whilst trying to process an index file, it will have to skip building the directory.</p>
<p class="last">This feature is still 'experimental' and may need refining.</p>
</div>
</div>
</div>
</div>
<div id="end">
<p><a href="#startcontent">Return to Top</a><br />
<small>Part of the <a href="http://www.voidspace.org.uk/python/rest2web/">rest2web Docs</a></small><br />
<small>Page last modified <strong>Fri Oct 13 23:28:24 2006</strong>.</small>
</p>
</div>
</div></td>
</tr>
<tr>
<td valign="top" align="left" width="25%">
<div id="left-column">
<div id="sidie">
<ul>
<li class="left-navheader-first">
<a href="index.html" class="left-navheader">Index Page</a>
</li>
<li class="left-navheader">Pages</li>
<li><a href="introduction.html">Introduction</a></li>
<li><a href="quickstart.html">Quickstart</a></li>
<li><a href="config_file.html">Config File</a></li>
<li><a href="tutorial.html">Tutorial</a></li>
<li><a href="command_line.html">Command Line</a></li>
<li><a href="force_mode.html">Force Mode</a></li>
<li><a href="templating.html">Templates</a></li>
<li><a href="restindex.html">restindex</a></li>
<li><a href="functions.html">Functions</a></li>
<li><a href="macros.html">Macros</a></li>
<li><a href="special_files.html">Special Files</a></li>
<li class="left-navheader">Sub Sections</li>
<li><a href="reference/index.html">Reference</a></li>
<li><a href="test_site/index.html">Test Site</a></li>
<li><a href="translation/index.html">Translation</a></li>
<li><a href="gallery_test/index.html">Gallery</a></li>
</ul>
</div>
<p class="sidieimg">
<a href="http://www.python.org">
<img src="images/logos/new_python.gif" width="88"
height="103" border="0" alt="Powered by Python" />
</a>
</p>
<p class="sidieimg">
<a href="http://sourceforge.net/donate/index.php?group_id=138579">
<img src="http://images.sourceforge.net/images/project-support.jpg" width="100"
height="32" border="0" alt="Support This Project" />
</a>
</p>
<p class="sidieimg">
<a href="http://www.voidspace.org.uk/python/rest2web/"><img
src="images/logos/rest2web140x62.gif" width="142" height="62"
alt="Site Built with rest2web" /></a><br />
</p>
</div>
</td>
</tr>
</table>
<hr />
<p class="sidieimg">
<a href="http://www.voidspace.org.uk/python/rest2web/"><img src="images/logos/rest2web200x80.gif" width="200" height="80" alt="Site Built with rest2web" /></a>
<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=138579&type=5" width="210" height="62" alt="SourceForge.net Logo" /></a>
<a href="http://www.opensource.org"><img src="images/logos/osi-certified-120x100.gif" width="120" height="100" alt="Certified Open Source" border="1" /></a>
</p>
<p class="sidieimg">
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-203625-1";
urchinTracker();
</script>
</p>
<p class="sidieimg">
<a href="http://www.voidspace.org.uk/python/index.shtml"><img
src="images/logos/pythonbanner.gif" width="468" height="60"
alt="Python on Voidspace" /></a>
</p>
<div id="footer">
Copyright © Voidspace<br />Design by <a href="http://www.fuchsiashockz.co.uk">Fuchsiashockz</a> | <a href="http://validator.w3.org/check?uri=referer" title="Validate code as W3C XHTML 1.1 Strict Compliant">W3C XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/check?uri=referer" title="Validate Style Sheet as W3C CSS 2.0 Compliant">W3C CSS 2.0</a>
</div>
</div>
</body>
</html>
|