summaryrefslogtreecommitdiff
path: root/Doc/tools/sgmlconv/docfixer.py
Commit message (Collapse)AuthorAgeFilesLines
* Delete the LaTeX doc tree.Georg Brandl2007-08-151-1072/+0
|
* SF patch# 1770008 by Christian Heimes (plus some extras).Guido van Rossum2007-08-091-2/+2
| | | | | | | | | | Completely get rid of StringIO.py and cStringIO.c. I had to fix a few tests and modules beyond what Christian did, and invent a few conventions. E.g. in elementtree, I chose to write/return Unicode strings whe no encoding is given, but bytes when an explicit encoding is given. Also mimetools was made to always assume binary files.
* Run 2to3 over Doc/tools/.Collin Winter2007-03-211-8/+6
|
* SF patch 1631942 by Collin Winter:Guido van Rossum2007-01-101-1/+2
| | | | | | (a) "except E, V" -> "except E as V" (b) V is now limited to a simple name (local variable) (c) V is now deleted at the end of the except block
* Add a couple of entries to the whitespace-cleanups table.Fred Drake2001-11-301-0/+2
|
* Avoid trailing blank lines in the output.Fred Drake2001-11-191-0/+4
|
* Handle PEP references the same way RFC references.Fred Drake2001-09-291-6/+5
|
* Fix up whitespace in <args> elements; reduce sequences of consecutiveFred Drake2001-09-291-17/+15
| | | | | whitespace characters to a single space. Small changes elsewhere, mostly to clean up the code a little.
* Convert to string methods.Fred Drake2001-09-281-36/+59
| | | | | | | | | | | For the real document element, make sure the prolog is migrated into the document element so it isn't left stranded. Make fixup_trailing_whitespace() whitespace do what was really intended. Add the *desc environments used in the C API manual to the list of things that can exist at the paragraph level so they don't get wrapped in <para>...</para>.
* Re-write <ulink> elements as described in the conversion spec.Fred Drake2001-09-271-0/+19
|
* Turn \input, \include, and \verbatiminput into XInclude elements insteadFred Drake2001-09-271-1/+1
| | | | of something ad-hoc.
* Simplification to mirror a better conversion specification and moreFred Drake2001-07-061-6/+1
| | | | powerful latex2esis.py.
* Allow the <author/> element to appear before a paragraph without beingFred Drake2001-03-291-1/+1
| | | | made a part of the paragraph.
* Remove the annoying __version__ definitions.Fred Drake2001-03-231-1/+0
|
* Lots of small changes to make this work with the Python DOM bindingsFred Drake2001-03-231-91/+95
| | | | | | | (minidom in particular); it was using PyDOM which is now obsolete. Only write the output file on success -- this avoids updating the timestamp on the file on failure, which confuses "make".
* Remove unused "import curses".Guido van Rossum2000-05-241-1/+0
|
* rewrite_descriptor(): Fixup conversion of arguments (simpler).Fred Drake1999-11-231-12/+35
| | | | | | | | join_adjacent_elements(): Hack to merge adjacent instances of <option>; the source \programopt with GNU-style long options created problems with LaTeX2HTML; this removes the evil workaround, which should never be necessary from structured documents(!).
* write_esis(): Added support for ENTITY_REFERENCE nodes.Fred Drake1999-08-261-40/+44
|
* rewrite_descriptor(): Fix bug that dropped the first TEXT node fromFred Drake1999-08-201-45/+36
| | | | | | | | | | | | | | | <description> elements. Add another sanity check to make sure a special case only becomes involved for <opcodedesc> and <opcodedescni> elements. fixup_paras_helper(): Clean up control flow. Everywhere that checks node.nodeType==ELEMENT and node.tagName now just check node.nodeName (nodeName is guaranteed for all node types and will be special values that don't conflict with GIs for non-ELEMENT nodes). Simplifies a number of tests and improves readability in a lot of places.
* remap_element_names(): Only used for things that the new conversionFred Drake1999-08-031-32/+6
| | | | | | | | | | | | | | engine in latex2esis.py can do, so discard it. paragraph detection & markup: Handle some of the list-like environments properly, picking up paragraphs inside list items. (Only changed a few element-sets used for recognition.) fixup_refmodindexes_chunk(): Use the right attribute to determine the module a <ref*modindex/> element is referring to. convert(): Don't call remap_element_names(); it was removed.
* bwrite(), ewrite(): Helpers for diagnostic output; essentially theFred Drake1999-08-021-30/+61
| | | | | | | | | | | | | | | | | | | | | | | | | same as sys.stderr.write(), but bwrite() will make it bold if stderr is a tty (for visibility). Use these everywhere instead of accessing sys.stderr.write() directly. find_all_child_elements(): Find all elements by type name that are immediate children of another. cleanup_synopses(): Receive both the document and fragment objects as parameters; if only the document is passed, synopsis information is never found since it's in the fragment! build_para(): Add a chunk of code to ensure that a newline always follows the </para> end-tag. Not really important, but makes presentation consistent for authoring/ maintenance. fixup_bifuncindexes_chunk(): Use find_all_child_elements() instead of find_all_elements() so we don't work with too many levels at once; that could cause DOM exceptions with the <elem>.removeChild() method.
* Added a few more passes through the document fragment. Not actuallyFred Drake1999-07-291-11/+126
| | | | very interesting.
* Lots of adjustments to deal with the document content now being storedFred Drake1999-05-101-91/+94
| | | | in a fragment rather than the main document object.
* Add support for <platform>, some cleanup of module section afterFred Drake1999-03-111-0/+20
| | | | creating the <moduleinfo>.
* Mark <verbatim> elements that represent interactive sessions; theseFred Drake1999-02-181-0/+11
| | | | become <interpreter-session> elements.
* Added support to handle \versionadded in a reasonable way.Fred Drake1999-01-291-9/+19
|
* fixup_descriptors(): Change the way we look for descriptor nodes;Fred Drake1999-01-291-4/+15
| | | | | this takes 5 minutes off the conversion of the whole tree by reducing the number of tree-traversals from 14 to 1.
* Rewrite code that converts the little descriptor environments to buildFred Drake1999-01-291-53/+114
| | | | | the right <signature>s and <description>. This seems to work a lot better now!
* Update the docstring.Fred Drake1999-01-281-101/+159
| | | | | | | | | | | | | | Lots of changes to get the paragraph marking to work, and not go into an infinite recursion. Start to rationalize markup of method signatures; not complete. find_all_elements(): similar to getElementsByTagName(), but operates on the not-quite-legal fragments we deal with here. Simplifies several individual transforms. fixup_sectionauthors(): Convert \sectionauthor items to <author> just after the <section>'s <title>.
* create_module_info(): If there's a \moduleauthor, move it to anFred Drake1999-01-191-20/+18
| | | | | | <author> inside the <moduleinfo> element. Fix problems with paragraph identification.
* handle_labels(): Fix problem for document fragments containing moreFred Drake1999-01-191-12/+14
| | | | | | than one "root" that prevented all the <label id=...> items from being promoted to id attributes on the enclosing chapter/ section/... properly.
* convert(): Change the element name remapping to convert <refmodule>Fred Drake1999-01-191-0/+1
| | | | to <module link>.
* Make <rfc> no longer an empty element but a container. The textFred Drake1999-01-141-0/+44
| | | | | | | | | | | | currently generated by the LaTeX and LaTeX2HTML processes is generated here as well, making it more flexible in the SGML version. Reduce the <args> element so that <optional> goes away; just use square brackets to indicate what's optional. This makes it easier to read than the LaTeX, and the processor can do any checking it needs to in order to make sure it's legit. Possible shortcoming: DSSSL processors may need more explicit markup. Can probably hack around it for this case, but we'll see.
* Several new functions to re-write tables to be at least partlyFred Drake1999-01-141-0/+112
| | | | | conformant with the OASIS Exchange model. There's a little more massage left to do, but not much.
* Preliminary code to mark paragraphs. Seems to work, but very slow.Fred Drake1999-01-061-2/+150
|
* create_module_info(): New function: Modify a <section> to create aFred Drake1998-12-101-13/+99
| | | | | | | | | <moduleinfo> element based on various meta information, and strip some cruftiness. This is more usable for information extraction, and organizes the information more clearly. cleanup_synopses(): Rewrite to use create_module_info(), so this will work with multi-rooted "documents".
* Added a transform to start cleaning up the modulesynopsis stuff aFred Drake1998-12-101-0/+17
| | | | little; more thinking is needed about what we really want.
* Use esistools.Fred Drake1998-12-011-15/+66
| | | | | Generate ESIS data instead of XML. Misc. changes to some transforms.
* Add some additional cleanup transformations.Fred Drake1998-11-231-0/+67
|
* Script to squirrel around with the DOM tree of document fragments from theFred Drake1998-11-231-0/+193
LaTeX-based ESIS streams to be a little better structured, and generally perform clean-up. Preliminary.