From: David G. <go...@py...> - 2002-11-08 21:39:39
|
Handzsuj,Thomas wrote: > I have a suggestion for using ht2html together with docutils > (http://docutils.sourceforge.net/) > > The advantage is that I have to deal only with simple and readable ASCII > files. I agree. There has been some interest in integrating the two recently. Oliver Rutherfurd has written a preliminary Writer component for .ht output: http://docutils.sourceforge.net/sandbox/oliverr/ht/ > The problem is that docutils creates normal html files. The information in > the header of these files (e.g. title, charset) is lost if I use them as ht > files. > > To transfer this information I wrote a simple Parser based on SGMLParser. It > collects information from the body and the get_.. functions take this > information. I think this is a roundabout way of doing the job. Please take a look at the link above. It produces real .ht files, with the title in the RFC822 header. The encoding could go there too (assuming it's ASCII-compatible). I don't know how encoding-friendly ht2html is. Ideally, I'd like to see a system which programmatically controls both Docutils and ht2html, so that intermediate files don't have to be created. I haven't looked into the ht2html code enough yet to know if this is feasible. -- 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/ |