From: bozo@clown.wustl.edu (Bozo the Anonymous Clown) To: seth@hilco.com (Seth Golub) Subject: Re: txt2html Date: Fri, 6 May 94 10:01:10 -0500 Bozo wrote: > Can you post an example text file with its html'ed output? > That would provide a much better first glance at what it does > without having to look through and see what the perl code does. Sure thing. This reply will put it through some paces. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 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. I usually have mailmode on since doesn't screw things up very often. Paragraphs are handled ok. In fact, this one is here just to demonstrate that. Features of txt2html ==================== * Handles different kinds of lists 1. Bulleted 2. Numbered - You can nest them as far as you want. - It's pretty decent about figuring out which level of list it is supposed to be on. - You don't need to change bullet markers to start a new list. * Groks Mosaic-style headers (like the one above) * Doesn't screw up mail-ish things * Spots preformated text sometimes It just needs to have enough whitespace in the line. The 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. * You can append a file automatically to all converted files. This is handy for adding signatures to your documents. * Deals with paragraphs decently. o looks for short lines in the middle of paragraphs and keeps them short with the use of breaks (
). How short the lines need to be is configurable. Example of short lines ---------------------- 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. I'll append my signature, just so you can see where in the html file it gets slapped in. The signature is everything from the end of this sentence to the tag.