Skip to content

v0.9.2

Choose a tag to compare

@oldantique oldantique released this 10 Oct 02:38
· 21 commits to main since this release

fetch now accepts an attachment's own key, and a fetch that saves nothing tells you why.

  • Attachment keys work. zotkit fetch --key <attachment key> used to print downloaded 0 file(s) and exit 0, because an attachment has no file-bearing children. It now downloads that attachment's file and notes the parent on stderr: note: K is an attachment of P; fetching this attachment's file. Agents often pick up attachment keys from WebDAV filenames, attach output, or Zotero links. Detection adds no request on the normal path: the item itself is only looked up when its children carry no files.
  • Nothing saved means exit 1, with a reason. The possible reasons are has no stored file attachments, N file attachment(s) found, none could be downloaded, and not found (404). The 404 line is sanitized like show's, so it never prints the library ID. --title/--collection with no matching items is an error too. Scripts that treated downloaded 0 file(s) + exit 0 as success should check the exit code.
  • The Python API's Zot.fetch() is unchanged. Zot.fetch_detail() and Zot.file_attachments() expose the extra detail.

174 offline tests; CI (ubuntu + windows × 3.11/3.13) gates the publish.