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
|
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Command Line Application — xml2rfc v2.3.3 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '2.3.3',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="xml2rfc v2.3.3 documentation" href="index.html" />
<link rel="next" title="Graphical Appplication" href="gui.html" />
<link rel="prev" title="Xml2rfc Documentation" href="index.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="gui.html" title="Graphical Appplication"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Xml2rfc Documentation"
accesskey="P">previous</a> |</li>
<li><a href="index.html">xml2rfc v2.3.3 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="command-line-application">
<h1>Command Line Application<a class="headerlink" href="#command-line-application" title="Permalink to this headline">¶</a></h1>
<p>This section provides a guide for using <strong>xml2rfc</strong>.</p>
<div class="section" id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2>
<p>Thanks to python, the installation process for xml2rfc is identical for all platforms that support python.</p>
<p>To install a <em>system-wide</em> version of xml2rfc, simply run:</p>
<blockquote>
<div><tt class="docutils literal"><span class="pre">$</span> <span class="pre">python</span> <span class="pre">setup.py</span> <span class="pre">install</span></tt></div></blockquote>
<p>If you want to perform a local installation for a specific user,
you have a couple of options. You may use python’s default location
of user site-packages by specifying the flag <tt class="docutils literal"><span class="pre">--user</span></tt>. These locations are:</p>
<blockquote>
<div><ul class="simple">
<li><strong>UNIX</strong>: $HOME/.local/lib/python<ver>/site-packages</li>
<li><strong>OSX</strong>: $HOME/Library/Python/<ver>/lib/python/site-packages</li>
<li><strong>Windows</strong>: %APPDATA%/Python/Python<ver>/site-packages</li>
</ul>
</div></blockquote>
<p>You can additionally combine the flag <tt class="docutils literal"><span class="pre">--install-scripts</span></tt> with <tt class="docutils literal"><span class="pre">--user</span></tt> to
specify a directory on your PATH to install the xml2rfc executable to. For
example, the following command:</p>
<blockquote>
<div><tt class="docutils literal"><span class="pre">$</span> <span class="pre">python</span> <span class="pre">setup.py</span> <span class="pre">install</span> <span class="pre">--user</span> <span class="pre">--install-scripts=$HOME/bin</span></tt></div></blockquote>
<p>will install the xml2rfc library and data to your local site-packages
directory, and an executable python script <tt class="docutils literal"><span class="pre">xml2rfc</span></tt> to $HOME/bin.</p>
<p>The option <tt class="docutils literal"><span class="pre">--prefix</span></tt> allows you to specify the base path for all
installation files. The setup.py script will exit with an error if your
PYTHONPATH is not correctly configured to contain the library path
the script tries to install to.</p>
<p>The command is used as follows:</p>
<blockquote>
<div><tt class="docutils literal"><span class="pre">$</span> <span class="pre">python</span> <span class="pre">setup.py</span> <span class="pre">install</span> <span class="pre">--prefix=<path></span></tt></div></blockquote>
<p>For further fine-tuning of the installation behavior, you can get a list
of all available options by running:</p>
<blockquote>
<div><tt class="docutils literal"><span class="pre">$</span> <span class="pre">python</span> <span class="pre">setup.py</span> <span class="pre">install</span> <span class="pre">--help</span></tt></div></blockquote>
</div>
<div class="section" id="usage">
<h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
<p>Xml2rfc accepts a single XML document as input and outputs to one or more conversion formats.</p>
<p>Official Usage: <tt class="docutils literal"><span class="pre">xml2rfc</span> <span class="pre">SOURCE</span> <span class="pre">[options]</span> <span class="pre">FORMATS...</span></tt></p>
<dl class="docutils">
<dt><strong>Options</strong></dt>
<dd><p class="first">The following parameters affect how xml2rfc behaves, however none are required.</p>
<table border="1" class="last docutils">
<colgroup>
<col width="17%" />
<col width="26%" />
<col width="57%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Short</th>
<th class="head">Long</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="docutils literal"><span class="pre">-h</span></tt></td>
<td><tt class="docutils literal"><span class="pre">--help</span></tt></td>
<td>show the help message and exit</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">-v</span></tt></td>
<td><tt class="docutils literal"><span class="pre">--verbose</span></tt></td>
<td>print extra information</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">-q</span></tt></td>
<td><tt class="docutils literal"><span class="pre">--quiet</span></tt></td>
<td>dont print anything</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">-c</span></tt></td>
<td><tt class="docutils literal"><span class="pre">--cache</span></tt></td>
<td>specify an alternate cache directory to write to</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">-n</span></tt></td>
<td><tt class="docutils literal"><span class="pre">--no-dtd</span></tt></td>
<td>disable DTD validation step</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">-d</span> <span class="pre">DTD</span></tt></td>
<td><tt class="docutils literal"><span class="pre">--dtd=DTD</span></tt></td>
<td>specify an alternate dtd file</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">-b</span> <span class="pre">BASENAME</span></tt></td>
<td><tt class="docutils literal"><span class="pre">--basename=BASENAME</span></tt></td>
<td>specify the base name for output files</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">-f</span> <span class="pre">FILENAME</span></tt></td>
<td><tt class="docutils literal"><span class="pre">--filename=FILENAME</span></tt></td>
<td>specify an output filename</td>
</tr>
<tr><td>(none)</td>
<td><tt class="docutils literal"><span class="pre">--clear-cache</span></tt></td>
<td>purge the cache and exit</td>
</tr>
<tr><td>(none)</td>
<td><tt class="docutils literal"><span class="pre">--version</span></tt></td>
<td>display the version number and exit</td>
</tr>
</tbody>
</table>
</dd>
<dt><strong>Formats</strong></dt>
<dd><p class="first">At least one but as many as all of the following output formats must
be specified. The destination file will be created according to the
argument given to –filename. If no argument was given, it will
create the file(s) “output.format”. If no format is specified, xml2rfc
will default to paginated text (<tt class="docutils literal"><span class="pre">--text</span></tt>).</p>
<table border="1" class="last docutils">
<colgroup>
<col width="15%" />
<col width="85%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Command</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="docutils literal"><span class="pre">--raw</span></tt></td>
<td>outputs to a text file, unpaginated</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">--text</span></tt></td>
<td>outputs to a text file with proper page breaks</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">--nroff</span></tt></td>
<td>outputs to an nroff file</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">--html</span></tt></td>
<td>outputs to an html file</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">--exp</span></tt></td>
<td>outputs to an XML file with all references expanded</td>
</tr>
</tbody>
</table>
</dd>
<dt><strong>Examples</strong></dt>
<dd><div class="first last line-block">
<div class="line"><tt class="docutils literal"><span class="pre">xml2rfc</span> <span class="pre">draft.xml</span></tt></div>
<div class="line"><tt class="docutils literal"><span class="pre">xml2rfc</span> <span class="pre">draft.xml</span> <span class="pre">--dtd=alt.dtd</span> <span class="pre">--basename=draft-1.0</span> <span class="pre">--text</span> <span class="pre">--nroff</span> <span class="pre">--html</span></tt></div>
</div>
</dd>
</dl>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Command Line Application</a><ul>
<li><a class="reference internal" href="#installation">Installation</a></li>
<li><a class="reference internal" href="#usage">Usage</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter">Xml2rfc Documentation</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="gui.html"
title="next chapter">Graphical Appplication</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/cli.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="gui.html" title="Graphical Appplication"
>next</a> |</li>
<li class="right" >
<a href="index.html" title="Xml2rfc Documentation"
>previous</a> |</li>
<li><a href="index.html">xml2rfc v2.3.3 documentation</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2011, Concentric Sky.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</div>
</body>
</html>
|