Index of /0.4

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[TXT]BUGS.html 2006-01-09 19:55 13K 
[TXT]BUGS.txt 2005-12-28 23:48 9.4K 
[TXT]COPYING.html 2006-01-09 19:55 8.0K 
[TXT]COPYING.txt 2005-12-09 04:21 5.1K 
[TXT]FAQ.html 2006-01-09 19:55 62K 
[TXT]FAQ.txt 2005-12-09 04:21 39K 
[TXT]HISTORY.html 2006-01-09 19:55 121K 
[TXT]HISTORY.txt 2006-01-09 19:54 79K 
[TXT]RELEASE-NOTES.html 2006-01-09 19:56 8.5K 
[TXT]RELEASE-NOTES.txt 2006-01-09 19:26 4.5K 
[TXT]THANKS.html 2006-01-09 19:56 5.5K 
[TXT]THANKS.txt 2006-01-05 12:57 3.0K 
[DIR]docs/ 2006-01-09 19:56 -  
[DIR]docutils/ 2008-08-12 08:19 -  
[DIR]licenses/ 2008-08-12 08:20 -  
[DIR]tools/ 2008-08-12 08:19 -  

README: Docutils

README: Docutils

Author: David Goodger
Contact: goodger@users.sourceforge.net
Date: 2005-12-14
Web site:http://docutils.sourceforge.net/
Copyright: This document has been placed in the public domain.

Contents

Quick-Start

This is for those who want to get up & running quickly. Read on for complete details.

  1. Get and install the latest release of Python, available from

    http://www.python.org/

    Python 2.2 or later [1] is required; Python 2.2.2 or later is recommended.

  2. Use the latest Docutils code. Get the code from Subversion or from the snapshot:

    http://docutils.sf.net/docutils-snapshot.tgz

    See Releases & Snapshots below for details.

  3. Unpack the tarball in a temporary directory (not directly in Python's site-packages) and run install.py with admin rights. On Windows systems it may be sufficient to double-click install.py. On Unix or Mac OS X, type:

    su
    (enter admin password)
    ./install.py
    

    See Installation below for details.

  4. Use a front-end tool from the "tools" subdirectory of the same directory as in step 3. For example:

    cd tools
    ./rst2html.py ../FAQ.txt ../FAQ.html        (Unix)
    python rst2html.py ..\FAQ.txt ..\FAQ.html   (Windows)
    

    See Usage below for details.

Purpose

The purpose of the Docutils project is to create a set of tools for processing plaintext documentation into useful formats, such as HTML, XML, and LaTeX. Support for the following sources has been implemented:

Support for the following sources is planned:

Releases & Snapshots

While we are trying to follow a "release early & often" policy, features are added very frequently. Since the code in the Subversion repository is usually in a bug-free state, we recommend that you use the current snapshot (which is usually updated within an hour of changes being committed to the repository):

To keep up to date on the latest developments, download fresh copies of the snapshots regularly. New functionality is being added weekly, sometimes daily. (There's also the Subversion repository.)

Requirements

To run the code, Python 2.2 or later [1] must already be installed. The latest release is recommended. Python is available from http://www.python.org/.

The Python Imaging Library, or PIL, is used for some image manipulation operations if it is installed.

[1](1, 2) Python 2.1 may be used providing the compiler package is installed. The compiler package can be found in the Tools/ directory of Python 2.1's source distribution.

Project Files & Directories

Installation

The first step is to expand the .tgz archive in a temporary directory (not directly in Python's site-packages). It contains a distutils setup file "setup.py". OS-specific installation instructions follow.

GNU/Linux, BSDs, Unix, Mac OS X, etc.

  1. Open a shell.

  2. Go to the directory created by expanding the archive:

    cd <archive_directory_path>
    
  3. Install the package:

    python setup.py install
    

    If the python executable isn't on your path, you'll have to specify the complete path, such as /usr/local/bin/python. You may need root permissions to complete this step.

    You can also just run install.py; it does the same thing.

Windows

Just double-click install.py. If this doesn't work, try the following:

  1. Open a DOS Box (Command Shell, MS-DOS Prompt, or whatever they're calling it these days).

  2. Go to the directory created by expanding the archive:

    cd <archive_directory_path>
    
  3. Install the package:

    <path_to_python.exe>\python setup.py install
    

Usage

After unpacking and installing the Docutils package, the following shell commands will generate HTML for all included documentation:

cd <archive_directory_path>/tools
./buildhtml.py ../

On Windows systems, type:

cd <archive_directory_path>\tools
python buildhtml.py ..

The final directory name of the <archive_directory_path> is "docutils" for snapshots. For official releases, the directory may be called "docutils-X.Y.Z", where "X.Y.Z" is the release version. Alternatively:

cd <archive_directory_path>
tools/buildhtml.py --config=tools/docutils.conf          (Unix)
python tools\buildhtml.py --config=tools\docutils.conf   (Windows)

Some files may generate system messages (warnings and errors). The docs/user/rst/demo.txt file (under the archive directory) contains 5 intentional errors. (They test the error reporting mechanism!)

There are many front-end tools in the unpacked "tools" subdirectory. You may want to begin with the "rst2html.py" front-end tool. Most tools take up to two arguments, the source path and destination path, with STDIN and STDOUT being the defaults. Use the "--help" option to the front-end tools for details on options and arguments. See Docutils Front-End Tools (docs/user/tools.txt) for full documentation.

The package modules are continually growing and evolving. The docutils.statemachine module is usable independently. It contains extensive inline documentation (in reStructuredText format of course).

Contributions are welcome!

Running the Test Suite

To run the entire test suite, after installation open a shell and use the following commands:

cd <archive_directory_path>/test
./alltests.py

Under Windows, type:

cd <archive_directory_path>\test
python alltests.py

You should see a long line of periods, one for each test, and then a summary like this:

Ran 518 tests in 24.653s

OK
Elapsed time: 26.189 seconds

The number of tests will grow over time, and the times reported will depend on the computer running the tests. The difference between the two times represents the time required to set up the tests (import modules, create data structures, etc.).

If any of the tests fail, please open a bug report, send email, or post a message via the web interface. Please include all relevant output, information about your operating system, Python version, and Docutils version. To see the Docutils version, use these commands in the shell:

cd ../tools
./quicktest.py --version

Windows users type these commands:

cd ..\tools
python quicktest.py --version

Getting Help

If you have questions or need assistance with Docutils or reStructuredText, please post a message to the Docutils-users mailing list.