[Doc-SIG] Updates to Docutils

David Goodger goodger@users.sourceforge.net
Tue, 01 Oct 2002 23:39:55 -0400


I have just completed the integration of Dethe Elza's refactoring of
the reStructuredText directive API.  A summary is in the module
docstring of docutils/parsers/rst/directives/__init__.py, and complete
details are in the new "Creating reStructuredText Directives" How-To
document (http://docutils.sf.net/spec/howto/rst-directives.html).
Many thanks to Dethe for initiating this refactoring and writing the
initial How-To; it has simplified directive implementation
considerably.

Ramifications of this change:

1. The minimum required Python version is now 2.1 (was 2.0), with
   2.1.3 or 2.2.1 recommended.  The reason for the change is that
   directive functions now employ function attributes, a feature
   introduced in Python 2.1.

2. Any directives that aren't part of the reStructuredText parser
   (e.g. 3rd party patches) will have to be revised, although I'm not
   aware of any.  If anybody has written useful directives, please
   consider contributing them to the Docutils project.

Three new directives (also courtesy of Dethe) have been added to the
parser:

* "include": Including an external document fragment.

* "raw": Raw data pass-through, such as raw HTML.

* "replace": Text substitutions (only valid inside substitution
  definitions).

See http://docutils.sf.net/spec/rst/directives.html for details of the
new directives.

Get the latest snapshot here:

    http://docutils.sf.net/docutils-snapshot.tgz

-- 
David Goodger  <goodger@users.sourceforge.net>  Open-source projects:
  - Python Docutils: http://docutils.sourceforge.net/
    (includes reStructuredText: http://docutils.sf.net/rst.html)
  - The Go Tools Project: http://gotools.sourceforge.net/