|
From: Oliver R. <ol...@ru...> - 2002-10-25 04:11:34
|
----- Original Message ----- From: "David Goodger" <go...@us...> To: "Oliver Rutherfurd" <ol...@ru...> Cc: <doc...@li...> Sent: Thursday, October 24, 2002 5:13 PM Subject: Re: [Docutils-develop] Re: Writer for .ht (HTML Template?) files > David Goodger wrote: > I think this effort (and I, personally!) could benefit greatly from a > short README or quick-start guide, giving straightforward instructions > how to set up HT2HTML and how to use the HT2HTML and Docutils tools to > build a web page or site. HT2HTML comes with a bunch of "generators"; > which one to use at first? Or do we have to customize our own? A > quick-start guide answering these questions could also be fed back to > the HT2HTML project. > > Could someone write one? I've just started playing around with it this past week, so I'll try to put a little something together over the next couple of days as I check it out a little more. I'm going to be travelling, but I should have some time. > David Goodger wrote: > Having taken a look at the code, I noticed that the ``settings_spec`` > attribute is being partially duplicated. With the addition of > stylesheet handling, the duplication is complete (or close). Perhaps > it would be best to make the generation of .ht files (and > body-contents-only files, as Julien proposed) part of the html4css1.py > writer. Something like "--form=ht" or "--partial-ht" (can't think of > anything good today; brain's a bit fuzzy). The "HTTranslator" class > could live in the same module as "HTMLTranslator", and the option > would trigger its use (the visitor/translator class is already > parameterized in the "Writer" class). > > Or should they be separate writers, but inherit most or all settings? > See writers/pep_html.py for an example. I duplicated all the settings because I didn't think the 'embed stylesheet' option would work for the writer. From what I can see, if you want to embed styles in your generated html, you must put it in the Python generator class. This is one hangup that I see about making '.ht' output an option for the html4.css1 writer. Maybe it's just me, but it might start getting a little confusing if some options work or don't work depding on the "form" of the output from the same writer -- though maybe I'm making a bigger deal about that than it really is. How would people suggest dealing with these types of differences? -Ollie ol...@ru... |