if 0 { <> ---- **Summary** [HJG] 2016-02-02: This is another attempt at quick, easy, ad-hoc printing of simple textfiles. I often have some informations in a textfile, and if I need to print that, I want a nice looking page, <
> e.g. with a few headers, some text in bold etc., but I don't want to use an 'Office'-textprocessor for that. The idea is to convert that textfile to a html-file, then print that with the webbrowser. The basic operation of that converter is to copy the inputfile x.txt to x.html, <
> add some lines like "" "", "" etc. and wrap the first line of text in

-tags. <
> Also, replace some chars (like &, <, >) with html-entities. Then I can drop the resulting file x.html into the browser and print. <
> Or, with a fixed location for the output-file, use a bookmark in the browser. Add some CSS to taste, and extent the converters "basic operation" to cover more markup, as need arises. There are some programs available that work like that, e.g. [Markdown]. <
> But Markdown uses Perl, and I want even more minimal markup. ---- With ideas and code from the following pages: * http://wiki.tcl.tk/28965%|%Markdown%|% * [A little demon] - Script that can work as a print-spooler. * ... } ---- **Code** ======tcl # EasyTextPrint001.tcl - HaJo Gurt - 2016-02-02 # http://wiki.tcl.tk/42409 puts "EasyTextPrint:" set i 0 foreach s { foo bar grill } { incr i; puts "$i $s" } ... ### EOF ### ====== ---- **Comments** Some extensions to the "basic operation" of the converter: * comment - don't print lines starting with the comment-char * start- and end-marker - to print only part of a file * more than just a H1-header - also support H2, H3 * HR - horizontal rulers * Bold/italic/underlined text - e.g. recognize markup **bold** //italic// __underline__ * pre/code - start- and end-marker to treat text as code/preformatted ---- '''See also:''' * Printing text files under Windows] * [...] <> GUI | Application