Hi all,
I've been working on a pre-flight duplicate detection plugin, using some of the suggestions made in this thread. Currently, my approach is to redefine the Zotero.Translate.Sandbox.Base._itemDone method and call a function that checks for duplicates and prompts the user if a potential match is found, just before the itemSaving handler is called. I suspect such redefinition is frowned upon in plugins, but I couldn't figure out how to add a default itemSaving handler, or where else to insert the check.
The code, such as it is, is up on github: https://github.com/chrisjr/zotero-prevent-duplicates
Please let me know if you have any suggestions, either regarding the matching method or the way it hooks into the rest of Zotero.
Thanks,
Chris
--To view this discussion on the web visit https://groups.google.com/d/msg/zotero-dev/-/8_fy2tjlPSIJ.
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To post to this group, send email to zoter...@googlegroups.com.
To unsubscribe from this group, send email to zotero-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/zotero-dev?hl=en.
>> zotero-dev+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/zotero-dev?hl=en.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "zotero-dev" group.
> To post to this group, send email to zoter...@googlegroups.com.
> To unsubscribe from this group, send email to
> zotero-dev+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To post to this group, send email to zoter...@googlegroups.com.
To unsubscribe from this group, send email to zotero-dev+...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/zotero-dev/-/8mqWpMMk9m8J.
Chris!
This is great! I had just posted on Zotero.org about wanting this and some directed me here.
I have version 0.0.1 installed. It seems a little quirky...sometimes works, sometimes doesn't etc. But I don't want to troubleshoot it if there is a more current version. Is there?
Thanks!
arggem
To unsubscribe from this group, send email to zotero-dev+unsubscribe@googlegroups.com.
To unsubscribe from this group, send email to zotero-dev+unsubscribe@googlegroups.com.
To unsubscribe from this group, send email to zotero-dev+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/zotero-dev/-/FaeybGZHABUJ.
--Chris
To unsubscribe from this group, send email to zotero-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/zotero-dev?hl=en.
On Saturday, July 7, 2012 6:05:13 PM UTC-4, Chris Johnson-Roberson wrote:
Sorry about that: it was a foolish error on my part, it should be fixed now.Simon, thanks for the specification, it's nice and clear, and conforms better to Zotero's design. I'll fork the Zotero repository and get started in earnest in a few days.
On Sat, Jul 7, 2012 at 5:29 PM, adamsmith <bst...@gmx.de> wrote:
Chris,
I've been using this for the last week or so and it works terrific, not-noticeable except for the couple of occasions where I actually wanted to safe a duplicate.
I haven't update for a while, but at least with the version I have, the add-on leads Zotero to fail for pages w/o a creator such as:
http://www.nytimes.com/2010/05/26/dining/26pretzelrex1.html
with
[JavaScript Error: "titleLastNameResults is undefined" {file: "chrome://preventduplicates/content/preventDuplicates.js" line: 116}]
On Thursday, June 28, 2012 4:33:54 PM UTC-6, Chris Johnson-Roberson wrote:To view this discussion on the web visit https://groups.google.com/d/msg/zotero-dev/-/8mqWpMMk9m8J.Hi all,--
I've been working on a pre-flight duplicate detection plugin, using some of the suggestions made in this thread. Currently, my approach is to redefine the Zotero.Translate.Sandbox.Base._itemDone method and call a function that checks for duplicates and prompts the user if a potential match is found, just before the itemSaving handler is called. I suspect such redefinition is frowned upon in plugins, but I couldn't figure out how to add a default itemSaving handler, or where else to insert the check.
The code, such as it is, is up on github: https://github.com/chrisjr/zotero-prevent-duplicates
Please let me know if you have any suggestions, either regarding the matching method or the way it hooks into the rest of Zotero.
Thanks,
Chris
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group, send email to zotero-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/zotero-dev?hl=en.
On Saturday, July 7, 2012 6:05:13 PM UTC-4, Chris Johnson-Roberson wrote:
Sorry about that: it was a foolish error on my part, it should be fixed now.Simon, thanks for the specification, it's nice and clear, and conforms better to Zotero's design. I'll fork the Zotero repository and get started in earnest in a few days.
On Sat, Jul 7, 2012 at 5:29 PM, adamsmith <bst...@gmx.de> wrote:
Chris,
I've been using this for the last week or so and it works terrific, not-noticeable except for the couple of occasions where I actually wanted to safe a duplicate.
I haven't update for a while, but at least with the version I have, the add-on leads Zotero to fail for pages w/o a creator such as:
http://www.nytimes.com/2010/05/26/dining/26pretzelrex1.html
with
[JavaScript Error: "titleLastNameResults is undefined" {file: "chrome://preventduplicates/content/preventDuplicates.js" line: 116}]
On Thursday, June 28, 2012 4:33:54 PM UTC-6, Chris Johnson-Roberson wrote:To view this discussion on the web visit https://groups.google.com/d/msg/zotero-dev/-/8mqWpMMk9m8J.Hi all,--
I've been working on a pre-flight duplicate detection plugin, using some of the suggestions made in this thread. Currently, my approach is to redefine the Zotero.Translate.Sandbox.Base._itemDone method and call a function that checks for duplicates and prompts the user if a potential match is found, just before the itemSaving handler is called. I suspect such redefinition is frowned upon in plugins, but I couldn't figure out how to add a default itemSaving handler, or where else to insert the check.
The code, such as it is, is up on github: https://github.com/chrisjr/zotero-prevent-duplicates
Please let me know if you have any suggestions, either regarding the matching method or the way it hooks into the rest of Zotero.
Thanks,
Chris
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group, send email to zotero-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/zotero-dev?hl=en.
--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.