[TxMt] Template Maker

Brett Terpstra brett at circlesixdesign.com
Mon Nov 13 00:34:08 UTC 2006


I'm a little hesitant to put this out there because I'm not sure if  
it's a silly idea or not.  I asked a little while back about  
interactive template creation.  I created a portfolio website that,  
when the entries are created correctly, automatically generates  
client lists, recent project lists, portfolio pages, etc.  I just  
needed a way to enter the data and have it format a blog entry.

What I ended up doing with it was using tm_dialog to create a form  
and then process that in a template command that outputs to a new  
blog.html file.  It's very specific to my needs, so I'm obviously not  
sending that to the list.  However, the process seemed relatively  
new, so I thought I'd share it, just in case.

The template will take any key-value pairs fed to it by the nib and  
substitute them for the :::key::: in the template file.  You can  
build as complex a nib as you like, and do whatever you want with the  
keys in the template file.  It's all done in ruby.

It just includes a Mad Lib and is basically a proof of concept, but I  
think it has applications ranging from composing emails to blog  
entries and anything that could be sped up by inputting values into a  
template interactively.



Brett Terpstra : Art Director
Circle Six Design, Inc.
111 Riverfront Dr, Suite 204
..................................................
p: 507.459.4398
     877.858.4332
f: 1.866.540.3063
e: brett at circlesixdesign.com
http://www.circlesixdesign.com
..................................................


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20061112/7ccefc82/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Template Maker.tmbundle.zip
Type: application/zip
Size: 26505 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20061112/7ccefc82/attachment.zip>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20061112/7ccefc82/attachment-0001.html>


More information about the textmate mailing list