You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_dtcl@tcl.apache.org by "David N. Welton" <da...@apache.org> on 2001/02/28 17:05:20 UTC

dtcl tags

Unless I hear comments to the contrary, I am going to change the tags
to <? and ?> soon, whilst leaving a backwards compatiblity parser in
the code with ifdefs (for now turned on), so that for now, old .ttml
pages will still work.  I will also write a shell script to change
.ttml files - it shouldn't be hard...

-- 
David N. Welton
     Personal:           http://www.efn.org/~davidw/  
Free Software:           http://people.debian.org/~davidw/
   Apache Tcl:           http://tcl.apache.org

Re: dtcl tags

Posted by "David N. Welton" <da...@apache.org>.
Wojciech Kocjan <zo...@nowiny.net> writes:

> Sounds good to me.

I will commit it today then, having received a positive response from
several people.
 
> Also, you could easily write it in tcl - would me much more
> appropriate ;-)

Sure, but it will be slower.  The only benefit might be for windows
people who don't have shell tools.  In that case, though, the whole
thing needs to be in Tcl (the find functionality as well).

Barring that:

#!/bin/sh
for fn in `find . -name "*.ttml"` ; 
        do sed -e 's/<+/<?/g' -e 's/+>/?>/g' $fn > $fn.new; 
        mv $fn.new $fn ; 
done

Seems to work.
-- 
David N. Welton
     Personal:           http://www.efn.org/~davidw/  
Free Software:           http://people.debian.org/~davidw/
   Apache Tcl:           http://tcl.apache.org

Re: dtcl tags

Posted by Wojciech Kocjan <zo...@nowiny.net>.
Sounds good to me.

Also, you could easily write it in tcl - would me much more appropriate
;-)

ie:
#!/usr/bin/tclsh

foreach a $argv {
    set f [open $a r]
    regsub -all "<+" [read $f] "<?" fc
    regsub -all "+>" $fc "?>" fc
    close $f
}

you could also do recursive globs... :>

the above SHOULD work (wrote it in a minute ;-)

Wojtek Kocjan
wojciech@kocjan.org


On 28 Feb 2001, David N. Welton wrote:

> 
> Unless I hear comments to the contrary, I am going to change the tags
> to <? and ?> soon, whilst leaving a backwards compatiblity parser in
> the code with ifdefs (for now turned on), so that for now, old .ttml
> pages will still work.  I will also write a shell script to change
> .ttml files - it shouldn't be hard...
> 
> -- 
> David N. Welton
>      Personal:           http://www.efn.org/~davidw/  
> Free Software:           http://people.debian.org/~davidw/
>    Apache Tcl:           http://tcl.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: mod_dtcl-unsubscribe@tcl.apache.org
> For additional commands, e-mail: mod_dtcl-help@tcl.apache.org
>