I have cleaned up all the emacs support code for restructured text.
[docutils.git] / README.txt
blob15205d36c8adcdc85a4360c5c113d29d86a61edc
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 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    Python 2.2 or later [1]_ is required; Python 2.2.2 or later is
25    recommended.
27 2. Use the latest Docutils code.  Get the code from Subversion or from
28    the snapshot:
30        http://docutils.sf.net/docutils-snapshot.tgz
32    See `Releases & Snapshots`_ below for details.
34 3. Unpack the tarball in a temporary directory (**not** directly in
35    Python's ``site-packages``) and run ``install.py``.
37    See Installation_ below for details.
39 4. Use a front-end tool from the "tools" subdirectory of the same
40    directory as in step 3.  For example::
42        cd tools
43        ./rst2html.py ../FAQ.txt ../FAQ.html        (Unix)
44        python rst2html.py ..\FAQ.txt ..\FAQ.html   (Windows)
46    See Usage_ below for details.
49 Purpose
50 =======
52 The purpose of the Docutils project is to create a set of tools for
53 processing plaintext documentation into useful formats, such as HTML,
54 XML, and LaTeX.  Support for the following sources has been
55 implemented:
57 * Standalone files.
59 * `PEPs (Python Enhancement Proposals)`_.
61 Support for the following sources is planned:
63 * Inline documentation from Python modules and packages, extracted
64   with namespace context.
66 * Email (RFC-822 headers, quoted excerpts, signatures, MIME parts).
68 * Wikis, with global reference lookups of "wiki links".
70 * Compound documents, such as multiple chapter files merged into a
71   book.
73 * And others as discovered.
75 .. _PEPs (Python Enhancement Proposals):
76    http://www.python.org/peps/pep-0012.html
79 Releases & Snapshots
80 ====================
82 While we are trying to follow a "release early & often" policy,
83 features are added very frequently.  Since the code in the Subversion
84 repository is usually in a bug-free state, we recommend that you use
85 the current snapshot (which is usually updated within an hour of
86 changes being committed to the repository):
88 * Snapshot of Docutils code, documentation, front-end tools, and
89   tests: http://docutils.sf.net/docutils-snapshot.tgz
91 * Snapshot of the Sandbox (experimental, contributed code):
92   http://docutils.sf.net/docutils-sandbox-snapshot.tgz
94 To keep up to date on the latest developments, download fresh copies
95 of the snapshots regularly.  New functionality is being added weekly,
96 sometimes daily.  (There's also the `Subversion repository`_.)
98 .. _Subversion repository: docs/dev/repository.html
101 Requirements
102 ============
104 To run the code, Python 2.2 or later [1]_ must already be installed.
105 The latest release is recommended.  Python is available from
106 http://www.python.org/.
108 The `Python Imaging Library`, or PIL, is used for some image
109 manipulation operations if it is installed.
111 .. [1] Python 2.1 may be used providing the compiler package is
112    installed.  The compiler package can be found in the Tools/
113    directory of Python 2.1's source distribution.
115 .. _Python Imaging Library: http://www.pythonware.com/products/pil/
116 .. _Optik: http://optik.sourceforge.net/
119 Project Files & Directories
120 ===========================
122 * README.txt: You're reading it.
124 * COPYING.txt: Public Domain Dedication and copyright details for
125   non-public-domain files (most are PD).
127 * FAQ.txt: Docutils Frequently Asked Questions.
129 * HISTORY.txt: Release notes for the current and previous project
130   releases.
132 * setup.py: Installation script.  See "Installation" below.
134 * install.py: Quick & dirty installation script.  Just run it.  For
135   any kind of customization or help though, setup.py must be used.
137 * docutils: The project source directory, installed as a Python
138   package.
140 * extras: Directory for third-party modules that Docutils depends on.
141   These are only installed if they're not already present.
143 * docs: The project documentation directory.  Read ``docs/index.txt``
144   for an overview, which is especially interesting for developers.
146 * docs/user: The project user documentation directory.  Contains the
147   following documents, among others:
149   - docs/user/tools.txt: Docutils Front-End Tools
150   - docs/user/latex.txt: Docutils LaTeX Writer
151   - docs/user/rst/quickstart.txt: A ReStructuredText Primer
152   - docs/user/rst/quickref.html: Quick reStructuredText (HTML only)
154 * docs/ref: The project reference directory.
155   ``docs/ref/rst/restructuredtext.txt`` is the reStructuredText
156   reference.
158 * licenses: Directory containing copies of license files for
159   non-public-domain files.
161 * tools: Directory for Docutils front-end tools.  See
162   ``docs/user/tools.txt`` for documentation.
164 * test: Unit tests.  Not required to use the software, but very useful
165   if you're planning to modify it.  See `Running the Test Suite`_
166   below.
169 Installation
170 ============
172 The first step is to expand the ``.tgz`` archive in a temporary
173 directory (**not** directly in Python's ``site-packages``).  It
174 contains a distutils setup file "setup.py".  OS-specific installation
175 instructions follow.
178 GNU/Linux, BSDs, Unix, Mac OS X, etc.
179 -------------------------------------
181 1. Open a shell.
183 2. Go to the directory created by expanding the archive::
185        cd <archive_directory_path>
187 3. Install the package::
189        python setup.py install
191    If the python executable isn't on your path, you'll have to specify
192    the complete path, such as /usr/local/bin/python.  You may need
193    root permissions to complete this step.
195    You can also just run install.py; it does the same thing.
198 Windows
199 -------
201 Just double-click ``install.py``.  If this doesn't work, try the
202 following:
204 1. Open a DOS Box (Command Shell, MS-DOS Prompt, or whatever they're
205    calling it these days).
207 2. Go to the directory created by expanding the archive::
209        cd <archive_directory_path>
211 3. Install the package::
213        <path_to_python.exe>\python setup.py install
216 Usage
217 =====
219 After unpacking and installing the Docutils package, the following
220 shell commands will generate HTML for all included documentation::
222     cd <archive_directory_path>/tools
223     ./buildhtml.py ../
225 On Windows systems, type::
227     cd <archive_directory_path>\tools
228     python buildhtml.py ..
230 The final directory name of the ``<archive_directory_path>`` is
231 "docutils" for snapshots.  For official releases, the directory may be
232 called "docutils-X.Y.Z", where "X.Y.Z" is the release version.
233 Alternatively::
235     cd <archive_directory_path>
236     tools/buildhtml.py --config=tools/docutils.conf          (Unix)
237     python tools\buildhtml.py --config=tools\docutils.conf   (Windows)
239 Some files may generate system messages (warnings and errors).  The
240 ``docs/user/rst/demo.txt`` file (under the archive directory) contains
241 5 intentional errors.  (They test the error reporting mechanism!)
243 There are many front-end tools in the unpacked "tools" subdirectory.
244 You may want to begin with the "rst2html.py" front-end tool.  Most
245 tools take up to two arguments, the source path and destination path,
246 with STDIN and STDOUT being the defaults.  Use the "--help" option to
247 the front-end tools for details on options and arguments.  See
248 Docutils Front-End Tools (``docs/user/tools.txt``) for full documentation.
250 The package modules are continually growing and evolving.  The
251 ``docutils.statemachine`` module is usable independently.  It contains
252 extensive inline documentation (in reStructuredText format of course).
254 Contributions are welcome!
257 Running the Test Suite
258 ======================
260 To run the entire test suite, after installation_ open a shell and use
261 the following commands::
263     cd <archive_directory_path>/test
264     ./alltests.py
266 Under Windows, type::
268     cd <archive_directory_path>\test
269     python alltests.py
271 You should see a long line of periods, one for each test, and then a
272 summary like this::
274     Ran 518 tests in 24.653s
276     OK
277     Elapsed time: 26.189 seconds
279 The number of tests will grow over time, and the times reported will
280 depend on the computer running the tests.  The difference between the
281 two times represents the time required to set up the tests (import
282 modules, create data structures, etc.).
284 If any of the tests fail, please `open a bug report`_, `send email`_,
285 or post a message via the `web interface`_.  Please include all
286 relevant output, information about your operating system, Python
287 version, and Docutils version.  To see the Docutils version, use these
288 commands in the shell::
290     cd ../tools
291     ./quicktest.py --version
293 Windows users type these commands::
295     cd ..\tools
296     python quicktest.py --version
298 .. _open a bug report:
299    http://sourceforge.net/tracker/?group_id=38414&atid=422030
300 .. _send email: mailto:docutils-users@lists.sourceforge.net
301    ?subject=Test%20suite%20failure
302 .. _web interface: http://post.gmane.org/post.php
303    ?group=gmane.text.docutils.user&subject=Test+suite+failure
306 Getting Help
307 ============
309 If you have questions or need assistance with Docutils or
310 reStructuredText, please post a message to the Docutils-users_ mailing
311 list.
313 .. _Docutils-users: docs/user/mailing-lists.html#docutils-users
317    Local Variables:
318    mode: indented-text
319    indent-tabs-mode: nil
320    sentence-end-double-space: t
321    fill-column: 70
322    End: