Unix Programming - Text-to-HTML processing program

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > January 2004 > Text-to-HTML processing program





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Text-to-HTML processing program
phil hunt

2004-01-23, 5:21 pm

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)?


--
"It's easier to find people online who openly support the KKK than
people who openly support the RIAA" -- comment on Wikipedia
(Email: <zen20000@zen.co.ku>, but first subtract 275 and reverse
the last two letters).


Paul Rubin

2004-01-23, 5:21 pm

philh@invalid.email.address (phil hunt) writes:
quote:

> 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>.
Rene Pijlman

2004-01-23, 5:21 pm

phil hunt:
quote:

>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...estructuredtext

"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/Str...Wiki/FrontPage/

--
René Pijlman
Jeff Schwab

2004-01-23, 5:21 pm

phil hunt wrote:
quote:

> 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?


John Roth

2004-01-23, 5:21 pm


"phil hunt" <philh@invalid.email.address> wrote in message
news:slrnbvcm32.122.philh@cabalamat.cabalamat.org...
quote:

> 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



phil hunt

2004-01-23, 5:21 pm

On 02 Jan 2004 22:18:56 -0800, Paul Rubin <http://phr.cx@NOSPAM.invalid> wrote:
quote:

>philh@invalid.email.address (phil hunt) writes:
>
>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>

--
"It's easier to find people online who openly support the KKK than
people who openly support the RIAA" -- comment on Wikipedia
(Email: <zen20000@zen.co.ku>, but first subtract 275 and reverse
the last two letters).


phil hunt

2004-01-23, 5:21 pm

On Sat, 03 Jan 2004 11:05:54 -0500, Jeff Schwab <jeffplus@comcast.net> wrote:
quote:

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



I wasn't aware troff did HTML output.
quote:

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



Yuk.

--
"It's easier to find people online who openly support the KKK than
people who openly support the RIAA" -- comment on Wikipedia
(Email: <zen20000@zen.co.ku>, but first subtract 275 and reverse
the last two letters).


Jeff Schwab

2004-01-23, 5:21 pm

phil hunt wrote:
quote:

> On Sat, 03 Jan 2004 11:05:54 -0500, Jeff Schwab <jeffplus@comcast.net> wrote:
>
>
>
> 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.
quote:

>
>
> Yuk.



Simple.

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

Reinier Post

2004-01-23, 5:22 pm

phil hunt wrote:
quote:

>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.

--
Reinier
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com