export with local file link
I would like to sometimes drag a file or item to Onenote, where it will create a link to the file in the Zotero storage folder. And if possible, keep the web link too. It seems that right now the only export option that contains URI data is .CSV, which is to messy to put as is in Onenote. How should I go at it? Request? Create a new CSL thing?
See here:
https://zoteromusings.wordpress.com/2013/04/23/zotero-item-uris-from-client/
function doExport() {
var item;
while(item = Zotero.nextItem()) {
Zotero.write('"'+"file:");
Zotero.write(item.attachments[0].localPath+'"'+". ");
Zotero.write(item.creators[0].lastName+". "+item.date+". "+item["title"]+". "+"FIN"+". ");
}
}
But in cases where there is more than one attachment, it only picks the first. How can I make it go through all of them, but still be able to prefix each path with '"file:' and suffix with '" ' , plus a linebreak ?
I guess it should involve what's done in CSV.js with (paths.join(....)) , or maybe attachmentString as in https://gist.github.com/bmschmidt/6891991#file-biblatex-chicago-js-L593 but can't figure out how.
for (var i = 0; i<item.attachments.length; i++) {
//do something
}