From: Makoto Kuwata Date: 2004-04-23T18:44:48+09:00 Subject: [ANN] Kwartz (2004-04-23) - a template system for ruby, php and java Hi folks, I have released new version of Kwartz. Kwartz is a template system, which has the following features. - separate presentation logic from HTML file. - very fast, as fast as mod_ruby - available in Ruby, PHP and Java. - doesn't break HTML design at all. - can handle any type of text file. - auto-sanitizing * Download: http://www.kuwata-lab.com/kwartz/kwartz_2004-04-23.tar.gz * Homepage http://www.kuwata-lab.com/kwartz/ (URL changed) * New features: - New lang 'ruby2' supported. It stores output into string. Compile: ======================================== $ kwartz -l ruby2 file.html > file.rb ======================================== Output script (file.rb): ---------------------------------------- _s << "Hello " << (user).to_s << "!\n" _s << "\n" ---------------------------------------- Main program: ---------------------------------------- code = File.open('file.rb') { |f| f.read } _s = '' eval code print _s ---------------------------------------- - Utility script 'mkmethod' enhanced to be able to take argument names with command line option '-A'. ======================================== $ mkmethod -A 'user,list' -M Hoge hoge.html module Hoge def self.expand_hoge(_args) user = _args[:user] list = _args[:list] return self._expand_hoge(user, list) end def self._expand_hoge(user, list) _s = '' _s << "Hello " << (user).to_s << "!\n" _s << "\n" return _s end end ======================================== - New lang 'php2' supported. It uses output buffering functions to get output as string. - Utility script 'mkmethod' now support PHP. -- regards, kwa