Fix typo in on_import configuration option

This commit is contained in:
Marty Oehme 2022-12-22 22:48:47 +01:00
parent 91525827b8
commit 4281dba9c2
Signed by: Marty
GPG key ID: 73BA40D5AFAF49C9

View file

@ -39,7 +39,7 @@ class ExtractPlugin(PapersPlugin):
# e.g. `> [{page}] {annotation}`
# or `:: {annotation} :: {page} ::`
# and so on
self.onimport = conf["plugins"].get("extract", {}).get("onimport", False)
self.on_import = conf["plugins"].get("extract", {}).get("on_import", False)
self.minimum_similarity = float(conf["plugins"].get("extract", {}).get("minimum_similarity", 0.75))
def update_parser(self, subparsers, conf):
@ -226,7 +226,7 @@ class ExtractPlugin(PapersPlugin):
def modify_event(event):
if ExtractPlugin.is_loaded():
plg = ExtractPlugin.get_instance()
if plg.onimport:
if plg.on_import:
all_annotations = plg.extract([event.citekey])
if all_annotations[0][1]:
plg._to_notes(all_annotations, plg.note_extension)