Last active
September 15, 2024 12:16
-
-
Save masnick/4da1157ac68c5fe04c1a to your computer and use it in GitHub Desktop.
Zotero export translator for getting zotero:// link and article information
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"translatorID":"BA3A62C2-E8B8-11E3-8533-A664DDBCE621", | |
"translatorType":2, | |
"label":"Modified ZotSelect Link", | |
"creator":"Max Masnick, based on work of Scott Campbell, Avram Lyon, and Nathan Schneider", | |
"target":"html", | |
"minVersion":"2.0", | |
"maxVersion":"", | |
"priority":200, | |
"inRepository":false, | |
"displayOptions":{"exportCharset":"UTF-8"}, | |
"lastUpdated":"2014-05-31 03:03:00" | |
} | |
function doExport() { | |
var item; | |
while(item = Zotero.nextItem()) { | |
Zotero.write('zotero://select/items/'); | |
var library_id = item.libraryID ? item.libraryID : 0; | |
var titleS = (item.title) ? item.title : "(no title)"; | |
var pubTitleS = (item.publicationTitle) ? item.publicationTitle : ""; | |
if (!pubTitleS && item.type) | |
pubTitleS = '['+item.type+']'; | |
Zotero.write(library_id+'_'+item.key+' - '+titleS+' - '+((item.conferenceName) ? item.conferenceName : pubTitleS)); | |
var creatorsS = item.creators[0].lastName; | |
if (item.creators.length>2) | |
creatorsS += " et al."; | |
else if (item.creators.length==2) | |
creatorsS += " & " + item.creators[1].lastName; | |
var date = Zotero.Utilities.strToDate(item.date); | |
var dateS = (date.year) ? date.year : item.date; | |
Zotero.write(' (' + creatorsS + ' ' + dateS + ")\n\n"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
not works, can select the export format but can not copy the link