====== Zotero Plugin ====== ---- plugin ---- description: Allows you to quote your literature references saved in Zotero with a LaTeX-like syntax author : Stefan Macke email : me@stefan-macke.de type : syntax lastupdate : 2013-03-02 compatible : Angua depends : conflicts : similar : tags : quotes, zotero, references, latex downloadurl: https://github.com/StefanMacke/dokuwiki-zotero-plugin/zipball/master bugtracker : https://github.com/StefanMacke/dokuwiki-zotero-plugin/issues sourcerepo : https://github.com/StefanMacke/dokuwiki-zotero-plugin donationurl: screenshot_img: ---- ===== Download and Installation ===== Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. ==== Configuration ==== - Enter your Zotero username, key, and user ID into config.ini. - Create a new wiki page for the cached Zotero entries and enter its name into config.ini (e.g. zotero:sources). - Enter your Zotero entries into the cache file (the newly created wiki page or ZoteroEntries.txt if you don't want to use the wiki page). This can be automated by calling importAllEntries.php from the command line. - If you cite a source that is not already in the cache, the plugin will automatically download your latest Zotero entries and add them to the cache. For this to work you have to set autoupdating in config.ini to 1. ===== Screenshots ===== See [[http://wiki.stefan-macke.com/doku.php/se:programmierung|my wiki]] for a live example of the plugin's functionality. * The plugin's syntax:\\ {{http://blog.stefan-macke.com/wp-content/uploads/2010/06/ZoteroPlugin02.jpg|The plugin's syntax}} * The plugin's output:\\ {{http://blog.stefan-macke.com/wp-content/uploads/2010/06/ZoteroPlugin01.jpg|The plugin's output}} * The plugin's initial import of Zotero sources:\\ {{http://blog.stefan-macke.com/wp-content/uploads/2010/06/ZoteroPlugin03.jpg|The plugin's initial import of Zotero sources}} * Configuring a short name as a cite key for a source in Zotero:\\ {{http://blog.stefan-macke.com/wp-content/uploads/2010/06/ZoteroPlugin04.jpg|Configuring a short name as a cite key for a source in Zotero}} ===== Syntax and Usage ===== You can cite your Zotero sources by using the syntax known from LaTeX: \cite[p.123]{ShortName123} ==== Prerequisites ==== * You need to have your Zotero database synchronized with the Zotero server. * Every source you would like to cite needs a "short name" in the Zotero database. * You need to make your Zotero reference list public and configure a "key" for access to the RSS feed. ===== History ===== * 2013-03-02: Notes and attachments are now ignored. * 2012-03-04: Complete rewrite. * The plugin now uses [[http://www.zotero.org/support/dev/server_api|Zotero's API]] instead of parsing the website. * Problems with Zotero entries are now displayed in a separate column on the wiki page containing the sources. * 2010-06-02: Release of initial version ===== Discussion ===== * Is it possible to add a functionnality to list all references cited at the end of the document, like with the latex command: \nocite{*} or \bibliography{zotero_biblio} ? * I am obtaining the same error of your implementation here: http://wiki.stefan-macke.com/doku.php/buecher:hectorsreise ''ERROR: No ID found in string http://zotero.org/stefanmacke/items/QVKUKNIB''. I really would appreciate any advice about it, since I am not being able to run zotero plugin properly * Might it be that you did not define a "short title" for this item? * How to refer to a group library instead of that of an individual? group libraries have as well RSS feeds so it shoudn't be too difficult but I can't hack your code properly. --- [[berteh@hotmail.com|berteh]], April 2011 * I'd really like this plugin if it could access a local Zotero database. * Thanks for this plugin -- it looks promising! Unfortunately, I couldn't get it working (using the 2012-03-04 release). First I tried uploading the plugin files to my server and following the instructions. When I ran %%importAllEntries.php%% it seemed to grab the data from Zotero correctly but finished with the following error message:Catchable fatal error: Object of class stdClass could not be converted to string in /Volumes/Shared/www/rikblok/wiki/lib/plugins/zotero/FeedZoteroRepository.php on line 95Then I couldn't load any pages: I had to delete the plugin and reset the cache to get it working again. Thinking it might be a file permission issue, I also tried using the plugin manager to install but I got stuck because I didn't have permission to edit %%config.ini%%. Any suggestions/ideas? Thanks. --- [[user>rikblok|Rik Blok]] //2012/03/06 07:58// * --> Open FeedZoteroRepository.php and modify as belows if (count($data->creators) == 0) { //throw new ZoteroParserException("Author could not be found in data " . $data); $authorName = "AuthorNotSpecified"; return $authorName; } * Thanks, that helped. The other thing I had to do was run ''importAllEntries.php'' from my browser. Due to a file permission issue I got the following error when running from the command-line: Warning: file_put_contents(/Volumes/Shared/www/rikblok/wiki/data/pages/zotero/so urces.txt): failed to open stream: Permission denied in /Volumes/Shared/www/rikb lok/wiki/lib/plugins/zotero/TextZoteroRepository.php on line 98 But browsing to [[http://myserver/wiki/lib/plugins/zotero/importAllEntries.php]] worked. Thanks again! --- [[user>rikblok|Rik Blok]] //2012/03/25 04:24// ==== User Accounts Only ==== * Not working on Weatherwax 'importAllEntries.php PHP Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0 PHP Warning: set_time_limit(): Cannot set time limit in safe mode ..importAllEntries.php on line 4 Downloading https://api.zotero.org/users/../items?content=json&itemType=-attachment&key=... 0 entries imported into file' * UPDATE: Does **not** work on //Zotero// **Group** libraries. All entries must be in //Zotero// **Users** Library --[[user>MatWitts|Mat Witts]] ==== Patch for New API ==== * I might be doing things wrong but the URL back to Zotero reads something like https://www.zotero.org/stefanmacke/items/BIKPH5Z3 and at least for my library it should read https://www.zotero.org/stefanmacke/items/itemKey/BIKPH5Z3 (note the extra "itemKey"). What should I change? * Edit file /lib/plugins/zotero/ZoteroConfig.php around about **line eight**. Modify const ENTRY_URL = "http://www.zotero.org/USERNAME/items/ENTRYID"; to const ENTRY_URL = "https://www.zotero.org/USERNAME/items/itemKey/ENTRYID"; --[[user>MatWitts|Mat Witts]] ==== Title Format Causes Error ==== You need to ensure all your reference titles do **not** contain the pipe symbol (|) to avoid extra columns being generated on the cache page and causing the parser to break --[[user>MatWitts|Mat Witts]]