summaryrefslogtreecommitdiff
path: root/jtlib/app.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2015-10-03 10:34:06 +0300
committerLars Wirzenius <liw@liw.fi>2015-10-03 10:34:06 +0300
commit6b00e6cc829602cec7e6b6b73f94febd28bfa9a3 (patch)
treee5a3eaa479c6092fffa0e2367f14e5318a463572 /jtlib/app.py
parente8d1f422888d1ea4d703b446cf732331d0fff116 (diff)
downloadjt-6b00e6cc829602cec7e6b6b73f94febd28bfa9a3.tar.gz
Move template texts into files
Diffstat (limited to 'jtlib/app.py')
-rw-r--r--jtlib/app.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/jtlib/app.py b/jtlib/app.py
index a560c26..8e0303a 100644
--- a/jtlib/app.py
+++ b/jtlib/app.py
@@ -93,3 +93,8 @@ class JournalTool(cliapp.Application):
return args[0], pathname
elif len(args) > 1:
raise cliapp.AppException('Must give at most one draft number')
+
+ def read_template(self, basename):
+ filename = os.path.join(self.app_directory(), 'templates', basename)
+ with open(filename) as f:
+ return f.read()