This file is indexed.

/usr/share/doc/rest2web/html/config_file.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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<!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>Configuring rest2web</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="&copy; 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>&gt;</li>
<li>Config File</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="configuring-rest2web">
<h1 class="title">Configuring rest2web</h1>
<h2 class="subtitle" id="the-config-file">The Config File</h2>
<div class="contents topic" id="r2w-ini">
<p class="topic-title first">r2w.ini</p>
<ul class="simple">
<li><a class="reference internal" href="#configuring" id="id5">Configuring</a><ul>
<li><a class="reference internal" href="#config-options" id="id6">Config Options</a></li>
</ul>
</li>
<li><a class="reference internal" href="#directory-paths" id="id7">Directory Paths</a></li>
<li><a class="reference internal" href="#log-file" id="id8">log_file</a></li>
<li><a class="reference internal" href="#skiperrors" id="id9">skiperrors</a></li>
<li><a class="reference internal" href="#macros" id="id10">macros</a></li>
<li><a class="reference internal" href="#macro-paths" id="id11">Macro Paths</a></li>
<li><a class="reference internal" href="#psyco" id="id12">psyco</a></li>
<li><a class="reference internal" href="#pause" id="id13">pause</a></li>
<li><a class="reference internal" href="#promote-headers" id="id14">promote_headers</a></li>
<li><a class="reference internal" href="#debug" id="id15">DEBUG</a></li>
<li><a class="reference internal" href="#uservalues" id="id16">Uservalues</a></li>
</ul>
</div>
<div class="section" id="configuring">
<h1><a class="toc-backref" href="#id5">Configuring</a></h1>
<p><img src="images/noise.gif" alt="emoticon:noise" /> <strong>rest2web</strong> needs to receive certain configuration details which
it gets from a config file. By default this is called <strong>'r2w.ini'</strong> <a class="footnote-reference" href="#id4" id="id1">[1]</a> and is
located in the same directory as r2w.py. You can supply an alternative
config file path at the command line, when you run <strong>r2w.py</strong>.</p>
<pre class="literal-block">
r2w.py ../path/to/r2w.ini
</pre>
<p>The options all look something like :</p>
<pre class="literal-block">
start_directory = &quot;../../source_directory&quot;
</pre>
<p>The quotes are optional.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last"><strong>rest2web</strong> uses <a class="reference external" href="http://www.voidspace.org.uk/python/modules.shtml#configobj">ConfigObj</a>
to read config files. ConfigObj uses a very simple <tt class="docutils literal"><span class="pre">ini</span></tt> style syntax. If
you want to check out the full syntax spec, you'll need to read the
<a class="reference external" href="http://www.voidspace.org.uk/python/configobj.html">ConfigObj Docs</a>.</p>
</div>
<p>As well as the options in the config file, you can also control some of
rest2web's behaviour through <a class="reference external" href="command_line.html">Command Line</a> options.</p>
<div class="section" id="config-options">
<h2><a class="toc-backref" href="#id6">Config Options</a></h2>
<p>The basic list of config options is :</p>
<ul class="simple">
<li><em>'start_directory'</em></li>
<li><em>'target_directory'</em></li>
<li><em>'compare_directory'</em></li>
<li><em>'log_file'</em></li>
<li><em>'skiperrors'</em></li>
<li><em>'macros'</em></li>
<li><em>'Macro Paths'</em></li>
<li><em>'psyco'</em></li>
<li><em>'pause'</em></li>
<li><em>'promote_headers'</em></li>
<li><em>'DEBUG'</em> (optional)</li>
</ul>
<p>The options are explained in the config file, but there is also a full
explanation below. The config options <em>are</em> case sensitive. The only one that
is optional is DEBUG, all the other options must be present or <strong>restweb</strong> will
fail.</p>
<p>In addition to these, you can also specify <a class="reference external" href="uservalues.html">uservalues</a> in the config file. See the
<a class="reference external" href="reference/uservalues.html">uservalues</a> section below.</p>
</div>
</div>
<div class="section" id="directory-paths">
<h1><a class="toc-backref" href="#id7">Directory Paths</a></h1>
<ol class="arabic simple">
<li><em>'start_directory'</em></li>
<li><em>'target_directory'</em></li>
<li><em>'compare_directory'</em></li>
</ol>
<p><strong>rest2web</strong> reads source files and outputs HTML. THhe directory it reads files from is the - <em>'start_directory'</em>. This will be the top level for your website.</p>
<p>It also needs to know where to put the files it generates - the <em>'target_directory'</em>.</p>
<p>The directory structure of the resulting website will be created in the <em>'target_directory'</em>. Existing files will be overwritten without confirmation, but files that don't need to be overwritten won't be deleted.</p>
<p>When rest2web generates files it compares them against existing files to see if the file has changed. This can be useful if you want your target directory to only contain files that have changed (for uploading the new and changed files by <acronym title="File Transfer Protocol">FTP</acronym>). In this case you may want to specify a <em>'compare_directory'</em> that is different from the <em>'target_directory'</em>.</p>
<p>If you don't specify a <em>'compare_directory'</em> (set the value to <tt class="docutils literal"><span class="pre">''</span></tt>) then the <em>'target_directory'</em> is used.</p>
</div>
<div class="section" id="log-file">
<h1><a class="toc-backref" href="#id8">log_file</a></h1>
<p><em>'log_file'</em> is the path to a file for logging the results of running rest2web. This includes any errors that may occur.</p>
<p>If you set it to <tt class="docutils literal"><span class="pre">''</span></tt> then no log file will be generated.</p>
</div>
<div class="section" id="skiperrors">
<h1><a class="toc-backref" href="#id9">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 to <tt class="docutils literal"><span class="pre">True</span></tt>, rest2web will display the error and move to the next file. The default is <tt class="docutils literal"><span class="pre">False</span></tt>.</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 class="section" id="macros">
<h1><a class="toc-backref" href="#id10">macros</a></h1>
<p>This option is the path to an optional <em>'macros'</em> file.</p>
<p>rest2web has a standard set of default macros built into it. You can also create additional macros in an external file. This option specifies the path to your macros file. It should be a file called 'macros.py'.</p>
<p>For details of how this works, please see the <a class="reference external" href="macros.html">macros page</a>. This option allows you to have different macro files for all the sites that you create with rest2web.</p>
<p>If you set it to <tt class="docutils literal"><span class="pre">''</span></tt>, then no macros file will be used for this site.</p>
</div>
<div class="section" id="macro-paths">
<h1><a class="toc-backref" href="#id11">Macro Paths</a></h1>
<p>The default macros include <tt class="docutils literal"><span class="pre">smiley</span></tt> and <tt class="docutils literal"><span class="pre">emoticon</span></tt>. They provide very easy ways to include smilies and small images in your pages. In order to do this rest2web needs to know the filepath to your smiley directory and the URL paths to the smilies and images on your website.</p>
<p>These options are specified in a section called <tt class="docutils literal"><span class="pre">Macro</span> <span class="pre">Paths</span></tt> :</p>
<pre class="literal-block">
[Macro Paths]
smiley_directory  = ''
smiley_url = '&lt;% path_to_root %&gt;images/smilies/'
emoticon_url = '&lt;% path_to_root %&gt;images/'
</pre>
<p>If you are using the standard set of smilies supplied with rest2web, then you need not supply a path to the smiley directory, as in the example above.</p>
<p>See the <a class="reference external" href="macros.html">macros page</a> for details of all the default macros.</p>
</div>
<div class="section" id="psyco">
<h1><a class="toc-backref" href="#id12">psyco</a></h1>
<p><em>'psyco'</em> should be set to <tt class="docutils literal"><span class="pre">True</span></tt> or <tt class="docutils literal"><span class="pre">False</span></tt>. If <tt class="docutils literal"><span class="pre">True</span></tt>, <strong>rest2web</strong> will attempt to use <tt class="docutils literal"><span class="pre">psyco.full()</span></tt>.</p>
<p>If you have <a class="reference external" href="http://psyco.sourceforge.net">psyco</a> installed <strong>rest2web</strong> runs faster, but I have had a problem with psyco reported on one Linux platform.</p>
<p>Not having <em>psyco</em> installled and setting this value to <tt class="docutils literal"><span class="pre">True</span></tt> will have no effect. It won't prevent rest2web from running though.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p>If you want psyco for windoze, the latest version is only available from
<acronym title="Subversion">SVN</acronym> repository.</p>
<p class="last">You can obtain precompiled binaries for windows from
<a class="reference external" href="http://www.voidspace.org.uk/python/modules.shtml#psyco">www.voidspace.org.uk/python/modules.shtml#psyco</a>.</p>
</div>
</div>
<div class="section" id="pause">
<h1><a class="toc-backref" href="#id13">pause</a></h1>
<p><em>'pause'</em> should be set to <tt class="docutils literal"><span class="pre">True</span></tt> or <tt class="docutils literal"><span class="pre">False</span></tt>. If <tt class="docutils literal"><span class="pre">True</span></tt>, after finishing
<strong>rest2web</strong> will wait for the user to hit enter before exiting.</p>
<p>This can be ueful on the Windoze platform where you launch rest2web by double clicking on r2w.py.</p>
</div>
<div class="section" id="promote-headers">
<h1><a class="toc-backref" href="#id14">promote_headers</a></h1>
<p><em>'promote_headers'</em> defaults to <tt class="docutils literal"><span class="pre">True</span></tt>. If this is set to <tt class="docutils literal"><span class="pre">False</span></tt> then lone section headers <em>won't</em> be promoted to titles if an explicit 'page-title is set. This is the equivalent of the docutils <a class="reference external" href="http://docutils.sourceforge.net/docs/user/config.html#standalone-reader">doctitle_xform</a> option.</p>
</div>
<div class="section" id="debug">
<h1><a class="toc-backref" href="#id15">DEBUG</a></h1>
<p>This value is optional. <em>'DEBUG'</em> should be set to <tt class="docutils literal"><span class="pre">True</span></tt> or <tt class="docutils literal"><span class="pre">False</span></tt>. If
<tt class="docutils literal"><span class="pre">True</span></tt>, then before rendering each page <strong>rest2web</strong> will drop you into an
interactive interpreter session inside the namespace of the page.</p>
<p>As well as all the normal values in the namespace there is an <tt class="docutils literal"><span class="pre">exit()</span></tt>
function which calls <tt class="docutils literal"><span class="pre">sys.exit()</span></tt>. You also have the values <tt class="docutils literal"><span class="pre">local_vars</span></tt>,
<tt class="docutils literal"><span class="pre">self</span></tt> and <tt class="docutils literal"><span class="pre">temp_file</span></tt>. These are the local variables from where the
namespace was <em>built</em>, the processor object, and the template file.</p>
</div>
<div class="section" id="uservalues">
<h1><a class="toc-backref" href="#id16">Uservalues</a></h1>
<p>Uservalues are values that use in your pages and templates, using the rest2web
<a class="reference external" href="templating.html">Templating</a> system. You can set uservalues in individual
pages. By using a single page template and different uservalues you can easily
have different translations of the same content without having to reproduce the
structure of each page. See <a class="reference external" href="reference/uservalues.html">Uservalues</a> for more
details.</p>
<p>You can also store uservalues in your config file. These are 'global'
uservalues which are available in every page. You could put things like your
program version number, or a site title in here, and use in any of your pages.</p>
<p>They should appear in the config file in a section called <tt class="docutils literal"><span class="pre">uservalues</span></tt>. Like
this :</p>
<pre class="literal-block">
[uservalues]
site_title = My Program Documentation
version = 1.0.0
</pre>
<p>You can then use this in your pages or templates, like this :</p>
<pre class="literal-block">
Welcome to &lt;% site_title %&gt;.

This is version &lt;% version %&gt;.
</pre>
<p>If your uservalues contain non-ascii characters, you can specify the encoding
with a special value : <tt class="docutils literal"><span class="pre">__encoding__</span></tt>.</p>
<p>For example, to specify the UTF-8 character set :</p>
<pre class="literal-block">
[uservalues]
__encoding__ = UTF-8
site_title = My Program Documentation
version = 1.0.0
</pre>
<hr class="docutils" />
<table class="docutils footnote" frame="void" id="id4" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td>The old default filename was <tt class="docutils literal"><span class="pre">rest2web.ini</span></tt>. This is deprecated but
still supported. Support for this will be removed in a future version
of rest2web.</td></tr>
</tbody>
</table>
</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>Sat Dec 16 20:39:32 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&amp;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 &copy; 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>