txt2html Sample Conversion
I used the following command to convert this document:
txt2html -tf --mail -H '^ *--[\w\s]+-- *$' -a sample.foot sample.txt > sample.html
From: firstname.lastname@example.org (Bozo the Clown)
To: Seth Golub)
Subject: Re: txt2html
Date: Fri, 6 May 94 10:01:10 -0500
BtC> Can you post an example text file with its html'ed output?
BtC> That would provide a much better first glance at what it does
BtC> without having to look through and see what the perl code does.
Good idea. I'll write something up.
The header lines were kept separate because they looked like mail headers and I have mailmode on. The same thing applies to Bozo's quoted text. Mailmode doesn't screw things up very often, but since most people are usually converting non-mail, it's off by default.
Paragraphs are handled ok. In fact, this one is here just to demonstrate that.
THIS LINE IS VERY IMPORTANT!
(Ok, it wasn't that important)
Since this is the first header noticed (all caps, underlined with an "="), it will be a level 1 header. It gets an anchor named "section-1".
This header was in the same style, so it was assigned the same header tag. Note the anchor names in the HTML. (You probably can't see them in your current document view.) Its anchor is named "section-1.2". Get the picture?
You can define your own custom header patterns if you know what your documents look like.
indicated, so it may be a numbered list in some browsers. (Ok, most browsers)
It just needs to have enough whitespace in the line. Surrounding blank lines aren't necessary. If it sees enough whitespace in a line, it preformats it. How much is enough? Set it yourself at command line if you want.
We're the knights of the round table
We dance whene'er we're able
We do routines and chorus scenes
With footwork impeccable.
We dine well here in Camelot
We eat ham and jam and spam a lot.
The signature is everything from the end of this sentence to the </BODY> tag.