Export the attachment file path into a translator.

Hi

I'm trying to do an Org-mode translator. Is there a way to get the path of an attachment in a translator ?

for each(var attachment in item.attachments) {
Zotero.write(attachment.title)
}

I have this, but title only contains the name of the file.

Where is the path ?

I tried to look at url, using Zotero.Items (they don't seem to be available in translators).


Thanks for your help !
  • This works (under Linux Indeed):

    for each(var attachment in item.attachments) {
    Zotero.write(attachment.key+"/"+attachment.title)
    }

    But I need to find a way to get also the storage directory from the translator
  • attachment.title (even with an added file extension) is not necessarily the same as the filename. Have you tried item.path?
  • Attachment ->
    itemID itemType dateAdded dateModified libraryID key title accessDate url note sourceItemKey tags related uniqueFields mimeType charset
    Item ->
    itemID itemType dateAdded dateModified libraryID key title abstractNote publicationTitle volume issue pages date series seriesTitle seriesText journalAbbreviation language DOI ISSN shortTitle url accessDate archive archiveLocation libraryCatalog callNumber rights extra creators notes attachments tags related uniqueFields


    Item and attachement didn't have any path attribute.
Sign In or Register to comment.