diff options
Diffstat (limited to 'jtlib/plugins')
-rw-r--r-- | jtlib/plugins/new_person_plugin.py | 7 | ||||
-rw-r--r-- | jtlib/plugins/new_plugin.py | 10 | ||||
-rw-r--r-- | jtlib/plugins/new_topic_plugin.py | 9 |
3 files changed, 3 insertions, 23 deletions
diff --git a/jtlib/plugins/new_person_plugin.py b/jtlib/plugins/new_person_plugin.py index 43db172..050e97a 100644 --- a/jtlib/plugins/new_person_plugin.py +++ b/jtlib/plugins/new_person_plugin.py @@ -53,12 +53,7 @@ class NewPersonCommand(cliapp.Plugin): if os.path.exists(pathname): raise cliapp.AppException('File %s already exists' % pathname) - template = '''\ -[[!meta title="%(name)s"]] - -[[!inline archive=yes pages="link(.)"]] -''' - + template = self.app.read_template('new_person.tmpl') with open(pathname, 'w') as f: f.write( template % diff --git a/jtlib/plugins/new_plugin.py b/jtlib/plugins/new_plugin.py index b10b4a1..8134fa5 100644 --- a/jtlib/plugins/new_plugin.py +++ b/jtlib/plugins/new_plugin.py @@ -25,14 +25,6 @@ import jtlib class NewCommand(cliapp.Plugin): - _default_new_note_template = '''\ -[[!meta title="%(title)s"]] -[[!tag ]] -[[!meta date="%(date)s"]] -%(topiclink)s - -''' - def enable(self): self.app.add_subcommand('new', self.run, arg_synopsis='TITLE') @@ -79,4 +71,4 @@ class NewCommand(cliapp.Plugin): with open(filename) as f: return f.read() else: - return self._default_new_note_template + return self.app.read_template('new-note.tmpl') diff --git a/jtlib/plugins/new_topic_plugin.py b/jtlib/plugins/new_topic_plugin.py index 09fcbd5..4f44f2b 100644 --- a/jtlib/plugins/new_topic_plugin.py +++ b/jtlib/plugins/new_topic_plugin.py @@ -49,13 +49,6 @@ class NewTopicCommand(cliapp.Plugin): if not os.path.exists(dirname): os.makedirs(dirname) - template = '''\ -[[!meta title="%(title)s"]] - - - -[[!inline pages="link(.)" archive=yes reverse=yes trail=yes]] -''' - + template = self.app.read_template('new_topic.tmpl') with open(pathname, 'w') as f: f.write(template % {'title': title}) |