Added git functionality for notes

main
Amlesh Sivanantham (zamlz) 6 years ago
parent 4a61f91cb5
commit 4862860a7e
No known key found for this signature in database
GPG Key ID: 882C395C3B28902C

@ -2,6 +2,7 @@ from .. import repo
from ..uis import get_ui
from ..utils import resolve_citekey
from ..completion import CiteKeyCompletion
from ..events import NoteEvent
def parser(subparsers, conf):
@ -19,4 +20,5 @@ def command(conf, args):
citekey = resolve_citekey(rp, args.citekey, ui=ui, exit_on_fail=True)
notepath = rp.databroker.real_notepath(citekey, rp.conf['main']['note_extension'])
ui.edit_file(notepath, temporary=False)
NoteEvent(citekey).send()
rp.close()

@ -67,3 +67,6 @@ class RenameEvent(PaperEvent):
@property
def description(self):
return self._format.format(citekey=self.citekey, old_citekey=self.old_citekey)
class NoteEvent(PaperEvent):
_format = "Modifies note {citekey}"

Loading…
Cancel
Save