From: "John W. Long" Date: 2006-06-21T05:41:44+09:00 Subject: [ANN] Radius 0.5.1 -- Powerful Tag-Based Templates I am pleased to announce the immediate release of Radius 0.5.1. Radius is a small, but powerful tag-based template language for Ruby inspired by the template languages used in MovableType and TextPattern . It uses tags similar to XML, but can be used to generate any form of plain text (HTML, e-mail, etc...). Radiant CMS currently uses Radius in its unique templating system. This is a bug-fix release. From the change log: 0.5.1 * Fixed a problem with parsing quotes where a single tag preceding a double tag would consume the start tag of the double tag if both contained attributes Download: http://rubyforge.org/frs/?group_id=1262 Documentation: http://radius.rubyforge.org Instalation: % gem install --remote radius A small example: require 'radius' # Define tags on a context that will be available to a template: context = Radius::Context.new do |c| c.define_tag 'hello' do 'Hello world' end c.define_tag 'repeat' do |tag| number = (tag.attr['times'] || '1').to_i result = '' number.times { result << tag.expand } result end end # Create a parser to parse tags that begin with 'r:' parser = Radius::Parser.new(context, :tag_prefix => 'r') # Parse tags and output the result puts parser.parse("A small example:\n" + '* !\n') Output: A small example: * Hello world! * Hello world! * Hello world! Learn more by reading the Quick Start guide: http://radius.rubyforge.org/files/QUICKSTART.html Enjoy! -- John Long http://wiseheartdesign.com http://radiantcms.org