Replace underline in literal with underlined blank.
[docutils.git] / README.txt
bloba285fce2ac9cbafd4c72b307d2b14c9bb070b7eb
1 ==================
2  README: Docutils
3 ==================
5 :Author: David Goodger
6 :Contact: goodger@users.sourceforge.net
7 :Date: $Date$
8 :Web site: http://docutils.sourceforge.net/
9 :Copyright: This document has been placed in the public domain.
11 .. contents::
14 Thank you for downloading the Python Docutils project archive.  As
15 this is a work in progress, please check the project website for
16 updated working files (snapshots).  This project should be considered
17 highly experimental; APIs are subject to change at any time.
20 Quick-Start
21 ===========
23 This is for those who want to get up & running quickly.  Read on for
24 complete details.
26 1. Get and install the latest release of Python, available from
28        http://www.python.org/
30    Python 2.2 or later [1]_ is required; Python 2.2.2 or later is
31    recommended.
33 2. Use the latest Docutils code.  Get the code from CVS or from the
34    snapshot:
36        http://docutils.sf.net/docutils-snapshot.tgz
38    See `Releases & Snapshots`_ below for details.
40 3. Unpack the tarball in a temporary directory (**not** directly in
41    Python's ``site-packages``) and install with the standard ::
43        python 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 test.txt test.html
53    See Usage_ below for details.
56 Purpose
57 =======
59 The purpose of the Docutils project is to create a set of tools for
60 processing plaintext documentation into useful formats, such as HTML,
61 XML, and TeX.  Support for the following sources has been implemented:
63 * Standalone files.
65 * `PEPs (Python Enhancement Proposals)`_.
67 Support for the following sources is planned:
69 * Inline documentation from Python modules and packages, extracted
70   with namespace context.  **This is the focus of the current
71   development effort.**
73 * Email (RFC-822 headers, quoted excerpts, signatures, MIME parts).
75 * Wikis, with global reference lookups of "wiki links".
77 * Compound documents, such as multiple chapter files merged into a
78   book.
80 * And others as discovered.
82 .. _PEPs (Python Enhancement Proposals):
83    http://www.python.org/peps/pep-0012.html
86 Releases & Snapshots
87 ====================
89 Putting together an official "Release" of Docutils is a significant
90 effort, so it isn't done that often.  In the meantime, the CVS
91 snapshots always contain the latest code and documentation, usually
92 updated within an hour of changes being committed to the repository,
93 and usually bug-free:
95 * Snapshot of Docutils code, documentation, front-end tools, and
96   tests: http://docutils.sf.net/docutils-snapshot.tgz
98 * Snapshot of the Sandbox (experimental, contributed code):
99   http://docutils.sf.net/docutils-sandbox-snapshot.tgz
101 * Snapshot of web files (the files that generate the web site):
102   http://docutils.sf.net/docutils-web-snapshot.tgz
104 To keep up to date on the latest developments, download fresh copies
105 of the snapshots regularly.  New functionality is being added weekly,
106 sometimes daily.  (There's also the CVS repository, and a mailing list
107 for CVS messages.  See the web site [address above] or
108 docs/dev/policies.txt for details.)
111 Requirements
112 ============
114 To run the code, Python 2.2 or later [1]_ must already be installed.
115 The latest release is recommended.  Python is available from
116 http://www.python.org/.
118 The `Python Imaging Library`, or PIL, is used for some image
119 manipulation operations if it is installed.
121 Docutils uses Greg Ward's Optik_/optparse option processing package.
122 It is included in the Docutils distribution.  Python 2.3 and later
123 come with optparse in the standard library; in this case, the Docutils
124 copy is not installed.
126 .. [1] Python 2.1 may be used providing the compiler package is
127    installed.  The compiler package can be found in the Tools/
128    directory of Python 2.1's source distribution.
130 .. _Python Imaging Library: http://www.pythonware.com/products/pil/
131 .. _Optik: http://optik.sourceforge.net/
134 Project Files & Directories
135 ===========================
137 * README.txt: You're reading it.
139 * COPYING.txt: Public Domain Dedication and copyright details for
140   non-public-domain files (most are PD).
142 * FAQ.txt: Docutils Frequently Asked Questions.
144 * HISTORY.txt: Release notes for the current and previous project
145   releases.
147 * setup.py: Installation script.  See "Installation" below.
149 * install.py: Quick & dirty installation script.  Just run it.
151 * docutils: The project source directory, installed as a Python
152   package.
154 * extras: Directory for third-party modules that Docutils depends on.
155   These are only installed if they're not already present.
157 * docs: The project documentation directory.  Read ``docs/index.txt``
158   for an overview, which is especially interesting for developers.
160 * docs/user: The project user documentation directory.  Contains the
161   following documents, among others:
163   - docs/user/tools.txt: Docutils Front-End Tools
164   - docs/user/latex.txt: Docutils LaTeX Writer
165   - docs/user/rst/quickstart.txt: A ReStructuredText Primer
166   - docs/user/rst/quickref.html: Quick reStructuredText (HTML only)
168 * docs/ref: The project reference directory.
169   ``docs/ref/rst/restructuredtext.txt`` is the reStructuredText
170   reference.
172 * licenses: Directory containing copies of license files for
173   non-public-domain files.
175 * tools: Directory for Docutils front-end tools.  See
176   ``docs/user/tools.txt`` for documentation.
178 * test: Unit tests.  Not required to use the software, but very useful
179   if you're planning to modify it.  See `Running the Test Suite`_
180   below.
183 Installation
184 ============
186 The first step is to expand the ``.tar.gz`` or ``.tgz`` archive in a
187 temporary directory (**not** directly in Python's ``site-packages``).
188 It contains a distutils setup file "setup.py".  OS-specific
189 installation instructions follow.
192 GNU/Linux, BSDs, Unix, Mac OS X, etc.
193 -------------------------------------
195 1. Open a shell.
197 2. Go to the directory created by expanding the archive::
199        cd <archive_directory_path>
201 3. Install the package::
203        python setup.py install
205    If the python executable isn't on your path, you'll have to specify
206    the complete path, such as /usr/local/bin/python.  You may need
207    root permissions to complete this step.
209 You can also just run install.py; it does the same thing.
212 Windows
213 -------
215 1. Open a DOS box (Command Shell, MSDOS Prompt, or whatever they're
216    calling it these days).
218 2. Go to the directory created by expanding the archive::
220        cd <archive_directory_path>
222 3. Install the package::
224        <path_to_python.exe>\python setup.py install
226 If your system is set up to run Python when you double-click on .py
227 files, you can run install.py to do the same as the above.
230 Mac OS 8/9
231 ----------
233 1. Open the folder containing the expanded archive.
235 2. Double-click on the file "setup.py", which should be a "Python
236    module" file.
238    If the file isn't a "Python module", the line endings are probably
239    also wrong, and you will need to set up your system to recognize
240    ".py" file extensions as Python files.  See
241    http://gotools.sourceforge.net/mac/python.html for detailed
242    instructions.  Once set up, it's easiest to start over by expanding
243    the archive again.
245 3. The distutils options window will appear.  From the "Command" popup
246    list choose "install", click "Add", then click "OK".
248 If install.py is a "Python module" (see step 2 above if it isn't), you
249 can run it (double-click) instead of the above.  The distutils options
250 window will not appear.
253 Usage
254 =====
256 After unpacking and installing the Docutils package, the following
257 shell commands will generate HTML for all included documentation::
259     cd <archive_directory_path>/tools
260     ./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", where "X.Y" is the release version.
265 Alternatively::
267     cd <archive_directory_path>
268     tools/buildhtml.py --config=tools/docutils.conf
270 Some files may generate system messages (warnings and errors).  The
271 ``tools/test.txt`` file (under the archive directory) contains 5
272 intentional errors.  (They test the error reporting mechanism!)
274 There are many front-end tools in the unpacked "tools" subdirectory.
275 You may want to begin with the "rst2html.py" front-end tool.  Most
276 tools take up to two arguments, the source path and destination path,
277 with STDIN and STDOUT being the defaults.  Use the "--help" option to
278 the front-end tools for details on options and arguments.  See
279 Docutils Front-End Tools (``docs/user/tools.txt``) for full documentation.
281 The package modules are continually growing and evolving.  The
282 ``docutils.statemachine`` module is usable independently.  It contains
283 extensive inline documentation (in reStructuredText format of course).
285 Contributions are welcome!
288 Running the Test Suite
289 ======================
291 To run the entire test suite, after installation_ open a shell and use
292 the following commands::
294     cd <archive_directory_path>/test
295     ./alltests.py
297 You should see a long line of periods, one for each test, and then a
298 summary like this::
300     Ran 518 tests in 24.653s
302     OK
303     Elapsed time: 26.189 seconds
305 The number of tests will grow over time, and the times reported will
306 depend on the computer running the tests.  The difference between the
307 two times represents the time required to set up the tests (import
308 modules, create data structures, etc.).
310 If any of the tests fail, please `open a bug report`_ or `send email`_
311 [2]_.  Please include all relevant output, information about your
312 operating system, Python version, and Docutils version.  To see the
313 Docutils version, use these commands::
315     cd ../tools
316     ./quicktest.py --version
318 .. _open a bug report:
319    http://sourceforge.net/tracker/?group_id=38414&atid=422030
320 .. _send email: mailto:docutils-users@lists.sourceforge.net
321    ?subject=Docutils%20test%20suite%20failure
324 Getting Help
325 ============
327 If you have questions or need assistance with Docutils or
328 reStructuredText, please `post a message`_ to the `Docutils-Users
329 mailing list`_ [2]_.
331 .. [2] Due to overwhelming amounts of spam, the
332    docutils-users@lists.sourceforge.net mailing list has been set up
333    for subscriber posting only.  Non-subscribers who post to
334    docutils-users will receive a message with "Subject: Your message
335    to Docutils-users awaits moderator approval".  Legitimate messages
336    are accepted and posted as soon as possible (a list administrator
337    must verify the message manually).  If you'd like to subscribe to
338    docutils-users, please visit
339    <http://lists.sourceforge.net/lists/listinfo/docutils-users>.
341 .. _post a message: mailto:docutils-users@lists.sourceforge.net
342 .. _Docutils-Users mailing list:
343    http://lists.sourceforge.net/lists/listinfo/docutils-users
347    Local Variables:
348    mode: indented-text
349    indent-tabs-mode: nil
350    sentence-end-double-space: t
351    fill-column: 70
352    End: