Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Interacts with Zotero libraries via the pyzotero Python client to manage items, collections, tags, attachments, and exports.
88% 100%+12 ptsof test cases passed
Passed 25 of 25 test cases with the skill, and 22 of 25 without it.
3 of 3 safety checks passed
Not used yet
# Get raw binary content of an attachment
raw = zot.file('ATTACHMENTKEY')
with open('paper.pdf', 'wb') as f:
f.write(raw)
# Convenient wrapper: dump file to disk
# Uses stored filename, saves to current directory
zot.dump('ATTACHMENTKEY')
# Dump to a specific path and filename
zot.dump('ATTACHMENTKEY', 'renamed_paper.pdf', '/home/user/papers/')
# Returns the full file path on success
Note: HTML snapshots are dumped as .zip files named with the item key.
# Get child items (attachments, notes) of a parent item
children = zot.children('PARENTKEY')
attachments = [c for c in children if c['data']['itemType'] == 'attachment']
# Get the attachment key
for att in attachments:
key = att['data']['key']
filename = att['data']['filename']
content_type = att['data']['contentType']
link_mode = att['data']['linkMode'] # 'imported_file', 'linked_file', 'imported_url', 'linked_url'
Note: Attachment upload methods are in beta.
Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.