Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zotero-cli attachment --key ABC #95

Open
bjohas opened this issue Apr 12, 2020 · 2 comments
Open

zotero-cli attachment --key ABC #95

bjohas opened this issue Apr 12, 2020 · 2 comments
Labels
bug Something isn't working @retorquere

Comments

@bjohas
Copy link

bjohas commented Apr 12, 2020

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.
@bjohas bjohas added the bug Something isn't working label Apr 13, 2020
@bjohas bjohas changed the title zotero-cli item --key ABC --get-attachments zotero-cli attachment --key ABC Apr 13, 2020
@retorquere
Copy link

How do you get the attachment key?

@bjohas
Copy link
Author

bjohas commented Apr 14, 2020

I'm not sure what you mean? I got the attachment key like this:

zotero-cli item --key XAXNF68P --children

The children then show keys, which I used. Am I misunderstanding?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working @retorquere
Projects
None yet
Development

No branches or pull requests

2 participants