Added git functionality for notes
This commit is contained in:
parent
4a61f91cb5
commit
4862860a7e
@ -2,6 +2,7 @@ from .. import repo
|
|||||||
from ..uis import get_ui
|
from ..uis import get_ui
|
||||||
from ..utils import resolve_citekey
|
from ..utils import resolve_citekey
|
||||||
from ..completion import CiteKeyCompletion
|
from ..completion import CiteKeyCompletion
|
||||||
|
from ..events import NoteEvent
|
||||||
|
|
||||||
|
|
||||||
def parser(subparsers, conf):
|
def parser(subparsers, conf):
|
||||||
@ -19,4 +20,5 @@ def command(conf, args):
|
|||||||
citekey = resolve_citekey(rp, args.citekey, ui=ui, exit_on_fail=True)
|
citekey = resolve_citekey(rp, args.citekey, ui=ui, exit_on_fail=True)
|
||||||
notepath = rp.databroker.real_notepath(citekey, rp.conf['main']['note_extension'])
|
notepath = rp.databroker.real_notepath(citekey, rp.conf['main']['note_extension'])
|
||||||
ui.edit_file(notepath, temporary=False)
|
ui.edit_file(notepath, temporary=False)
|
||||||
|
NoteEvent(citekey).send()
|
||||||
rp.close()
|
rp.close()
|
||||||
|
@ -67,3 +67,6 @@ class RenameEvent(PaperEvent):
|
|||||||
@property
|
@property
|
||||||
def description(self):
|
def description(self):
|
||||||
return self._format.format(citekey=self.citekey, old_citekey=self.old_citekey)
|
return self._format.format(citekey=self.citekey, old_citekey=self.old_citekey)
|
||||||
|
|
||||||
|
class NoteEvent(PaperEvent):
|
||||||
|
_format = "Modifies note {citekey}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user