Skip to content

zotero-cli attachment --key ABC #95

@bjohas

Description

@bjohas

Is it possible to retrieve attachments via zotero-cli?

The task is to implement a way of retrieving attachments, e.g.

zotero-cli attachment --key ABC

Also see #63

The script already has this, but I cannot get it to work.
For this item zotero://select/groups/2317526/items/XAXNF68P, I run

zotero-cli item --key XAXNF68P 
zotero-cli item --key XAXNF68P --children

which gives me B4ARQZ7S as child.

However, neither of these work:

zotero-cli attachment --key XAXNF68P --save abc.pdf
zotero-cli attachment --key B4ARQZ7S --save abc.pdf

There are these issues:

  • The above should work :)
  • It would be good if both worked (Help says: "Retrieve/save attachments for the item specified with key', which is ambiguous as to whether it's the item or attachment)
  • It's awkward to have to specify the filename.
    -- Where the key is an attachment, maybe save should become --saveas, but by default the existing filenames are used?
    -- Where the key is an item, all attachments should be saved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions