Text-to-HTML processing program

P

phil hunt

Does anyone know of a text-to-HTML processing program, ideally
written in Python because I'll probably be wanting to make small
modifications to it, which is simple and straightforward to use
and which uses a simple markup language (something like Wikipedia
markup would be ideal)?
 
P

Paul Rubin

Does anyone know of a text-to-HTML processing program, ideally
written in Python because I'll probably be wanting to make small
modifications to it, which is simple and straightforward to use
and which uses a simple markup language (something like Wikipedia
markup would be ideal)?

I really wish Wikipedia, BBCodes, and all that would just use regular
HTML instead of continually inventing new "simplified" markup codes
for users to remember. The one thing they do that's useful is convert
blank lines to <p>.
 
J

John Hunter

phil> Does anyone know of a text-to-HTML processing program,
phil> ideally written in Python because I'll probably be wanting
phil> to make small modifications to it, which is simple and
phil> straightforward to use and which uses a simple markup
phil> language (something like Wikipedia markup would be ideal)?

Structured text is one of the simplest markups around (and
sufficiently powerful to make nice looking hardcopy) and is well
supported in python

http://www.zope.org/Members/millejoh/structuredText

http://docutils.sourceforge.net/docs/rst/quickstart.html

Beyond that, search google groups for

structured text group:*python*

Here's a link to a post from me about the conversion of one of the old
diehards in our hospital to structured text:
http://mail.zope.org/pipermail/zope/2002-May/115243.html.

JDH
 
J

Jarek Zgoda

phil hunt said:
Does anyone know of a text-to-HTML processing program, ideally
written in Python because I'll probably be wanting to make small
modifications to it, which is simple and straightforward to use
and which uses a simple markup language (something like Wikipedia
markup would be ideal)?

Try PyTextile: http://www.diveintomark.org/projects/pytextile -- it's
Python implementation of Dean Allen's original PHP Textile.
 
P

phil hunt

I really wish Wikipedia, BBCodes, and all that would just use regular
HTML instead of continually inventing new "simplified" markup codes
for users to remember. The one thing they do that's useful is convert
blank lines to <p>.

Wikipedia markup is significantly easier to use than HTML. Compare:

This is a ''list'':
* A list
* [http://www.cabalamat.org/ my website]
* [http://slashdot.org/ Slashdot]

With:

<p>This is a <i>list</i>:
<ul>
<li><a href='http://www.cabalamat.org/'>my website</a></li>
<li><a href='http://slashdot.org/'>Slashdot</a></li>
</ul>
 
R

Rene Pijlman

phil hunt:
Does anyone know of a text-to-HTML processing program, ideally
written in Python [...] which uses a simple markup language
(something like Wikipedia markup would be ideal)?

"reStructuredText is an easy-to-read, what-you-see-is-what-you-get
plaintext markup syntax and parser system. The reStructuredText parser is
a component of Docutils. reStructuredText is a revision and
reinterpretation of the StructuredText and Setext lightweight markup
systems."
http://docutils.sourceforge.net/FAQ.html#what-is-restructuredtext

"Structured Text is a simple plain text markup format used by Zope and
many Zope products, invented by.. JimFulton? ? The idea is to have text
that is easy to read both in source and rendered form."
http://dev.zope.org/Members/jim/StructuredTextWiki/FrontPage/
 
J

Jeff Schwab

phil said:
Does anyone know of a text-to-HTML processing program, ideally
written in Python because I'll probably be wanting to make small
modifications to it, which is simple and straightforward to use
and which uses a simple markup language (something like Wikipedia
markup would be ideal)?

How about troff? Or if you really want to keep it simple, why not use
the <pre> tag in HTML?
 
J

John Roth

phil hunt said:
Does anyone know of a text-to-HTML processing program, ideally
written in Python because I'll probably be wanting to make small
modifications to it, which is simple and straightforward to use
and which uses a simple markup language (something like Wikipedia
markup would be ideal)?

There's an old saying that's attributed to a lot of people:

For every hard problem, there is a solution that is simple,
obvious and wrong.

Markup seems to be one of those problems. Lots of people
look at the existing markup languages out there, go "oh, yuck!,"
and invent a simpler markup language that promptly starts growing
until it reaches the state of the languages they originally rejected
as too complex.

John Roth
 
J

Jeff Schwab

phil said:
I wasn't aware troff did HTML output.

There are separate utilities to do the translation. I have
groff/grohtml on my linux machine; I think there's something different
on my Solaris box.

Simple.

Of course, one *could* just use HTML, and stop whining. :)
 
R

Reinier Post

phil said:
Does anyone know of a text-to-HTML processing program, ideally
written in Python because I'll probably be wanting to make small
modifications to it, which is simple and straightforward to use
and which uses a simple markup language (something like Wikipedia
markup would be ideal)?

Last time I looked for it, I Googled for

txt2html

and found a program of that name based on

txt2tex

I haven't used them heavily.

There are other "plaintext with conventions" text formats out there,
but I can't find my pointers to them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,585
Members
45,080
Latest member
mikkipirss

Latest Threads

Top