PDA

View Full Version : TCL help (or any language), write a program that converts TEXT to HTML



arnoldma
03-18-2010, 07:52 AM
Hi,

i know this is a long shot, but does anyone know by any chance how i can write in TCL script a program that converts a TEXT file input to a HTML output.

it can be very simple, i.e. i input "HELLO WORLD" and the TCL script converts it to a simple html page that has "<font color"red"><header>HELLO WORLD</header></font>"

please let me know, any help is greatly appreciated!

also if anyone know a simpler language than TCL i can do this in would be great too.

thanks!

s1nykuL
03-28-2010, 03:23 AM
The best language for such would be one designed with string/text manipulation in mind.

I am not versed in Perl but this would be a good choice. There is Perl for windows too.

http://groups.engin.umd.umich.edu/CIS/course.des/cis400/perl/perl.html

Here are some comparisons of the string manipulation capabilities of various languages.

http://en.wikipedia.org/wiki/Comparison_of_programming_languages_%28string_func tions%29

I have used VB.Net to write html code that used the text contained in the EXIF data embedded in images for both page formating and content. I see no reason VB.Net could do the same thing for text files. It is pretty easy, just be careful with those quotes ;)