Getting an option to replace old extracted annotations notes with new ones from multiple items
Hey there,
I am interested in having an option to extract the annotations from a set of selected items at once, while replacing the old extracted annotations notes.
An initial implementation of the feature can be found in
https://github.com/zotero/zotero/blob/master/chrome/content/zotero/zoteroPane.js#L5058-L5100
But, I can't get the note replacement part to work. Could you please advise on how to get a list of the extracted-annotations notes and delete them?
I tried the code snippet as a first step, but apparently something isn't right there:
```
for (let note in Zotero.Items.get(item.getNotes())){
Zotero.debug(note);
}
```
I would really appreciate it if you can help me figure this out.
Thanks!
UPDATE: I managed to get it done! \O/ \O/
Thanks!
I am interested in having an option to extract the annotations from a set of selected items at once, while replacing the old extracted annotations notes.
An initial implementation of the feature can be found in
https://github.com/zotero/zotero/blob/master/chrome/content/zotero/zoteroPane.js#L5058-L5100
But, I can't get the note replacement part to work. Could you please advise on how to get a list of the extracted-annotations notes and delete them?
I tried the code snippet as a first step, but apparently something isn't right there:
```
for (let note in Zotero.Items.get(item.getNotes())){
Zotero.debug(note);
}
```
I would really appreciate it if you can help me figure this out.
Thanks!
UPDATE: I managed to get it done! \O/ \O/
Thanks!
But, apparently, this option isn't something that would be part of Zotero, so I am happy to maintain my own fork, but I can't figure out a way of replacing/deleting the notes.
Any pointers would be really helpful.