[Doc-SIG] Getting HTML without header/footer etc.?

Garth Kidd garth at deadlybloodyserious.com
Fri Jun 13 10:10:09 EDT 2003

> Thanks! I've invented my own ugly workaround until then... 
> (basi- cally chopping off the stuff I don't need).

PyDS' `StructuredText.py`__ shows how to derive a ``HTMLFragmentTranslator``
from ``docutils.writers.html4css1.HTMLTranslator`` without having to define
your own from scratch. Georg has hacked into the code since I wrote it,
though, so don't ask me what ``HTMLFragmentWriter.translate`` is up to. :) 

__ http://simon.bofh.ms/cgi-bin/cvsweb/PyDS/PyDS/StructuredText.py

> Another related issue is this: I'm generating code snippets 
> outside of docutils and would like to pass chunks containing 
> some HTML to docutils, but without having it transform them 
> into entities like > etc. It should only care about the 
> reST formatting rules. May- be there is a clever way to do this?

I think we're talking ``raw:: html`` substitutions, here. The PyDS
WikiTool__ uses the PyDS ShortcutTool for that. Warning on the site: I'm
reworking MeshTool extensively, and at the moment things aren't being
rendered like they should. 

__ http://www.pycs.net/users/0000088/wiki/WikiTool.html


More information about the Doc-SIG mailing list