Release 0.7: set version number to 0.8
[docutils.git] / README.txt
blobaa9bdf89edad203a81f6ed8d57071e991b73ce00
1 ======================
2  README: Docutils 0.6
3 ======================
5 :Author: David Goodger
6 :Contact: goodger@python.org
7 :Date: $Date$
8 :Web site: http://docutils.sourceforge.net/
9 :Copyright: This document has been placed in the public domain.
11 .. contents::
14 Quick-Start
15 ===========
17 This is for those who want to get up & running quickly.  Read on for
18 complete details.
20 1. Get and install the latest release of Python, available from
22        http://www.python.org/
24    Docutils is compatible with Python versions from 2.3 up to 2.6 and
25    version 3.1. (Support for Python 3 is new and might still have some
26    issues.)
28 2. Use the latest Docutils code.  Get the code from Subversion or from
29    the snapshot:
31        http://docutils.sf.net/docutils-snapshot.tgz
33    See `Releases & Snapshots`_ below for details.
35 3. Unpack the tarball in a temporary directory (**not** directly in
36    Python's ``site-packages``) and run ``setup.py install`` or
37    ``install.py`` with admin rights.  On Windows systems it may be
38    sufficient to double-click ``install.py``.  On Unix or Mac OS X,
39    type::
41         su
42         (enter admin password)
43         ./setup.py install
45    See Installation_ below for details.
47 4. Use a front-end tool from the "tools" subdirectory of the same
48    directory as in step 3.  For example::
50        cd tools
51        ./rst2html.py ../FAQ.txt ../FAQ.html        (Unix)
52        python rst2html.py ..\FAQ.txt ..\FAQ.html   (Windows)
54    See Usage_ below for details.
57 Purpose
58 =======
60 The purpose of the Docutils project is to create a set of tools for
61 processing plaintext documentation into useful formats, such as HTML,
62 XML, and LaTeX.  Support for the following sources has been
63 implemented:
65 * Standalone files.
67 * `PEPs (Python Enhancement Proposals)`_.
69 Support for the following sources is planned:
71 * Inline documentation from Python modules and packages, extracted
72   with namespace context.
74 * Email (RFC-822 headers, quoted excerpts, signatures, MIME parts).
76 * Wikis, with global reference lookups of "wiki links".
78 * Compound documents, such as multiple chapter files merged into a
79   book.
81 * And others as discovered.
83 .. _PEPs (Python Enhancement Proposals):
84    http://www.python.org/peps/pep-0012.html
87 Releases & Snapshots
88 ====================
90 While we are trying to follow a "release early & often" policy,
91 features are added very frequently.  Since the code in the Subversion
92 repository is usually in a bug-free state, we recommend that you use
93 the current snapshot (which is usually updated within an hour of
94 changes being committed to the repository):
96 * Snapshot of Docutils code, documentation, front-end tools, and
97   tests: http://docutils.sf.net/docutils-snapshot.tgz
99 * Snapshot of the Sandbox (experimental, contributed code):
100   http://docutils.sf.net/docutils-sandbox-snapshot.tgz
102 To keep up to date on the latest developments, download fresh copies
103 of the snapshots regularly.  New functionality is being added weekly,
104 sometimes daily.  (There's also the `Subversion repository`_.)
106 .. _Subversion repository: docs/dev/repository.html
109 Requirements
110 ============
112 To run the code, Python 2.3 or later must already be installed.
113 Python is available from
114 http://www.python.org/.
116 The `Python Imaging Library`, or PIL, is used for some image
117 manipulation operations if it is installed.
119 .. _Python Imaging Library: http://www.pythonware.com/products/pil/
120 .. _Optik: http://optik.sourceforge.net/
123 Project Files & Directories
124 ===========================
126 * README.txt: You're reading it.
128 * COPYING.txt: Public Domain Dedication and copyright details for
129   non-public-domain files (most are PD).
131 * FAQ.txt: Frequently Asked Questions (with answers!).
133 * RELEASE-NOTES.txt: Summary of the major changes in recent releases.
135 * HISTORY.txt: A detailed change log, for the current and all previous
136   project releases.
138 * BUGS.txt: Known bugs, and how to report a bug.
140 * THANKS.txt: List of contributors.
142 * setup.py: Installation script.  See "Installation" below.
144 * install.py: Quick & dirty installation script.  Just run it.  For
145   any kind of customization or help though, setup.py must be used.
147 * docutils: The project source directory, installed as a Python
148   package.
150 * extras: Directory for third-party modules that Docutils depends on
151   (roman.py).  These are only installed if
152   they're not already present.
154 * docs: The project documentation directory.  Read ``docs/index.txt``
155   for an overview.
157 * docs/user: The project user documentation directory.  Contains the
158   following documents, among others:
160   - docs/user/tools.txt: Docutils Front-End Tools
161   - docs/user/latex.txt: Docutils LaTeX Writer
162   - docs/user/rst/quickstart.txt: A ReStructuredText Primer
163   - docs/user/rst/quickref.html: Quick reStructuredText (HTML only)
165 * docs/ref: The project reference directory.
166   ``docs/ref/rst/restructuredtext.txt`` is the reStructuredText
167   reference.
169 * licenses: Directory containing copies of license files for
170   non-public-domain files.
172 * tools: Directory for Docutils front-end tools.  See
173   ``docs/user/tools.txt`` for documentation.
175 * test: Unit tests.  Not required to use the software, but very useful
176   if you're planning to modify it.  See `Running the Test Suite`_
177   below.
180 Installation
181 ============
183 The first step is to expand the ``.tgz`` archive in a temporary
184 directory (**not** directly in Python's ``site-packages``).  It
185 contains a distutils setup file "setup.py".  OS-specific installation
186 instructions follow.
189 GNU/Linux, BSDs, Unix, Mac OS X, etc.
190 -------------------------------------
192 1. Open a shell.
194 2. Go to the directory created by expanding the archive::
196        cd <archive_directory_path>
198 3. Install the package::
200        python setup.py install
202    If the python executable isn't on your path, you'll have to specify
203    the complete path, such as /usr/local/bin/python.  You may need
204    root permissions to complete this step.
206    To install for a specific python version, use this version in the
207    setup call, e.g. ::
209        python3.1 setup.py install
212 Windows
213 -------
215 Just double-click ``install.py``.  If this doesn't work, try the
216 following:
218 1. Open a DOS Box (Command Shell, MS-DOS Prompt, or whatever they're
219    calling it these days).
221 2. Go to the directory created by expanding the archive::
223        cd <archive_directory_path>
225 3. Install the package::
227        <path_to_python.exe>\python setup.py install
229    To install for a specific python version, specify the Python
230    executable for this version.
233 Python 3 peculiarities
234 ----------------------
236 If called from Python 3, setup.py, in addition to copying the sources
237 to the right place, will also convert them using 2to3 to Python 3
238 compatible code.
240 * If you want to test or develop Docutils, also run ``python3 setup.py
241   build``. This will generate Python 3 compatible sources, tests and
242   developer tools in the build directory.  Do changes on the Python 2
243   versions of the sources and re-run the build command. This works
244   incrementally, so if you change one file it will only reconvert that
245   file the next time you run setup.py build.
248 Usage
249 =====
251 After unpacking and installing the Docutils package, the following
252 shell commands will generate HTML for all included documentation::
254     cd <archive_directory_path>/tools
255     ./buildhtml.py ../
257 On Windows systems, type::
259     cd <archive_directory_path>\tools
260     python buildhtml.py ..
262 The final directory name of the ``<archive_directory_path>`` is
263 "docutils" for snapshots.  For official releases, the directory may be
264 called "docutils-X.Y.Z", where "X.Y.Z" is the release version.
265 Alternatively::
267     cd <archive_directory_path>
268     tools/buildhtml.py --config=tools/docutils.conf          (Unix)
269     python tools\buildhtml.py --config=tools\docutils.conf   (Windows)
271 With Python 3, call::
273     build/<Python-3-subdir>/tools/buildhtml.py --config=tools/docutils.conf
275 Some files may generate system messages (warnings and errors).  The
276 ``docs/user/rst/demo.txt`` file (under the archive directory) contains
277 five intentional errors.  (They test the error reporting mechanism!)
279 There are many front-end tools in the unpacked "tools" subdirectory.
280 You may want to begin with the "rst2html.py" front-end tool.  Most
281 tools take up to two arguments, the source path and destination path,
282 with STDIN and STDOUT being the defaults.  Use the "--help" option to
283 the front-end tools for details on options and arguments.  See
284 Docutils Front-End Tools (``docs/user/tools.txt``) for full documentation.
286 The package modules are continually growing and evolving.  The
287 ``docutils.statemachine`` module is usable independently.  It contains
288 extensive inline documentation (in reStructuredText format of course).
290 Contributions are welcome!
293 Running the Test Suite
294 ======================
296 To run the entire test suite, after installation_ open a shell and use
297 the following commands::
299     cd <archive_directory_path>/test
300     ./alltests.py
302 Under Windows, type::
304     cd <archive_directory_path>\test
305     python alltests.py
307 For testing with Python 3 use the converted test suite::
309     cd <archive_directory_path>/build/<Python-3-subdir>/test
310     python alltests.py
313 You should see a long line of periods, one for each test, and then a
314 summary like this::
316     Ran 1111 tests in 24.653s
318     OK
319     Elapsed time: 26.189 seconds
321 The number of tests will grow over time, and the times reported will
322 depend on the computer running the tests.  The difference between the
323 two times represents the time required to set up the tests (import
324 modules, create data structures, etc.).
326 If any of the tests fail, please `open a bug report`_, `send email`_,
327 or post a message via the `web interface`_ (see `Bugs <BUGS.html>`_).
328 Please include all relevant output, information about your operating
329 system, Python version, and Docutils version.  To see the Docutils
330 version, use one of the ``rst2*`` front ends or ``tools/quicktest.py``
331 with the ``--version`` option, e.g.::
333     cd ../tools
334     ./quicktest.py --version
336 Windows users type these commands::
338     cd ..\tools
339     python quicktest.py --version
341 Python 3 users must use ``build/<Python-3-subdir>/tools/quicktest.py``.
344 .. _open a bug report:
345    http://sourceforge.net/tracker/?group_id=38414&atid=422030
346 .. _send email: mailto:docutils-users@lists.sourceforge.net
347    ?subject=Test%20suite%20failure
348 .. _web interface: http://post.gmane.org/post.php
349    ?group=gmane.text.docutils.user&subject=Test+suite+failure
352 Getting Help
353 ============
355 If you have questions or need assistance with Docutils or
356 reStructuredText, please post a message to the Docutils-users_ mailing
357 list.
359 .. _Docutils-users: docs/user/mailing-lists.html#docutils-users
363    Local Variables:
364    mode: indented-text
365    indent-tabs-mode: nil
366    sentence-end-double-space: t
367    fill-column: 70
368    End: