[Therion] automatic template insertion
Martin Sluka
martinsluka at mac.com
Fri Sep 16 14:41:40 CEST 2005
May you add this to wiki, please?
Martin
At 15:11 +0300 16.9.2005, dzach wrote:
*******************************************
>Continuing on possible improvements of Xtherion, a quote from the
>therion:faq-How to enter centreline? in the wiki offers a hint:
>"It's handy to start with an empty template file as shown bellow,
>where the dots will be replaced with appropriate text."
>
>For a newbie, it would be better if the template text could be
>inserted automatically in a new text file (following an option "Use
>template" in the relevant panel). To do that, create a text file
>named text.tpl, paste the following template text in it and save.
>encoding ISO8859-1
>survey ... -title "..."
> centreline
> team "..."
> team "..."
> date ...
> units clino compass grad
> data normal from to compass clino length
> ... ... ... ... ...
> endcentreline
>endsurvey
>Next, add the following tcl code at the very end of proc
>xth_te_create_file, just before the closing bracket:
>
>if {[glob -nocomplain text.tpl] ne {}} {
> xth_te_insert_text $cfr.txt [read [open "text.tpl" r]]
>}
>
>From now on, when you open a new text editor file, you will have the
>template text inserted automatically at the begining.
>
>DZ
>
>_______________________________________________
>Therion mailing list
>Therion at speleo.sk
>http://www.speleo.cz/mailman/listinfo/therion
--
More information about the Therion
mailing list