6 :Contact: goodger@users.sourceforge.net
8 :Web site: http://docutils.sourceforge.net/
13 Thank you for downloading the Python Docutils project archive. As
14 this is a work in progress, please check the project website for
15 updated working files. This project should be considered highly
16 experimental; APIs are subject to change at any time.
18 The purpose of the Docutils project is to create a set of tools for
19 processing plaintext documentation into useful formats, such as HTML,
20 XML, and TeX. Support for the following sources has been implemented:
24 * `PEPs (Python Enhancement Proposals)`_.
26 Support for the following sources is planned:
28 * Inline documentation from Python modules and packages, extracted
29 with namespace context. **This is the focus of the current
32 * Email (RFC-822 headers, quoted excerpts, signatures, MIME parts).
34 * Wikis, with global reference lookups of "wiki links".
36 * Compound documents, such as multiple chapter files merged into a
39 * And others as discovered.
41 .. _PEPs (Python Enhancement Proposals):
42 http://www.python.org/peps/pep-0012.html
48 Putting together an official "Release" of Docutils is a significant
49 effort, so it isn't done that often. In the meantime, the CVS
50 snapshots always contain the latest code and documentation, usually
51 updated within an hour of changes being committed to the repository,
54 * Snapshot of Docutils code, tests, documentation, and
55 specifications: http://docutils.sf.net/docutils-snapshot.tgz
57 * Snapshot of the Sandbox (experimental, contributed code):
58 http://docutils.sf.net/docutils-sandbox-snapshot.tgz
60 * Snapshot of web files (the files that generate the web site):
61 http://docutils.sf.net/docutils-web-snapshot.tgz
63 To keep up to date on the latest developments, download fresh copies
64 of the snapshots regularly. New functionality is being added weekly,
65 sometimes daily. (There's also the CVS repository, and a mailing list
66 for CVS messages. See the web site [address above] or spec/notes.txt
73 To run the code, Python 2.1 or later must already be installed. The
74 latest release is recommended (2.1.3 or 2.2.1 as of this writing).
75 Python is available from http://www.python.org/.
78 Project Files & Directories
79 ===========================
81 * README.txt: You're reading it.
83 * COPYING.txt: Copyright details for non-public-domain files (most are
86 * HISTORY.txt: Release notes for the current and previous project
89 * setup.py: Installation script. See "Installation" below.
91 * install.py: Quick & dirty installation script. Just run it.
93 * docutils: The project source directory, installed as a Python
96 * docs: The project user documentation directory. Contains the
99 - docs/tools.txt: Docutils Front-End Tools
100 - docs/rst/quickstart.txt: A ReStructuredText Primer
101 - docs/rst/quickref.html: Quick reStructuredText (HTML only)
103 * spec: The project specification directory. Contains PEPs (Python
104 Enhancement Proposals), XML DTDs (document type definitions), and
105 other documents. The ``spec/rst`` directory contains the
106 reStructuredText specification. The ``spec/howto`` directory
107 contains How-To documents for developers.
109 * tools: Directory for Docutils front-end tools. See docs/tools.txt
112 * test: Unit tests. Not required to use the software, but very useful
113 if you're planning to modify it. See `Running the Test Suite`_
120 The first step is to expand the ``.tar.gz`` or ``.tgz`` archive. It
121 contains a distutils setup file "setup.py". OS-specific installation
125 GNU/Linux, BSDs, Unix, MacOS X, etc.
126 ------------------------------------
130 2. Go to the directory created by expanding the archive::
132 cd <archive_directory_path>
134 3. Install the package::
136 python setup.py install
138 If the python executable isn't on your path, you'll have to specify
139 the complete path, such as /usr/local/bin/python. You may need
140 root permissions to complete this step.
142 You can also just run install.py; it does the same thing.
148 1. Open a DOS box (Command Shell, MSDOS Prompt, or whatever they're
149 calling it these days).
151 2. Go to the directory created by expanding the archive::
153 cd <archive_directory_path>
155 3. Install the package::
157 <path_to_python.exe>\python setup.py install
159 If your system is set up to run Python when you double-click on .py
160 files, you can run install.py to do the same as the above.
166 1. Open the folder containing the expanded archive.
168 2. Double-click on the file "setup.py", which should be a "Python
171 If the file isn't a "Python module", the line endings are probably
172 also wrong, and you will need to set up your system to recognize
173 ".py" file extensions as Python files. See
174 http://gotools.sourceforge.net/mac/python.html for detailed
175 instructions. Once set up, it's easiest to start over by expanding
178 3. The distutils options window will appear. From the "Command" popup
179 list choose "install", click "Add", then click "OK".
181 If install.py is a "Python module" (see step 2 above if it isn't), you
182 can run it instead of the above. The distutils options window will
189 After unpacking and installing the Docutils package, the following
190 shell commands will generate HTML for all included documentation::
192 cd <archive_directory_path>/tools
195 The final directory name of the ``<archive_directory_path>`` is
196 "docutils" for snapshots. For official releases, the directory may be
197 called "docutils-X.Y", where "X.Y" is the release version.
200 cd <archive_directory_path>
201 tools/buildhtml.py --config=tools/docutils.conf
203 Some files may generate system messages (warnings and errors). The
204 ``tools/test.txt`` file contains 5 intentional errors. (They test the
205 error reporting mechanism!)
207 There are many front-end tools in the unpacked "tools" subdirectory.
208 Most tools take up to two arguments, the source path and destination
209 path, with STDIN and STDOUT being the defaults. Use the "--help"
210 option to the front-end tools for details on options and arguments.
211 See `Docutils Front-End Tools`_ (``docs/tools.txt``) for full
214 The package modules are continually growing and evolving. The
215 ``docutils.statemachine`` module is usable independently. It contains
216 extensive inline documentation (in reStructuredText format of course).
218 Contributions are welcome!
220 .. _Docutils Front-End Tools: docs/tools.html
223 Running the Test Suite
224 ======================
226 To run the entire test suite, after installation_ open a shell and use
227 the following commands::
229 cd <archive_directory_path>/test
232 You should see a long line of periods, one for each test, and then a
235 Ran 518 tests in 24.653s
238 Elapsed time: 26.189 seconds
240 The number of tests will grow over time, and the times reported will
241 depend on the computer running the tests. The difference between the
242 two times represents the time required to set up the tests (import
243 modules, create data structures, etc.).
245 If any of the tests fail, please `open a bug report`_ or `send
246 email`_. Please include all relevant output, information about your
247 operating system, Python version, and Docutils version. To see the
248 Docutils version, use these commands::
251 ./quicktest.py --version
253 .. _open a bug report:
254 http://sourceforge.net/tracker/?group_id=38414&atid=422030
255 .. _send email: mailto:docutils-users@lists.sourceforge.net
256 ?subject=Docutils%20test%20suite%20failure
262 If you have questions or need assistance with Docutils or
263 reStructuredText, please `post a message`_ to the `Docutils-Users
266 .. _post a message: mailto:docutils-users@lists.sourceforge.net
267 .. _Docutils-Users mailing list:
268 http://lists.sourceforge.net/lists/listinfo/docutils-users
274 indent-tabs-mode: nil
275 sentence-end-double-space: t