Open
Description
One method to solve the issue of getting the itemkey for linked attachments is to read the SQLite database ~/Zotero/zotero.sqlite
, iterate through each attachment, then find the corresponding itemkey. I've peeped into the database and saw that there are two tables that would be useful: itemAttachments and items.
One can query the itemID (or perhaps parentItemID) of each attachment in the itemAttachments table then lookup the corresponding key in the items table. I've attached photos of example entries of each table.
Note that the absolute path of an attachment can be found if the attachment is linked. We can also filter attachments by whether the path column starts with storage:
.
Activity