用于在 Zotero 中管理 arXiv 论文的辅助工具
arXiv Workflow for Zotero
This Zotero plugin addresses the pain when you store papers from arXiv and want to update your Zotero entry when they are published.
[!Warning] This plugin is in alpha stage and only supports Zotero 8, 9, and 10!
I strongly recommend you to check the results manually after operations.
Easier workflow with arXiv paper!
This plugin focusing on the following workflow:
The main logic of the merging process is demonstrated by the following plot:
…| Merge arXiv | Prefer PDF |
|---|---|
Download zotero-arxiv-workflow.xpi from the release page. Firefox users need to right-click on the link and use "Save link as" instead of direct downloading it. After downloading, click "Tools" > "Plugins" in Zotero menu and drag the downloaded file into the dialog.
Features can be disabled from the plugin settings, but this will not affect the JavaScript API.
The main logic of merging items is described above. A few points to emphasis:
JavaScript API
async Zotero.arXivWorkflow.api.merge(
preprintItem: Zotero.Item,
publishedItem: Zotero.Item,
suppressWarn = false,
)This function assumes that the first argument is an arXiv version and the second is the published one. Currently, no checks will be performed to ensure this. The function caller is responsible to make sure the type of items is correct.
If suppressWarn is true, no confirmation dialog will popup if the title of two items are different.
Maybe you have merged some items manually before. Or maybe you just want to change the default PDF to open. Either case, you will find the "Prefer PDF" feature useful. To use this feature, select (and only select) the PDF you want to open by default, right click, and select "Prefer this PDF".
Under the hood, this plugin does something "dirty".
That is because Zotero does not have the functionality of setting the default PDF to open. It determines the PDF to open by checking and sorting by:
dateAdded of the PDFOr in SQL:
ORDER BY contentType='application/pdf' DESC, url=? DESC, dateAdded ASCTherefore, to make Zotero perfer a specific PDF, this plugin
dateAdded field to be the oldest among all PDFs of parent itemJavaScript API
async Zotero.arXivWorkflow.api.preferPDF(
selectedAttachment: Zotero.Item
)This function assumes that the argument is a PDF attachment. Currently, no checks will be performed to ensure this. The function caller is responsible to perform the checks.
If you have a preprint item and want to find if it has been published in a journal or updated on the preprint server, you can right click on the preprint item and select "Update arXiv paper". Supported preprint servers include arXiv, bioRxiv, medRxiv, chemRxiv, and PsyArxiv. This will search:
[!Note]
It is not trivial to correctly find the published version. If it fails, you'd better add the journal article item manually and use the merge feature this plugin provides.
If a published version is found, a new item will be created automatically and the published PDF will be downloaded. If you do not have access to the journal PDFs, you can disable downloading PDF from settings, and just update the metadata. After that, the preprint item and the newly created journal item will be merged with the same logic as mentioned earlier.
JavaScript API
async Zotero.arXivWorkflow.api.arXivUpdate(
preprintItem: Zotero.Item
)This function assumes that the argument is an arXiv item, and no checks will be performed to ensure this. The function caller is responsible to perform the checks.
[!Tip]
This feature requires journal subscription.
Say you have an arXiv paper PDF and import it into Zotero. Zotero finds that it has been published and uses the information from the published version. A few days later you might want to download the published version because it might be different from the arXiv one. With original Zotero, you have to open the journal URL, download the PDF, and add it as an attachment. With this plugin, it is as easy as right click and select "Download latest PDF".
JavaScript API
async Zotero.arXivWorkflow.api.updatePDF(
journalItem: Zotero.Item
)This function assumes that the argument is an journal item, and no checks will be performed to ensure this. The function caller is responsible to perform the checks.
Under the hood, this just calls Zotero.Attachments.addAvailableFile and limits the download source to DOI only.
This repo is created from the Zotero plugin template, please follow the quick start guide.
The following resources are also helpful:
暂无开放 Issues,或尚未同步最近议题。