- Changed the default bindings due to the explosion of new
[docutils.git] / README.txt
blob1e4bd7cc2f5565a98ca26b1c876ed441abdc3acb
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`` with admin
36    rights.  On Windows systems it may be sufficient to double-click
37    ``install.py``.  On Unix or Mac OS X, type::
39         su
40         (enter admin password)
41         ./install.py
43    See Installation_ below for details.
45 4. Use a front-end tool from the "tools" subdirectory of the same
46    directory as in step 3.  For example::
48        cd tools
49        ./rst2html.py ../FAQ.txt ../FAQ.html        (Unix)
50        python rst2html.py ..\FAQ.txt ..\FAQ.html   (Windows)
52    See Usage_ below for details.
55 Purpose
56 =======
58 The purpose of the Docutils project is to create a set of tools for
59 processing plaintext documentation into useful formats, such as HTML,
60 XML, and LaTeX.  Support for the following sources has been
61 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.
72 * Email (RFC-822 headers, quoted excerpts, signatures, MIME parts).
74 * Wikis, with global reference lookups of "wiki links".
76 * Compound documents, such as multiple chapter files merged into a
77   book.
79 * And others as discovered.
81 .. _PEPs (Python Enhancement Proposals):
82    http://www.python.org/peps/pep-0012.html
85 Releases & Snapshots
86 ====================
88 While we are trying to follow a "release early & often" policy,
89 features are added very frequently.  Since the code in the Subversion
90 repository is usually in a bug-free state, we recommend that you use
91 the current snapshot (which is usually updated within an hour of
92 changes being committed to the repository):
94 * Snapshot of Docutils code, documentation, front-end tools, and
95   tests: http://docutils.sf.net/docutils-snapshot.tgz
97 * Snapshot of the Sandbox (experimental, contributed code):
98   http://docutils.sf.net/docutils-sandbox-snapshot.tgz
100 To keep up to date on the latest developments, download fresh copies
101 of the snapshots regularly.  New functionality is being added weekly,
102 sometimes daily.  (There's also the `Subversion repository`_.)
104 .. _Subversion repository: docs/dev/repository.html
107 Requirements
108 ============
110 To run the code, Python 2.2 or later [1]_ must already be installed.
111 The latest release is recommended.  Python is available from
112 http://www.python.org/.
114 The `Python Imaging Library`, or PIL, is used for some image
115 manipulation operations if it is installed.
117 .. [1] Python 2.1 may be used providing the compiler package is
118    installed.  The compiler package can be found in the Tools/
119    directory of Python 2.1's source distribution.
121 .. _Python Imaging Library: http://www.pythonware.com/products/pil/
122 .. _Optik: http://optik.sourceforge.net/
125 Project Files & Directories
126 ===========================
128 * README.txt: You're reading it.
130 * COPYING.txt: Public Domain Dedication and copyright details for
131   non-public-domain files (most are PD).
133 * FAQ.txt: Docutils Frequently Asked Questions.
135 * HISTORY.txt: Release notes for the current and previous project
136   releases.
138 * setup.py: Installation script.  See "Installation" below.
140 * install.py: Quick & dirty installation script.  Just run it.  For
141   any kind of customization or help though, setup.py must be used.
143 * docutils: The project source directory, installed as a Python
144   package.
146 * extras: Directory for third-party modules that Docutils depends on.
147   These are only installed if they're not already present.
149 * docs: The project documentation directory.  Read ``docs/index.txt``
150   for an overview, which is especially interesting for developers.
152 * docs/user: The project user documentation directory.  Contains the
153   following documents, among others:
155   - docs/user/tools.txt: Docutils Front-End Tools
156   - docs/user/latex.txt: Docutils LaTeX Writer
157   - docs/user/rst/quickstart.txt: A ReStructuredText Primer
158   - docs/user/rst/quickref.html: Quick reStructuredText (HTML only)
160 * docs/ref: The project reference directory.
161   ``docs/ref/rst/restructuredtext.txt`` is the reStructuredText
162   reference.
164 * licenses: Directory containing copies of license files for
165   non-public-domain files.
167 * tools: Directory for Docutils front-end tools.  See
168   ``docs/user/tools.txt`` for documentation.
170 * test: Unit tests.  Not required to use the software, but very useful
171   if you're planning to modify it.  See `Running the Test Suite`_
172   below.
175 Installation
176 ============
178 The first step is to expand the ``.tgz`` archive in a temporary
179 directory (**not** directly in Python's ``site-packages``).  It
180 contains a distutils setup file "setup.py".  OS-specific installation
181 instructions follow.
184 GNU/Linux, BSDs, Unix, Mac OS X, etc.
185 -------------------------------------
187 1. Open a shell.
189 2. Go to the directory created by expanding the archive::
191        cd <archive_directory_path>
193 3. Install the package::
195        python setup.py install
197    If the python executable isn't on your path, you'll have to specify
198    the complete path, such as /usr/local/bin/python.  You may need
199    root permissions to complete this step.
201    You can also just run install.py; it does the same thing.
204 Windows
205 -------
207 Just double-click ``install.py``.  If this doesn't work, try the
208 following:
210 1. Open a DOS Box (Command Shell, MS-DOS Prompt, or whatever they're
211    calling it these days).
213 2. Go to the directory created by expanding the archive::
215        cd <archive_directory_path>
217 3. Install the package::
219        <path_to_python.exe>\python setup.py install
222 Usage
223 =====
225 After unpacking and installing the Docutils package, the following
226 shell commands will generate HTML for all included documentation::
228     cd <archive_directory_path>/tools
229     ./buildhtml.py ../
231 On Windows systems, type::
233     cd <archive_directory_path>\tools
234     python buildhtml.py ..
236 The final directory name of the ``<archive_directory_path>`` is
237 "docutils" for snapshots.  For official releases, the directory may be
238 called "docutils-X.Y.Z", where "X.Y.Z" is the release version.
239 Alternatively::
241     cd <archive_directory_path>
242     tools/buildhtml.py --config=tools/docutils.conf          (Unix)
243     python tools\buildhtml.py --config=tools\docutils.conf   (Windows)
245 Some files may generate system messages (warnings and errors).  The
246 ``docs/user/rst/demo.txt`` file (under the archive directory) contains
247 5 intentional errors.  (They test the error reporting mechanism!)
249 There are many front-end tools in the unpacked "tools" subdirectory.
250 You may want to begin with the "rst2html.py" front-end tool.  Most
251 tools take up to two arguments, the source path and destination path,
252 with STDIN and STDOUT being the defaults.  Use the "--help" option to
253 the front-end tools for details on options and arguments.  See
254 Docutils Front-End Tools (``docs/user/tools.txt``) for full documentation.
256 The package modules are continually growing and evolving.  The
257 ``docutils.statemachine`` module is usable independently.  It contains
258 extensive inline documentation (in reStructuredText format of course).
260 Contributions are welcome!
263 Running the Test Suite
264 ======================
266 To run the entire test suite, after installation_ open a shell and use
267 the following commands::
269     cd <archive_directory_path>/test
270     ./alltests.py
272 Under Windows, type::
274     cd <archive_directory_path>\test
275     python alltests.py
277 You should see a long line of periods, one for each test, and then a
278 summary like this::
280     Ran 518 tests in 24.653s
282     OK
283     Elapsed time: 26.189 seconds
285 The number of tests will grow over time, and the times reported will
286 depend on the computer running the tests.  The difference between the
287 two times represents the time required to set up the tests (import
288 modules, create data structures, etc.).
290 If any of the tests fail, please `open a bug report`_, `send email`_,
291 or post a message via the `web interface`_.  Please include all
292 relevant output, information about your operating system, Python
293 version, and Docutils version.  To see the Docutils version, use these
294 commands in the shell::
296     cd ../tools
297     ./quicktest.py --version
299 Windows users type these commands::
301     cd ..\tools
302     python quicktest.py --version
304 .. _open a bug report:
305    http://sourceforge.net/tracker/?group_id=38414&atid=422030
306 .. _send email: mailto:docutils-users@lists.sourceforge.net
307    ?subject=Test%20suite%20failure
308 .. _web interface: http://post.gmane.org/post.php
309    ?group=gmane.text.docutils.user&subject=Test+suite+failure
312 Getting Help
313 ============
315 If you have questions or need assistance with Docutils or
316 reStructuredText, please post a message to the Docutils-users_ mailing
317 list.
319 .. _Docutils-users: docs/user/mailing-lists.html#docutils-users
323    Local Variables:
324    mode: indented-text
325    indent-tabs-mode: nil
326    sentence-end-double-space: t
327    fill-column: 70
328    End: