summaryrefslogtreecommitdiff
path: root/jtlib/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'jtlib/app.py')
-rw-r--r--jtlib/app.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/jtlib/app.py b/jtlib/app.py
index 4b0c54e..6e33646 100644
--- a/jtlib/app.py
+++ b/jtlib/app.py
@@ -18,6 +18,8 @@ import cliapp
import os
import time
+import jinja2
+
import jtlib
@@ -106,3 +108,8 @@ class JournalTool(cliapp.Application):
if os.path.exists(filename):
with open(filename) as f:
return f.read()
+
+ def render_template(self, basename, vars):
+ text = self.read_template(basename)
+ template = jinja2.Template(text)
+ return template.render(**vars)