Open robna opened 4 days ago
The regex that is supposed to find and delete existing entries of previous citation counts is not working reliably (it was also not working for me before my additions). For my purpose it would be better to delete any "Citations: " entry in the Extra-field when new counts are downloaded.
So, changing line 392 of zoterocitationcounts.js to const pattern = /^Citations: /i;
would do. And then it actually removes older entries for me, when getting new ones.
Another idea (useful at least to me) is to implement it so that it adds to the Extra-field as tex.citations: <count> (<source>, <date>)
. By doing so it would ensure that an exported bibtex will carry a field citations = {<count> (<source>, <date>)}
instead of nesting it in the annotations.
I like the plugin and thx @FrLars21 for porting it to Zotero7! This PR changes the way the retrieved citation counts are inserted into the "Extra" field of a record using a
key: value
structure:Citations: <count> (<source>, <date>)
. For me this is preferable as it makes it easier to be read automatically from the resulting bib-file when you export the record.