Convert text files to html files
I have a bunch of plain text files.
Need to convert them into corresponding HTML pages. Is there some command that I can use (in a shell script) to convert: abc.txt to abc.html def.txt to def.html ::: xyz.txt to xyz.html I would like to preserve the line breaks, paragraphs, punctuation, etc. |
Well, there's txt2html (http://txt2html.sourceforge.net/) which uses the Perl module HTML::TextToHTML....
-Dan |
This looks good but it is not installed on this host:
which txt2html /usr/bin/which: no txt2html in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin) |
Try
perl -e 'use HTML::TextToHTML;' and see if you get an error. If you do, you'll need to use CPAN or some other method to get the module. Just download the tarball with: untar it and follow the README. There's nothing to compile and it can run in your home directory. -Dan |
All times are GMT -5. The time now is 05:13 AM. |