I spent a half day recently learning the necessary XUL and Javascript to add an “import from clipboard” function to Zotero. This is a big improvement on my my old process for adding entries with BibTex embedded in a web page. Previously I had to:
- Copy the BibTex to the clipboard
- Paste it into a temporary file
- Choose the import from file function
This got frustrating very quickly. Now I can just:
- Copy the BibTex to the clipboard
- Choose the import from clipboard function
Apparently there has been talk of having Zotero automatically detect the presence of BibTex on a web page and offer to import it. That would be great.
For the mean time, here is my patch. The diff is against the current 1.0 SVN version, but the last I checked it applied okay against the trunk too. I’ve only tested with BibTex on Mac and Linux, but, possible encoding issues aside, I expect it will work with the other supported import formats.
Zotero’s dev/svn and trac access page explains how to switch to an SVN version from a packaged version.
Disclaimer: I’m not associated with the Zotero project and this is not release quality code. Your mileage may vary.