|
From: David G. <go...@us...> - 2002-05-30 03:08:53
|
I've just checked in a bunch of changes to Docutils. The biggest change was the addition of a command-line interface to the front-end scripts. Greg Ward's Optik package is now required (http://optik.sf.net/). I added ``docutils.frontend`` to support command-line processing of front-end scripts (which are now down to 3 lines each). The ``docutils.core.Publisher`` class and ``publish`` function have been greatly simplified by the use of Optik. Download the latest snapshot from: http://docutils.sf.net/docutils-snapshot.tgz The sandbox snapshot is also available: http://docutils.sf.net/docutils-sandbox-snapshot.tgz -- David Goodger <go...@us...> 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/ |
|
From: David G. <go...@us...> - 2002-06-01 03:09:38
|
In the latest round of checkins I added "header" & "footer" elements to the Docutils DTD, within an optional "decoration" element, positioned right after "docinfo". These elements are to be used for page navigation stuff, notes, time/datestamp, etc. The need for additional "decorations" may be discovered in the future. I'm not sure this is the correct approach; please speak up if you have a better idea. I've implemented the corresponding --generator, --date, --time, and --source-link options, along with their --no-* compliments. (Optik is proving very useful and easy.) Also a new transform ``docutils.transforms.universal.Decorations``, and support in the HTML writer. For those of you already using Docutils on your web sites, please consider adding the --generator/-g and --source-link/-s options when you generate HTML, to help spread the word. See the bottoms of the Docutils pages for examples. ``tools/html.py --help`` documents all implemented options. Download the latest snapshots from: - http://docutils.sf.net/docutils-snapshot.tgz - http://docutils.sf.net/docutils-sandbox-snapshot.tgz -- David Goodger <go...@us...> 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/ |
|
From: David G. <go...@us...> - 2002-07-20 03:32:15
|
Download the latest snapshot from:
http://docutils.sf.net/docutils-snapshot.tgz
The sandbox snapshot is also available:
http://docutils.sf.net/docutils-sandbox-snapshot.tgz
Lots of changes in the last few weeks:
* Added support for configuration files. Config files
(/etc/docutils.conf, ./docutils.conf, ~/.docutils) override
application defaults, and command-line options override all.
Documentation is pending.
* Added "simple tables" to reStructuredText (spec and parser):
===== ===== ======
Inputs Output
------------ ------
A B A or B
===== ===== ======
False False False
True False True
False True True
True True True
===== ===== ======
* Improved HTML output with many small changes.
* Added PEP processing support:
- tools/pep.py: Front-end for processing reStructuredText PEPs.
- tools/pep2html.py: Based on the existing script (in CVS at
python/nondist/peps); processes old-style *and* reStructuredText
PEPs.
- docutils/writers/pep_html.py: HTML Writer for
PEPs (subclass of ``html4css1.Writer``).
* Updated the PEPs:
- A "Roadmap to the Docstring PEPs" section was added to PEP 256:
http://docutils.sf.net/spec/pep-0256.html
- PEP 258 has been reorganized and extensively updated:
http://docutils.sf.net/spec/pep-0258.html
- PEP 287: updated, renamed to "reStructuredText Docstring Format"
and converted to reStructuredText format (provisionally, pending
PythonLabs OK). Check out the processed PEP 287:
http://docutils.sf.net/spec/pep-0287.html
I also converted PEP 0 as a proof of concept because of its
special processing:
http://docutils.sf.net/spec/pep-0000.html
Late breaking news: I just got a reply from Guido, in which he
critiques some style issues, then says, "I'm sure you can fix all
these things with a simple style sheet change, and then I'm all
for allowing Docutils for PEPs." I'd appreciate more critiques on
PEP formatting issues, no matter how small. Especially, please
help with stylesheet issues with the various browsers, by
comparing the reStructuredText PEPs above to the old-style
versions:
http://www.python.org/peps/pep-0287.html
http://www.python.org/peps/pep-0000.html
* Added Docutils-native XML output:
- tools/docutils-xml.py: A front-end.
- docutils/writers/docutils_xml.py: A Writer.
* Unicode & encodings are working.
I hope to release Docutils version 0.2 in a week or two,
incorporating Swedish and German language patches I've received and
*maybe* the "inline external targets" syntax in some form. After
that, I plan to focus on Python autodocumentation: analyze Tony Ibbs'
PySource code and Doug Hellman's HappyDoc project, take the best ideas
and integrate them into Docutils 0.3.
--
David Goodger <go...@us...> 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/
|
|
From: David G. <go...@us...> - 2002-10-02 03:35:55
|
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 <go...@us...> 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/ |
|
From: David G. <go...@us...> - 2002-10-08 03:01:29
|
I just checked in a reworking of the "system message" reporting mechanism,
for better diagnostics. Now almost all messages will have a source
("filename" or "<stdin>" etc.) and line number attached. Previously, line
numbers were only attached to errors reported during the parse, none from
the transforms. I'm sure there are some cases I've missed, so I'd
appreciate any testing and bug reports.
At the same time, I changed the output format. The old format was like
this::
Reporter: ERROR/3 (filename, line 3) Unexpected indentation.
The new format follows the GNU-Tools standard::
filename:3: (ERROR/3) Unexpected indentation.
This format is understood by many tools so it should make the Reporter
output more useful. Thanks to Skip Montanaro for the idea.
Gunnar, this change will probably affect DocFactory. I've bumped Docutils'
version number to 0.2.5 for this change, so DocFactory can check it. See
tools/pep2html.py for one implementation of a version check.
--
David Goodger <go...@us...> 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/
|
|
From: David G. <go...@us...> - 2002-10-18 05:22:33
|
* Improved vertical whitespace issues with HTML output. This affects
first and last elements in containers, and removes unnecessary top
and bottom margins (resp.). For example, a literal block at the top
of a table cell won't have a ridiculous top margin.
* Changes to API details that affects client code:
- Renamed transform method "transform" to "apply".
- Renamed "options" to "settings" for runtime settings (as set by
command-line options). Sometimes "option" (singular) became
"settings" (plural). Some variations below:
- document.options -> document.settings (stored in other objects
as well)
- option_spec -> settings_spec (not directives though)
- OptionSpec -> SettingsSpec
- cmdline_options -> settings_spec
- relative_path_options -> relative_path_settings
- option_default_overrides -> settings_default_overrides
- core.Publisher.set_options -> core.Publisher.get_settings
- Renamed core.publish() to core.publish_cmdline(), and added
placeholders for new publish_string() and publish_file()
convenience functions.
Please make corresponding changes to client code. I'll be happy to
help if it's non-trivial. I've updated many of the modules in the
sandbox, but I may not have changed everything (or I may have
changed too much). Individual authors, please test the updated
code. Thanks.
Gunnar, I wasn't able to update DocFactory. It seemed to be using
"options" in different ways, doing its own config file parsing, and
I didn't know which "options" to change to "settings".
* Some bug fixes.
--
David Goodger <go...@us...> 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/
|
|
From: David G. <go...@py...> - 2003-01-01 02:59:50
|
I just checked in a change to docutils/frontend.py, removing some nasty internals-fiddling code (in ``ConfigParser.get_section()``) and replacing it with simpler, correct code (possibly a bit slower, but so what). This was prompted by bug reports from Fred Drake and Guido van Rossum (thank you!), who ran Docutils with the newly-released Python 2.3a1, in which some ConfigParser internals had changed. There may be another bug that only shows up with Python 2.3, but I won't be able to check it until Thursday or Friday. Anybody using Python 2.3 should definitely get the latest Docutils code from CVS or from the snapshot: <http://docutils.sf.net/docutils-snapshot.tgz>. Happy New Year! -- David Goodger <go...@py...> 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/ |
|
From: David G. <go...@py...> - 2003-01-03 04:02:18
|
I have fixed the remaining (known) bugs related to Python 2.3 and PyXML. Fred Drake pointed out that Python 2.1 didn't have the "compiler" package as part of the standard library (it was a separate install), and that's crucial to the Python Source Reader work that's ongoing. Therefore I've decided to upgrade the minimum Python requirement to 2.2 (2.2.2 recommended). Everything except the test suite and the docutils/readers/python code still works with Python 2.1 though. -- David Goodger <go...@py...> 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/ |
|
From: Fred L. D. Jr. <fd...@ac...> - 2003-01-03 05:18:05
|
David Goodger writes: > I have fixed the remaining (known) bugs related to Python 2.3 and PyXML. Yee haw! ;-) > Fred Drake pointed out that Python 2.1 didn't have the "compiler" package as > part of the standard library (it was a separate install), and that's crucial > to the Python Source Reader work that's ongoing. Therefore I've decided to > upgrade the minimum Python requirement to 2.2 (2.2.2 recommended). It's not clear that this is the right way to deal with this; I'd be happy that just the one component isn't necessarily available with Python 2.1.x unless the compiler package is installed. (I vaguely recall that the compiler package shipped as part of the source package, but not as part of the standard library, but I'm not sure offhand. Maybe it was in the Tools/ directory?) I've not dug into the alltests.py script yet; perhaps there's a way to do something similar to the "skipped tests" idea that we use with the Python test suite. That's probably more a matter of mechanics than anything. I won't have time to look into that for at least a few days; if anyone beats me to it I won't complain. ;-) > Everything except the test suite and the docutils/readers/python code still > works with Python 2.1 though. Which means the tests need to run, at least for the parts that are supposed to work! ;-) -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation |
|
From: David G. <go...@py...> - 2003-01-04 01:10:14
|
[David Goodger] > Fred Drake pointed out that Python 2.1 didn't have the "compiler" > package as part of the standard library (it was a separate > install), and that's crucial to the Python Source Reader work > that's ongoing. Therefore I've decided to upgrade the minimum > Python requirement to 2.2 (2.2.2 recommended). Everything except > the test suite and the docutils/readers/python code still works > with Python 2.1 though. Thanks Fred, Tony, and Benja, for your input. I agree that Jython currently at 2.1 presents a strong case for maintaining 2.1 compatibility. The compiler package was in the Tools/ directory of the Python source distribution, complete with a Distutils setup.py for installation. I wonder, does the compiler package work with Jython at all? Benja? Another issue is that I've been using tokenize.py's generate_tokens() call in docutils/readers/python/moduleparser.py, which uses generators, which requires Python 2.2. Although this has been more of an experiment than a requirement, it was a pleasant experiment and it would be painful and a waste to reimplement it without iterators and generators. I put back the pre-generators difflib.py (used by the test suite) and added footnotes to the README and the home page saying: Python 2.1 may be used providing the compiler package is installed. The compiler package can be found in the Tools/ directory of Python's source distribution. [Fred L. Drake, Jr.] > I've not dug into the alltests.py script yet; perhaps there's a way > to do something similar to the "skipped tests" idea that we use with > the Python test suite. That's probably more a matter of mechanics > than anything. I won't have time to look into that for at least a > few days; if anyone beats me to it I won't complain. ;-) Done. The tests pass but report "test skipped" to stderr, under Python 2.1. -- David Goodger <go...@py...> 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/ |
|
From: Tony J I. (Tibs) <to...@ls...> - 2003-01-03 08:47:13
|
David Goodger wrote: > ...that Python 2.1 didn't have the "compiler" package as > part of the standard library (it was a separate install), and > that's crucial to the Python Source Reader work that's ongoing. > Therefore I've decided to upgrade the minimum Python requirement > to 2.2 (2.2.2 recommended). I don't have any personal (!) objection to specifying 2.2, but it's surely easy enough to require the compiler package, and provide a reference copy on the docutils site for those who install without the appropriate bit of source/Tools/whatever. Whether there was significant *change* in the compiler code in the interim, though, which might also be influential, I can't remember. Of course, this might just be that "one thing" that's enough to tip your decision on which version of Python to go for. Tibs -- Tony J Ibbs (Tibs) http://www.tibsnjoan.co.uk/ Give a pedant an inch and they'll take 25.4mm (once they've established you're talking a post-1959 inch, of course) My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.) |
|
From: Benja F. <b.f...@gm...> - 2003-01-03 17:57:33
|
Hi David, David Goodger wrote: > I have fixed the remaining (known) bugs related to Python 2.3 and PyXML. > > Fred Drake pointed out that Python 2.1 didn't have the "compiler" package as > part of the standard library (it was a separate install), and that's crucial > to the Python Source Reader work that's ongoing. Therefore I've decided to > upgrade the minimum Python requirement to 2.2 (2.2.2 recommended). > Everything except the test suite and the docutils/readers/python code still > works with Python 2.1 though. My project [http://gzz.info] is using ReST heavily for documentation (we intend to write all future documentation in it, and have converted some of the existing). However, since we're a Java project, we use it through Jython, whose newest version is currently up to par with Python 2.1. Therefore, I'd be much happier if you could formally keep the docutils requirement at 2.1 for everything except the Python reader (or say, "Requirement: Python 2.2 or Python 2.1 with the compiler package installed"). When a 2.2-compliant Jython ever comes out, this won't be an issue any more. Thanks, - Benja |
|
From: Fred L. D. Jr. <fd...@ac...> - 2003-01-03 18:09:40
|
Benja Fallenstein writes: > My project [http://gzz.info] is using ReST heavily for documentation (we > intend to write all future documentation in it, and have converted some > of the existing). However, since we're a Java project, we use it through > Jython, whose newest version is currently up to par with Python 2.1. Jython is a really good reason to maintain Python 2.1 compatibility in my book. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation |
|
From: David G. <go...@py...> - 2003-05-24 21:33:06
|
A burst of creativity over the last few days has resulted in a slew of
checkins. The snapshot has all the latest code:
http://docutils.sf.net/docutils-snapshot.tgz
New doctree elements implemented: "rubric", "admonition", and
"attribution" (part of block quotes; see
<http://docutils.sf.net/spec/rst/reStructuredText.html#block-quotes>).
New directives implemented: "admonition", "rubric", "epigraph",
"highlights", "unicode" and "class". Also added "class" options to
"topic", "sidebar", "line-block", "parsed-literal", "contents", and
"image"; and "figclass" to "figure". See
<http://docutils.sf.net/spec/rst/directives.html>. The change to
"line-block" and "parsed-literal" may cause problems; a blank line is
now required before the directive content.
The HTML Writer and default.css stylesheet have been updated to
support all of this.
Please give the latest code a try and report any problems you
encounter. Enjoy!
--
David Goodger http://starship.python.net/~goodger
Programmer/sysadmin for hire: http://starship.python.net/~goodger/cv
|