Re: Web site improvements

From: David Mertz <voting-project_at_gnosis_dot_cx>
Date: Sat Sep 13 2003 - 11:44:31 CDT

|Can you point me to the APT software? I will see if it can be stitched into
|ht2html, just as ReST was recently.

Sure, take a look at:

    http://www.xmlmind.com/aptconvert.html

The conversion tool, however, is written in java. You don't need to
know any Java to use it (I've never looked at the source code), but it's
also not directly callable from a Python app. Well, I suppose it would
be from Jython; and obviously you can run 'os.popen()'.

That said, the whole of what you'd need to do to stick an 'aptconvert'
generated HTML file into an ht2html '*.ht' file is (roughly and
untested):

    err = os.popen('aptconvert -toc -nonum foo.html foo.apt').read()
    if not err.strip():
        html = open('foo.html').read()
        html = html[html.find('<body>')+6:html.find('</body>')]
        ht = HT_HEADER + html
        open('foo.ht','w').write(ht)

Yours, David...

--
Keeping medicines from the bloodstreams of the sick; food from the bellies
of the hungry; books from the hands of the uneducated; technology from the
underdeveloped; and putting advocates of freedom in prisons.  Intellectual
property is to the 21st century what the slave trade was to the 16th.
==================================================================
= The content of this message, with the exception of any external 
= quotations under fair use, are released to the Public Domain    
==================================================================
Received on Tue Sep 30 23:17:04 2003

This archive was generated by hypermail 2.1.8 : Tue Sep 30 2003 - 23:17:09 CDT