mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
![]() Separate the Conversion class into a base and a subclass; the subclass is pretty minimal but the separation is useful for.... NewConversion: New class that implements a somewhat different approach to the conversion. This uses a table of instances (rather than tuples) that have more information than the tuples used for the older conversion procedure. This allows a lot more control over the conversion, and it seems to be pretty stable. TableEntry, Parameter: New classes that are used to build the conversion specification used by NewConversion. TableParser: xmllib.XMLParser subclass that builds a conversion specification from an XML document. load_table(): Convenience function that loads a table from a file. main(): Added flags --new and --old; these select which conversion is used. The default is --new. Several fixes have been made in the old conversion as well; these were done before writing & switching to the new conversion, and should be archived. The next checkin of this file will discard the old conversion; is is kept in this checkin to allow it to be retrieved if needed, and to avoid lossing the bugfixes that have been made to it in the interim. |
||
---|---|---|
.. | ||
conversion.xml | ||
docfixer.py | ||
esis2sgml.py | ||
esistools.py | ||
fixgenents.sh | ||
latex2esis.py | ||
make.rules | ||
Makefile | ||
README |
These scripts and Makefile fragment are used to convert the Python documentation in LaTeX format to SGML or XML. Though I originally thought that the XML was unlikely to be used, tool support for XML is increasing quickly enough that it may well be the final format. (It is the default output format when using the makefiles included here.) This material is preliminary and incomplete. The XML omnibus package developed by the Python XML-SIG is required; specifically, the version available in the public CVS repository. See http://www.python.org/sigs/xml-sig/ for more information on the package. To convert all documents to SGML: cd Doc/ make -f tools/sgmlconv/Makefile sgml To convert a document to SGML: cd Doc/<document-dir> make -f ../tools/sgmlconv/make.rules TOOLSDIR=../tools To generate XML instead, use: cd Doc/<document-dir> make -f ../tools/sgmlconv/make.rules TOOLSDIR=../tools xml Note that building the second target format is fast because both conversions use the same intermediate format (an ESIS event stream). This is true regardless of whether you build SGML or XML first. Please send comments and bug reports to python-docs@python.org.