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?
  • A more elegant method would be to copy links to the Zotero items themselves into Onenote. That way, you can access the attachment, but also the Zotero item metadata.

    See here:
    https://zoteromusings.wordpress.com/2013/04/23/zotero-item-uris-from-client/
  • Thanks. I don't use the Zotero storage so Item-uri was not a solution. I did use the plain zotero-select translators to create a buggy little filelink exporter. From the CSV.js I picked the variable:

    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.
  • attachments are an array of objects, so you can cycle through them with
    for (var i = 0; i<item.attachments.length; i++) {
    //do something
    }
Sign In or Register to comment.