diff options
Diffstat (limited to 'jtlib/app.py')
-rw-r--r-- | jtlib/app.py | 5 |
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() |