summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Smith <zd@zdsmith.com>2018-05-02 10:05:13 -0400
committerZach Smith <zd@zdsmith.com>2018-05-02 10:05:13 -0400
commitb0ba0afdd8dba25358340c12a087cf18d7832c9b (patch)
tree0db178e7b64c42c3801b31ffe51d4c46475043b1
parentef2c72a6d69200b8bb806957cf68cd17e26504b1 (diff)
downloadpycco-gh-pages.tar.gz
Update docsgh-pages
-rw-r--r--index.html355
1 files changed, 172 insertions, 183 deletions
diff --git a/index.html b/index.html
index 288d597..4ab4085 100644
--- a/index.html
+++ b/index.html
@@ -17,7 +17,42 @@
<div class='octowrap'>
<a class='octothorpe' href='#section-0'>#</a>
</div>
-
+ <p>&ldquo;<strong>Pycco</strong>&rdquo; is a Python port of <a href="http://jashkenas.github.com/docco/">Docco</a>:
+the original quick-and-dirty, hundred-line-long, literate-programming-style
+documentation generator. It produces HTML that displays your comments alongside
+your code. Comments are passed through <a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a> and
+<a href="https://python-markdown.github.io/extensions/footnotes/">SmartyPants</a><sup id="fnref:extensions"><a class="footnote-ref" href="#fn:extensions" rel="footnote">1</a></sup>, while code is passed through
+<a href="http://pygments.org/">Pygments</a> for syntax highlighting.</p>
+<p>This page is the result of running Pycco against its own source file.</p>
+<p>If you install Pycco, you can run it from the command-line:</p>
+<pre><code>pycco src/*.py
+</code></pre>
+<p>This will generate linked HTML documentation for the named source files,
+saving it into a <code>docs</code> folder by default.</p>
+<p>The <a href="https://github.com/pycco-docs/pycco">source for Pycco</a> is available on GitHub,
+and released under the MIT license.</p>
+<p>To install Pycco, simply</p>
+<pre><code>pip install pycco
+</code></pre>
+<p>Or, to install the latest source</p>
+<pre><code>git clone git://github.com/pycco-docs/pycco.git
+cd pycco
+python setup.py install
+</code></pre>
+<div class="footnote">
+<hr />
+<ol>
+<li id="fn:extensions">
+<p>Three extensions to Markdown are available:</p>
+<ol>
+<li><a href="https://python-markdown.github.io/extensions/smarty/">SmartyPants</a></li>
+<li><a href="https://python-markdown.github.io/extensions/fenced_code_blocks/">Fenced code blocks</a></li>
+<li><a href="https://python-markdown.github.io/extensions/footnotes/">Footnotes</a></li>
+</ol>
+<p><a class="footnote-backref" href="#fnref:extensions" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p>
+</li>
+</ol>
+</div>
</div>
<div class='code'>
<div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">__future__</span> <span class="kn">import</span> <span class="n">absolute_import</span><span class="p">,</span> <span class="n">print_function</span></pre></div>
@@ -40,6 +75,8 @@
<span class="kn">from</span> <span class="nn">os</span> <span class="kn">import</span> <span class="n">path</span>
<span class="kn">import</span> <span class="nn">pygments</span>
+<span class="kn">from</span> <span class="nn">pygments</span> <span class="kn">import</span> <span class="n">formatters</span><span class="p">,</span> <span class="n">lexers</span>
+
<span class="kn">from</span> <span class="nn">markdown</span> <span class="kn">import</span> <span class="n">markdown</span>
<span class="kn">from</span> <span class="nn">pycco.generate_index</span> <span class="kn">import</span> <span class="n">generate_index</span>
<span class="kn">from</span> <span class="nn">pycco.languages</span> <span class="kn">import</span> <span class="n">supported_languages</span>
@@ -55,8 +92,7 @@
<p>This module contains all of our static resources.</p>
</div>
<div class='code'>
- <div class="highlight"><pre><span class="kn">from</span> <span class="nn">pycco_resources</span> <span class="kn">import</span> <span class="n">pycco_template</span>
-<span class="kn">from</span> <span class="nn">pygments</span> <span class="kn">import</span> <span class="n">formatters</span><span class="p">,</span> <span class="n">lexers</span></pre></div>
+ <div class="highlight"><pre><span class="kn">from</span> <span class="nn">pycco_resources</span> <span class="kn">import</span> <span class="n">pycco_template</span></pre></div>
</div>
</div>
<div class='clearall'></div>
@@ -65,42 +101,7 @@
<div class='octowrap'>
<a class='octothorpe' href='#section-3'>#</a>
</div>
- <p>&ldquo;<strong>Pycco</strong>&rdquo; is a Python port of <a href="http://jashkenas.github.com/docco/">Docco</a>:
-the original quick-and-dirty, hundred-line-long, literate-programming-style
-documentation generator. It produces HTML that displays your comments alongside
-your code. Comments are passed through <a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a> and
-<a href="https://python-markdown.github.io/extensions/footnotes/">SmartyPants</a><sup id="fnref:extensions"><a class="footnote-ref" href="#fn:extensions" rel="footnote">1</a></sup>, while code is passed through
-<a href="http://pygments.org/">Pygments</a> for syntax highlighting.</p>
-<p>This page is the result of running Pycco against its own source file.</p>
-<p>If you install Pycco, you can run it from the command-line:</p>
-<pre><code>pycco src/*.py
-</code></pre>
-<p>This will generate linked HTML documentation for the named source files,
-saving it into a <code>docs</code> folder by default.</p>
-<p>The <a href="https://github.com/pycco-docs/pycco">source for Pycco</a> is available on GitHub,
-and released under the MIT license.</p>
-<p>To install Pycco, simply</p>
-<pre><code>pip install pycco
-</code></pre>
-<p>Or, to install the latest source</p>
-<pre><code>git clone git://github.com/pycco-docs/pycco.git
-cd pycco
-python setup.py install
-</code></pre>
-<div class="footnote">
-<hr />
-<ol>
-<li id="fn:extensions">
-<p>Three extensions to Markdown are available:</p>
-<ol>
-<li><a href="https://python-markdown.github.io/extensions/smarty/">SmartyPants</a></li>
-<li><a href="https://python-markdown.github.io/extensions/fenced_code_blocks/">Fenced code blocks</a></li>
-<li><a href="https://python-markdown.github.io/extensions/footnotes/">Footnotes</a></li>
-</ol>
-<p><a class="footnote-backref" href="#fnref:extensions" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p>
-</li>
-</ol>
-</div>
+ <h3><span id="main-documentation-generation-functions" href="main-documentation-generation-functions"> Main Documentation Generation Functions </span></h3>
</div>
<div class='code'>
<div class="highlight"><pre></pre></div>
@@ -112,18 +113,6 @@ python setup.py install
<div class='octowrap'>
<a class='octothorpe' href='#section-4'>#</a>
</div>
- <h3><span id="main-documentation-generation-functions" href="main-documentation-generation-functions"> Main Documentation Generation Functions </span></h3>
- </div>
- <div class='code'>
- <div class="highlight"><pre></pre></div>
- </div>
- </div>
- <div class='clearall'></div>
- <div class='section' id='section-5'>
- <div class='docs'>
- <div class='octowrap'>
- <a class='octothorpe' href='#section-5'>#</a>
- </div>
<p>Generate the documentation for a source file by reading it in, splitting it
up into comment/code sections, highlighting them for the appropriate
language, and merging them into an HTML template.</p>
@@ -134,10 +123,10 @@ language, and merging them into an HTML template.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-6'>
+ <div class='section' id='section-5'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-6'>#</a>
+ <a class='octothorpe' href='#section-5'>#</a>
</div>
</div>
@@ -149,10 +138,10 @@ language, and merging them into an HTML template.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-7'>
+ <div class='section' id='section-6'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-7'>#</a>
+ <a class='octothorpe' href='#section-6'>#</a>
</div>
<p>Helper function to allow documentation generation without file handling.</p>
</div>
@@ -161,10 +150,10 @@ language, and merging them into an HTML template.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-8'>
+ <div class='section' id='section-7'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-8'>#</a>
+ <a class='octothorpe' href='#section-7'>#</a>
</div>
</div>
@@ -176,10 +165,10 @@ language, and merging them into an HTML template.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-9'>
+ <div class='section' id='section-8'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-9'>#</a>
+ <a class='octothorpe' href='#section-8'>#</a>
</div>
<p>Given a string of source code, parse out each comment and the code that
follows it, and create an individual <strong>section</strong> for it.
@@ -197,10 +186,10 @@ Sections take the form:</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-10'>
+ <div class='section' id='section-9'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-10'>#</a>
+ <a class='octothorpe' href='#section-9'>#</a>
</div>
</div>
@@ -220,10 +209,10 @@ Sections take the form:</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-11'>
+ <div class='section' id='section-10'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-11'>#</a>
+ <a class='octothorpe' href='#section-10'>#</a>
</div>
</div>
@@ -237,10 +226,10 @@ Sections take the form:</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-12'>
+ <div class='section' id='section-11'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-12'>#</a>
+ <a class='octothorpe' href='#section-11'>#</a>
</div>
<p>Setup the variables to get ready to check for multiline comments</p>
</div>
@@ -255,10 +244,10 @@ Sections take the form:</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-13'>
+ <div class='section' id='section-12'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-13'>#</a>
+ <a class='octothorpe' href='#section-12'>#</a>
</div>
<p>Only go into multiline comments section when one of the delimiters is
found to be at the start of a line</p>
@@ -289,10 +278,10 @@ found to be at the start of a line</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-14'>
+ <div class='section' id='section-13'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-14'>#</a>
+ <a class='octothorpe' href='#section-13'>#</a>
</div>
<p>Get rid of the delimiters so that they aren&rsquo;t in the final
docs</p>
@@ -312,10 +301,10 @@ docs</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-15'>
+ <div class='section' id='section-14'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-15'>#</a>
+ <a class='octothorpe' href='#section-14'>#</a>
</div>
<p>Remove leading spaces</p>
</div>
@@ -350,10 +339,10 @@ docs</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-16'>
+ <div class='section' id='section-15'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-16'>#</a>
+ <a class='octothorpe' href='#section-15'>#</a>
</div>
<h3><span id="preprocessing-the-comments" href="preprocessing-the-comments"> Preprocessing the comments </span></h3>
</div>
@@ -362,10 +351,10 @@ docs</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-17'>
+ <div class='section' id='section-16'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-17'>#</a>
+ <a class='octothorpe' href='#section-16'>#</a>
</div>
<p>Add cross-references before having the text processed by markdown. It&rsquo;s
possible to reference another file, like this : <code>[[main.py]]</code> which renders
@@ -381,10 +370,10 @@ signs:
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-18'>
+ <div class='section' id='section-17'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-18'>#</a>
+ <a class='octothorpe' href='#section-17'>#</a>
</div>
</div>
@@ -394,10 +383,10 @@ signs:
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-19'>
+ <div class='section' id='section-18'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-19'>#</a>
+ <a class='octothorpe' href='#section-18'>#</a>
</div>
</div>
@@ -407,10 +396,10 @@ signs:
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-20'>
+ <div class='section' id='section-19'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-20'>#</a>
+ <a class='octothorpe' href='#section-19'>#</a>
</div>
</div>
@@ -419,10 +408,10 @@ signs:
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-21'>
+ <div class='section' id='section-20'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-21'>#</a>
+ <a class='octothorpe' href='#section-20'>#</a>
</div>
<p>Check if the match contains an anchor</p>
</div>
@@ -443,10 +432,10 @@ signs:
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-22'>
+ <div class='section' id='section-21'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-22'>#</a>
+ <a class='octothorpe' href='#section-21'>#</a>
</div>
<p>Replace equals-sign-formatted section names with anchor links.</p>
</div>
@@ -455,10 +444,10 @@ signs:
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-23'>
+ <div class='section' id='section-22'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-23'>#</a>
+ <a class='octothorpe' href='#section-22'>#</a>
</div>
</div>
@@ -476,10 +465,10 @@ signs:
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-24'>
+ <div class='section' id='section-23'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-24'>#</a>
+ <a class='octothorpe' href='#section-23'>#</a>
</div>
<h3><span id="highlighting-the-source-code" href="highlighting-the-source-code"> Highlighting the source code </span></h3>
</div>
@@ -488,10 +477,10 @@ signs:
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-25'>
+ <div class='section' id='section-24'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-25'>#</a>
+ <a class='octothorpe' href='#section-24'>#</a>
</div>
<p>Highlights a single chunk of code using the <strong>Pygments</strong> module, and runs
the text of its corresponding comment through <strong>Markdown</strong>.</p>
@@ -504,10 +493,10 @@ wherever our markers occur.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-26'>
+ <div class='section' id='section-25'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-26'>#</a>
+ <a class='octothorpe' href='#section-25'>#</a>
</div>
</div>
@@ -559,10 +548,10 @@ wherever our markers occur.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-27'>
+ <div class='section' id='section-26'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-27'>#</a>
+ <a class='octothorpe' href='#section-26'>#</a>
</div>
<h3><span id="html-code-generation" href="html-code-generation"> HTML Code generation </span></h3>
</div>
@@ -571,10 +560,10 @@ wherever our markers occur.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-28'>
+ <div class='section' id='section-27'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-28'>#</a>
+ <a class='octothorpe' href='#section-27'>#</a>
</div>
<p>Once all of the code is finished highlighting, we can generate the HTML
file and write out the documentation. Pass the completed sections into the
@@ -589,10 +578,10 @@ rendered template and change the identifier back to <code>{{</code>.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-29'>
+ <div class='section' id='section-28'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-29'>#</a>
+ <a class='octothorpe' href='#section-28'>#</a>
</div>
</div>
@@ -618,10 +607,10 @@ rendered template and change the identifier back to <code>{{</code>.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-30'>
+ <div class='section' id='section-29'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-30'>#</a>
+ <a class='octothorpe' href='#section-29'>#</a>
</div>
<h3><span id="helpers-&-setup" href="helpers-&-setup"> Helpers &amp; Setup </span></h3>
</div>
@@ -630,10 +619,10 @@ rendered template and change the identifier back to <code>{{</code>.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-31'>
+ <div class='section' id='section-30'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-31'>#</a>
+ <a class='octothorpe' href='#section-30'>#</a>
</div>
<p>Build out the appropriate matchers and delimiters for each language.</p>
</div>
@@ -642,10 +631,10 @@ rendered template and change the identifier back to <code>{{</code>.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-32'>
+ <div class='section' id='section-31'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-32'>#</a>
+ <a class='octothorpe' href='#section-31'>#</a>
</div>
</div>
@@ -655,10 +644,10 @@ rendered template and change the identifier back to <code>{{</code>.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-33'>
+ <div class='section' id='section-32'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-33'>#</a>
+ <a class='octothorpe' href='#section-32'>#</a>
</div>
<p>Does the line begin with a comment?</p>
</div>
@@ -667,10 +656,10 @@ rendered template and change the identifier back to <code>{{</code>.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-34'>
+ <div class='section' id='section-33'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-34'>#</a>
+ <a class='octothorpe' href='#section-33'>#</a>
</div>
<p>The dividing token we feed into Pygments, to delimit the boundaries between
sections.</p>
@@ -680,10 +669,10 @@ sections.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-35'>
+ <div class='section' id='section-34'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-35'>#</a>
+ <a class='octothorpe' href='#section-34'>#</a>
</div>
<p>The mirror of <code>divider_text</code> that we expect Pygments to return. We can split
on this to recover the original sections.</p>
@@ -695,10 +684,10 @@ on this to recover the original sections.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-36'>
+ <div class='section' id='section-35'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-36'>#</a>
+ <a class='octothorpe' href='#section-35'>#</a>
</div>
<p>Get the Pygments Lexer for this language.</p>
</div>
@@ -711,10 +700,10 @@ on this to recover the original sections.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-37'>
+ <div class='section' id='section-36'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-37'>#</a>
+ <a class='octothorpe' href='#section-36'>#</a>
</div>
<p>Get the current language we&rsquo;re documenting, based on the extension.</p>
</div>
@@ -723,10 +712,10 @@ on this to recover the original sections.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-38'>
+ <div class='section' id='section-37'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-38'>#</a>
+ <a class='octothorpe' href='#section-37'>#</a>
</div>
</div>
@@ -754,10 +743,10 @@ on this to recover the original sections.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-39'>
+ <div class='section' id='section-38'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-39'>#</a>
+ <a class='octothorpe' href='#section-38'>#</a>
</div>
<p>If pygments can&rsquo;t find any lexers, it will raise its own
subclass of ValueError. We will catch it and raise ours
@@ -768,10 +757,10 @@ for consistency.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-40'>
+ <div class='section' id='section-39'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-40'>#</a>
+ <a class='octothorpe' href='#section-39'>#</a>
</div>
<p>Compute the destination HTML path for an input source file path. If the
source is <code>lib/example.py</code>, the HTML will be at <code>docs/example.html</code>.</p>
@@ -781,10 +770,10 @@ source is <code>lib/example.py</code>, the HTML will be at <code>docs/example.ht
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-41'>
+ <div class='section' id='section-40'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-41'>#</a>
+ <a class='octothorpe' href='#section-40'>#</a>
</div>
</div>
@@ -802,10 +791,10 @@ source is <code>lib/example.py</code>, the HTML will be at <code>docs/example.ht
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-42'>
+ <div class='section' id='section-41'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-42'>#</a>
+ <a class='octothorpe' href='#section-41'>#</a>
</div>
<p>If <code>join</code> is passed an absolute path, it will ignore any earlier path
elements. We will force outdir to the beginning of the path to avoid
@@ -818,10 +807,10 @@ writing outside our destination.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-43'>
+ <div class='section' id='section-42'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-43'>#</a>
+ <a class='octothorpe' href='#section-42'>#</a>
</div>
<p>Shift items off the front of the <code>list</code> until it is empty, then return
<code>default</code>.</p>
@@ -831,10 +820,10 @@ writing outside our destination.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-44'>
+ <div class='section' id='section-43'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-44'>#</a>
+ <a class='octothorpe' href='#section-43'>#</a>
</div>
</div>
@@ -846,10 +835,10 @@ writing outside our destination.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-45'>
+ <div class='section' id='section-44'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-45'>#</a>
+ <a class='octothorpe' href='#section-44'>#</a>
</div>
</div>
@@ -858,10 +847,10 @@ writing outside our destination.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-46'>
+ <div class='section' id='section-45'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-46'>#</a>
+ <a class='octothorpe' href='#section-45'>#</a>
</div>
<p>Sanitization regexp copied from
http://stackoverflow.com/questions/92438/stripping-non-printable-characters-from-a-string-in-python</p>
@@ -875,10 +864,10 @@ http://stackoverflow.com/questions/92438/stripping-non-printable-characters-from
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-47'>
+ <div class='section' id='section-46'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-47'>#</a>
+ <a class='octothorpe' href='#section-46'>#</a>
</div>
<p>Sanitize directory string and ensure that the destination directory exists.</p>
</div>
@@ -887,10 +876,10 @@ http://stackoverflow.com/questions/92438/stripping-non-printable-characters-from
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-48'>
+ <div class='section' id='section-47'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-48'>#</a>
+ <a class='octothorpe' href='#section-47'>#</a>
</div>
</div>
@@ -903,10 +892,10 @@ http://stackoverflow.com/questions/92438/stripping-non-printable-characters-from
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-49'>
+ <div class='section' id='section-48'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-49'>#</a>
+ <a class='octothorpe' href='#section-48'>#</a>
</div>
<p>The start of each Pygments highlight block.</p>
</div>
@@ -915,10 +904,10 @@ http://stackoverflow.com/questions/92438/stripping-non-printable-characters-from
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-50'>
+ <div class='section' id='section-49'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-50'>#</a>
+ <a class='octothorpe' href='#section-49'>#</a>
</div>
<p>The end of each Pygments highlight block.</p>
</div>
@@ -927,10 +916,10 @@ http://stackoverflow.com/questions/92438/stripping-non-printable-characters-from
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-51'>
+ <div class='section' id='section-50'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-51'>#</a>
+ <a class='octothorpe' href='#section-50'>#</a>
</div>
<p>This function will iterate through the list of sources and if a directory
is encountered it will walk the tree for any files.</p>
@@ -940,10 +929,10 @@ is encountered it will walk the tree for any files.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-52'>
+ <div class='section' id='section-51'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-52'>#</a>
+ <a class='octothorpe' href='#section-51'>#</a>
</div>
</div>
@@ -961,10 +950,10 @@ is encountered it will walk the tree for any files.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-53'>
+ <div class='section' id='section-52'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-53'>#</a>
+ <a class='octothorpe' href='#section-52'>#</a>
</div>
<p>For each source file passed as argument, generate the documentation.</p>
</div>
@@ -974,10 +963,10 @@ is encountered it will walk the tree for any files.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-54'>
+ <div class='section' id='section-53'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-54'>#</a>
+ <a class='octothorpe' href='#section-53'>#</a>
</div>
</div>
@@ -987,10 +976,10 @@ is encountered it will walk the tree for any files.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-55'>
+ <div class='section' id='section-54'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-55'>#</a>
+ <a class='octothorpe' href='#section-54'>#</a>
</div>
<p>Make a copy of sources given on the command line. <code>main()</code> needs the
original list when monitoring for changed files.</p>
@@ -1000,10 +989,10 @@ original list when monitoring for changed files.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-56'>
+ <div class='section' id='section-55'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-56'>#</a>
+ <a class='octothorpe' href='#section-55'>#</a>
</div>
<p>Proceed to generating the documentation.</p>
</div>
@@ -1018,10 +1007,10 @@ original list when monitoring for changed files.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-57'>
+ <div class='section' id='section-56'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-57'>#</a>
+ <a class='octothorpe' href='#section-56'>#</a>
</div>
</div>
@@ -1063,10 +1052,10 @@ original list when monitoring for changed files.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-58'>
+ <div class='section' id='section-57'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-58'>#</a>
+ <a class='octothorpe' href='#section-57'>#</a>
</div>
<p>Monitor each source file and re-generate documentation on change.</p>
</div>
@@ -1075,10 +1064,10 @@ original list when monitoring for changed files.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-59'>
+ <div class='section' id='section-58'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-59'>#</a>
+ <a class='octothorpe' href='#section-58'>#</a>
</div>
</div>
@@ -1087,10 +1076,10 @@ original list when monitoring for changed files.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-60'>
+ <div class='section' id='section-59'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-60'>#</a>
+ <a class='octothorpe' href='#section-59'>#</a>
</div>
<p>The watchdog modules are imported in <code>main()</code> but we need to re-import
here to bring them into the local namespace.</p>
@@ -1101,10 +1090,10 @@ here to bring them into the local namespace.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-61'>
+ <div class='section' id='section-60'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-61'>#</a>
+ <a class='octothorpe' href='#section-60'>#</a>
</div>
<p>Watchdog operates on absolute paths, so map those to original paths
as specified on the command line.</p>
@@ -1115,10 +1104,10 @@ as specified on the command line.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-62'>
+ <div class='section' id='section-61'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-62'>#</a>
+ <a class='octothorpe' href='#section-61'>#</a>
</div>
<p>A handler for recompiling files which triggered watchdog events.</p>
</div>
@@ -1127,10 +1116,10 @@ as specified on the command line.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-63'>
+ <div class='section' id='section-62'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-63'>#</a>
+ <a class='octothorpe' href='#section-62'>#</a>
</div>
</div>
@@ -1139,10 +1128,10 @@ as specified on the command line.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-64'>
+ <div class='section' id='section-63'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-64'>#</a>
+ <a class='octothorpe' href='#section-63'>#</a>
</div>
<p>Regenerate documentation for a file which triggered an event.</p>
</div>
@@ -1151,10 +1140,10 @@ as specified on the command line.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-65'>
+ <div class='section' id='section-64'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-65'>#</a>
+ <a class='octothorpe' href='#section-64'>#</a>
</div>
<p>Re-generate documentation from a source file if it was listed on
the command line. Watchdog monitors whole directories, so other
@@ -1168,10 +1157,10 @@ files may cause notifications as well.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-66'>
+ <div class='section' id='section-65'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-66'>#</a>
+ <a class='octothorpe' href='#section-65'>#</a>
</div>
<p>Set up an observer which monitors all directories for files given on
the command line and notifies the handler defined above.</p>
@@ -1185,10 +1174,10 @@ the command line and notifies the handler defined above.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-67'>
+ <div class='section' id='section-66'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-67'>#</a>
+ <a class='octothorpe' href='#section-66'>#</a>
</div>
<p>Run the file change monitoring loop until the user hits Ctrl-C.</p>
</div>
@@ -1203,10 +1192,10 @@ the command line and notifies the handler defined above.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-68'>
+ <div class='section' id='section-67'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-68'>#</a>
+ <a class='octothorpe' href='#section-67'>#</a>
</div>
<p>Hook spot for the console script.</p>
</div>
@@ -1215,10 +1204,10 @@ the command line and notifies the handler defined above.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-69'>
+ <div class='section' id='section-68'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-69'>#</a>
+ <a class='octothorpe' href='#section-68'>#</a>
</div>
</div>
@@ -1260,10 +1249,10 @@ the command line and notifies the handler defined above.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-70'>
+ <div class='section' id='section-69'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-70'>#</a>
+ <a class='octothorpe' href='#section-69'>#</a>
</div>
<p>If the -w / --watch option was present, monitor the source directories
for changes and re-generate documentation for source files whenever they
@@ -1281,10 +1270,10 @@ are modified.</p>
</div>
</div>
<div class='clearall'></div>
- <div class='section' id='section-71'>
+ <div class='section' id='section-70'>
<div class='docs'>
<div class='octowrap'>
- <a class='octothorpe' href='#section-71'>#</a>
+ <a class='octothorpe' href='#section-70'>#</a>
</div>
<p>Run the script.</p>
</div>