The Docutils Subversion Repository. For Python 2.1/2.2, all of them must be installed (into the site-packages/ directory). Python 2.3 and later versions have textwrap

This is taken straight out of docutils/statemachine.py, in which I experimented with a simple documentation methodology. Another variation I've thought of exploits the Grouch-compatible "classifier" element of definition lists. For example:

:Parameters:
    `lines` : [string]
        List of one-line strings without newlines.
    `until_blank` : boolean
        Stop collecting at the first blank line if true (1).
    `strip_indent` : boolean
        Strip common leading indent if true (1, default).
  • Field lists could even be used in a one-to-one correspondence with JavaDoc @tags, although I doubt if I'd recommend it. Several ports of JavaDoc's @tag methodology exist in Python, most recently Ed Loper's "epydoc".

  • Other Ideas

    ./usr/share/doc/python-docutils/docs/dev/distributing.html0000644000000000000000000002453511316445353022657 0ustar rootroot Docutils Distributor's Guide

    Docutils Distributor's Guide

    Author: Lea Wiemann
    Contact: LeWiemann@gmail.com
    Revision: 5174
    Date: 2007-05-31
    Copyright: This document has been placed in the public domain.

    This document describes how to create packages of Docutils (e.g. for shipping with a Linux distribution). If you have any questions, please direct them to the Docutils-develop mailing list.

    First, please download the most current release tarball and unpack it.

    Dependencies

    Docutils has the following dependencies:

    • Python 2.1 or later is required. While the compiler package from the Tools/ directory of Python's source distribution must be installed for the test suite to pass with Python 2.1, the functionality available to end users should be available without the compiler package as well. So just use ">= Python 2.1" in the dependencies.

    • Docutils may optionally make use of the PIL (Python Imaging Library). If PIL is present, it is automatically detected by Docutils.

    • There are three files in the extras/ directory of the Docutils distribution, optparse.py, textwrap.py, and roman.py. For Python 2.1/2.2, all of them must be installed (into the site-packages/ directory). Python 2.3 and later versions have textwrap and optparse included in the standard library, so only roman.py is required here; installing the other files won't hurt, though.

      These files are automatically installed by the setup script (when calling "python setup.py install").

    Python Files

    The Docutils Python files must be installed into the site-packages/ directory of Python. Running python setup.py install should do the trick, but if you want to place the files yourself, you can just install the docutils/ directory of the Docutils tarball to /usr/lib/python/site-packages/docutils/. In this case you should also compile the Python files to .pyc and/or .pyo files so that Docutils doesn't need to be recompiled every time it's executed.

    Executables

    The executable front-end tools are located in the tools/ directory of the Docutils tarball.

    The rst2*.py tools (except rst2newlatex.py) are intended for end-users. You should install them to /usr/bin/. You do not need to change the names (e.g. to docutils-rst2html.py) because the rst2 prefix is unique.

    Documentation

    The documentation should be generated using buildhtml.py. To generate HTML for all documentation files, go to the tools/ directory and run:

    # Place html4css1.css in base direc