diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | jtlib/app.py | 6 | ||||
-rw-r--r-- | jtlib/plugins/finish_plugin.py | 7 |
3 files changed, 12 insertions, 2 deletions
@@ -4,6 +4,7 @@ NEWS for jt Version 0.13+git, not yet released ---------------------------------- +* The name of the "notes" subdirectory can now be configured. Version 0.13, released 2016-02-16 ---------------------------------- diff --git a/jtlib/app.py b/jtlib/app.py index ddbb94a..6ea2e74 100644 --- a/jtlib/app.py +++ b/jtlib/app.py @@ -68,6 +68,12 @@ class JournalTool(cliapp.Application): metavar='FILE') self.settings.string( + ['notes-dir'], + 'put new notes in subdirectory DIR', + metavar='DIR', + default='notes') + + self.settings.string( ['pretend-time'], 'pretend that the time is NOW (form: YYYY-MM-DD HH:MM:DD form)', metavar='NOW') diff --git a/jtlib/plugins/finish_plugin.py b/jtlib/plugins/finish_plugin.py index b443a9f..f634231 100644 --- a/jtlib/plugins/finish_plugin.py +++ b/jtlib/plugins/finish_plugin.py @@ -59,8 +59,11 @@ class FinishCommand(cliapp.Plugin): self._push_git() def _published_dir(self): - subdir = time.strftime('notes/%Y/%m/%d', self.app.now_tuple) - return os.path.join(self.app.settings['source'], subdir) + subdir = time.strftime('%Y/%m/%d', self.app.now_tuple) + return os.path.join( + self.app.settings['source'], + self.app.settings['notes-dir'], + subdir) def _summarise_title(self, title): basename = '' |