Get Down, Ye Monks!
This might be a stupid question, so any thrown fruit is accepted as due. I've poked around the docs and supersearch, but I don't really know how to phrase the question in a way a search engine can parse...
I'm considering using Template Toollkit for a project. TT seems to require that the templates etc.. come from external files. I just want to process strings. Am I missing something obvious, or is this actually a pretty complex request for TT?
Here's the background: I'm a sysadmin and I've got a zillion little helper scripts that make accounts of various kinds, change quotas, delete things etc... I've finally decided to factor out the common tasks into a module. One of the things I keep writing over and over again is an email to the user in question. These emails are usually %80 identical. I'd like to use TT to make a readily extensible email template. I'd rather keep the template data in the module, rather than spreading out over multiple files because I really don't want these things to get out of sync and I think that'd be easier overall.
UPDATE:
I just stood up, fed the cats, and remembered the real reason I don't want to use external files: when I use this module inside a script, I'd like to be able to manipulate the email from within those scripts without another text file to worry about. My brain is not having a good day. Be merciful...
Thanks!
--Pileofrogs
In reply to TT & templates from data? by pileofrogs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |