Converting PyDoc to Docbook XML?

Jared K. Smith jsmith at fedoraproject.org
Thu Jul 26 13:38:52 UTC 2012


On Thu, Jul 26, 2012 at 9:26 AM, Steve Gordon <sgordon at redhat.com> wrote:
> Has anyone attempted converting PyDoc to Docbook XML recently with success? I've tried a project called HappyDoc but it seems to be unmaintained and pretty poorly documented, though it claims on the project site to be able to generate DocBook XML.

Sorry, I haven't tried this, as I haven't spent a lot of time in PyDoc.

> I have also tried generating the PyDoc HTML with `pydoc -w <module>`, converting it to XHTML with tidy:
>
>     tidy -indent -m -asxhtml -clean -bare -omit ovirtsdk.infrastructure.brokers.html
>
> ...and then turning it into Docbook with an XSLT [1]:

This is almost guaranteed to cause heartburn, as the HTML and XHTML
tend to tag items based on appearance (bold, italics, CSS styling)
rather than their inherit types (section, paragraph, emphasis, program
listing, and footnote just to name a few).

--
Jared Smith


More information about the docs mailing list