diff --git a/pubs/commands/note_cmd.py b/pubs/commands/note_cmd.py index 8def803..367e799 100644 --- a/pubs/commands/note_cmd.py +++ b/pubs/commands/note_cmd.py @@ -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() diff --git a/pubs/events.py b/pubs/events.py index e498954..df8fec4 100644 --- a/pubs/events.py +++ b/pubs/events.py @@ -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}"