txt2html's main website is http://txt2html.sourceforge.net. The project summary page is at http://sourceforge.net/projects/txt2html/.
There is also a page at CPAN http://search.cpan.org/author/RUBYKAT/.
A similar mirror page is at http://www.katspace.com/tools/text_to_html/
txt2html's original website was at http://www.aigeek.com/txt2html/
txt2html is a Perl program that converts plain text to HTML. It uses the HTML::TextToHTML perl module to do so. Look at the README file.
HTML::TextToHTML is a Perl module that converts plain text to HTML.
It supports headings, lists, some tables, simple character markup, and hyperlinking, and is highly customizable. It recognizes some of the apparent structure of the source document (mostly whitespace and typographic layout), and attempts to mark that structure explicitly using HTML.
Our intent in writing this tool is to provide an easier way of converting existing text documents to HTML format.
txt2html is not a program to convert wordprocessor files or other marked-up document formats. It is also not a program to convert HTML to text. Most HTML browsers do that.
If you need to convert something other than plain text to HTML, or you need to convert from HTML, you should look for a more appropriate tool.
txt2html is not a program for automatically generating a table-of-contents from a file. If you want that, then use txt2html to generate a HTML file, and then use htmltoc or hypertoc on the HTML file.
The current version is v2.52. A list of changes can be found here and in the tar file.
This runs HTML::TextToHTML using the default options using a simple wrapper script.
It's a Perl module with the script and everything bundled in the tarball, so installation is pretty easy. You don't need to compile anything.
This will install the script in /usr/local/bin or /usr/bin by default (depending on your particular setup). It now relies on /usr/bin/env to figure out where your version of perl is, but that should work on most platforms. The global links dictionary is now built-in to the module.
If you prefer an RPM install, look for various RPMs, made by other people. There is also an official Debian package, though naturally all RPMs and Debs will lag behind the official tarball here.
Look at this sample document for a basic idea. txt2html is more flexible than it looks though. You don't need to make your documents look just like this for txt2html to work.
If you just want to make obvious URL references into hyperlinks, you just have to install the module, and give the --links_only option to the txt2html script.
For learning how to configure your own hyperlinks dictionary, look at the documentation, and you can look at the global links dictionary which is appended to the actual module file. If you have improvements for this links-dictionary, please mail them to me so everyone can benefit.
Look at the README file or the plain text README. Basically this is licensed under the Artistic License and the GPL.
If you can get a copy of Perl (version 5 or later), then you can use txt2html. Don't ask me how, because I've never tried it. Other people tell me it works fine.
Thanks to all the people who have given us ideas, patches, bug reports, wish lists, and moral support.
[ Home | txt2html sourceforge | Download ]