Hi guys,
>> A lot of people, especially at the Python level,
haven't come forth to put
>> that level of effort in, which is why it's
still an unsolved problem.
Another way of looking at it is that it was solved 10 years ago by
Robin Friedrich"s HTMLgen. I just use a python editor. And stop worrying about closing tags, they"re automatically put right.
Works for me. I dont ever want to edit raw HTML. Nobody does.
The Python HTMLgen Module | Linux Journal
A sample of HTMLgen looks like this:
<code>
from HTMLgen import *
import HTMLcolors
Par = Paragraph
Bold = Strong
Em = Emphasis
nl = BR
meta = Container()
meta.append('<meta name="robots" content="noindex,nofollow">')
meta.append('<meta name="keywords" content="duh">')
meta.append('<meta name="description" content="duh">')
#instantiate a document
s = SimpleDocument(title="testing HTMLgen's basic moves")
# append a container
s.append(meta)
s.append(Heading(2, "I am the Heading, size 2."))
s.append(Par(Pre("I am Paragraph 1, Pre.")))
s.append(Par(Code("I am Paragraph 2 in Code tags.")))
s.append(Par(U("I am Paragraph 3 in Underline tags.")))
s.append(HR())
s.append(Heading(3, "I am the second Heading, size 3."))
s.append(Par(Em("I am Paragraph 4 in Em tags."), nl(),
Bold("Now in Bold tags."), nl(),
Pre("Now in Pre tags."), nl(),
Code("Now in Code tags."), nl(),
U("Now in Underline tags."), nl(),
Blockquote("I am ending Paragraph 4 in Blockquote tags.")))
s.append(HR())
# --------------------------------------------
</code>