From: Wejn Date: 2003-10-23T02:05:59+09:00 Subject: [ANN] Template.rb (2003-10-22) Hi, I'd like to announce first release of "Template.rb" library: a not-so-simple template language, which is descendant of my PHP version with the same name. While being quite stable, it currently lacks any documentation and website... I'm releasing it mainly due to the fact that I currently have no time to create the docs and I think it could be useful to someone in this list. The download URL is: http://www.fi.muni.cz/~xsafran3/Template.rb-20031022-183020.tgz To give you very rough understanding how it works (feels), here's simple example: =========================================================================== $ cat a.rb require 'Template' t = Template.new t['a'] = {'a' => 'b', 1 => 'x', 's' => Time.now} t['b'] = [] t['c'] = ['first', 'second', 'third', 'fourth'] t['n'] = 3 t.load('a.tmpl') puts t.execute $ cat a.tmpl ::@k:: -> ::@v::, ::@k:: -> ::@v::, No data. Third element is: ::c[2]::, while fourth is: ::c[n]::. Fine.Error. Static ::text:: here. $ ruby a.rb a -> b, 1 -> x, s -> Wed Oct 22 19:00:28 CEST 2003, No data. Third element is: third, while fourth is: fourth. Fine. Static ::text:: here. =========================================================================== If you have any comments (or you just happen to like it), don't hesitate to drop me a note :-) Sincerely, Michal -- Wejn (svamberk.net's Linux section, fi.muni.cz student, linuxfan) >>> Bored? Want hours of entertainment? <<< >>> Just set the initdefault to 6! <<<