diff options
-rwxr-xr-x | scripts/journal-note | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/journal-note b/scripts/journal-note index 5a41e70..3cd7b78 100755 --- a/scripts/journal-note +++ b/scripts/journal-note @@ -55,6 +55,7 @@ class App(object): 'new': self.new_entry, 'list': self.list_entries, 'edit': self.edit_entry, + 'remove': self.remove_entry, 'finish': self.finish_entry, } @@ -114,6 +115,12 @@ class App(object): raise AppException('draft %s does not exist' % args[0]) self.gedit_file(pathname) + def remove_entry(self, args, opts): + if not args: + raise AppException('Usage: journal-note remove ID') + pathname = os.path.join(self.drafts(opts), args[0] + '.mdwn') + os.remove(pathname) + def finish_entry(self, args, opts): if not args: raise AppException('Usage: journal-note finish ID') |