I've completed a first pass at a standalone DRYML gem:
http://hobousers.googlegroups.com/web/dryml-0.9.106.gem.
Comments appreciated.
It shouldn't be too hard to use in Sinatra or github.com/rtomayko/
tilt, although I haven't done so yet. It still has a dependency on
ActionView, though.
Here's a non-trivial example of its use:
http://github.com/bryanlarsen/hobo-jquery/blob/master/lib/doc.rb
Here's the README: http://github.com/tablatom/hobo/blob/dryml-split/dryml/README
And the RDOC referenced at the bottom of the README:
# Helper function for use outside Hobo/Rails
#
# Pass the template context in locals[:this]
#
# This function caches. If the mtime of template_path is older
# than the last compilation time, the cached version will be
# used. If no template_path is given, template_src is used as the
# key to the cache.
#
# If a local variable is not present when the template is
# compiled, it will be ignored when the template is used. In
# other words, the variable values may change, but the names may
# not.
#
# included_taglibs is only used during template compilation.
#
# @param [String] template_src the DRYML source
# @param [Hash] locals local variables.
# @param [String, nil] template_path the filename of the source.
# @param [Array] included_taglibs A list of Taglibs to include.
{ :src =>
# "core", :plugin => "dryml" } is automatically
# added to this list.
# @param [ActionView::Base] view an ActionView instance
def render(template_src, locals={}, template_path=nil,
included_taglibs=[], view=nil)