From c2b983a1e54595bf13c0ef120f2ba35dc3236a8c Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 22 Dec 2022 18:34:23 +0100 Subject: [PATCH] Add option to edit notes after writing --- extract/extract.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/extract/extract.py b/extract/extract.py index 452eb4d..5b749df 100644 --- a/extract/extract.py +++ b/extract/extract.py @@ -59,6 +59,13 @@ class ExtractPlugin(PapersPlugin): action='store_true', default=None, ) + extract_parser.add_argument( + "-e", + "--edit", + help="open each note in editor for manual editing after extracting annotations to it", + action='store_true', + default=False, + ) extract_parser.set_defaults(func=self.command) def command(self, conf, args): @@ -131,6 +138,8 @@ class ExtractPlugin(PapersPlugin): for annotation in annotations: output+=f"> {annotation}\n\n" write_file(notepath, output, 'w') + if edit is True: + self.ui.edit_file(notepath, temporary=False) # TODO implement NoteEvent(citekey).send()