AllanChain / zotero-arxiv-workflow

Helper for managing arXiv papers in Zotero
GNU Affero General Public License v3.0
92 stars 2 forks source link

Cannot update arXiv PDF version #6

Closed 0x1orz closed 2 months ago

0x1orz commented 2 months ago

to update the arXiv v2 paper to the v3, that does not work. It makes sense that to force update or replace through downloading the latest version.

Originally posted by @0x1orz in https://github.com/AllanChain/zotero-arxiv-workflow/issues/4#issuecomment-2285728231

AllanChain commented 2 months ago

Can you provide detailed steps to reproduce? This feature assumes that you didn't save a specific version. Check your URL field. It should be https://arxiv.org/abs/2310.03842 instead of https://arxiv.org/abs/2310.03842v2, otherwise the plugin will refuse to update.

To test this feature, you should:

  1. Download the PDF from https://arxiv.org/pdf/2310.03842v2 and add it to Zotero. Wait Zotero to find the metadata. This will simulate you added https://arxiv.org/pdf/2310.03842 when the latest version is v2
  2. Click "Update arXiv paper" to find updates.
0x1orz commented 2 months ago

Imported into zotero by Microsoft Edeg zotero plugin. then got the metadata, as follow:

image

Now click the Update arxiv paper, then display 'Already up-to-data'. but the paper still is v2, while the latest version is v3. shasum -a 256 2310.03842v2.pdf 30c63145574d49f8ed92c4771247a49073244b017a7a3c3395856ce3bdbd163f 2310.03842v2.pdf shasum -a 256 2310.03842v3.pdf 3db370d2f71ba4dfa1274528fd67bb3558cd73bc2465aa2466a2c33e0366d085 2310.03842v3.pdf

I have exported the paper item to reproduce. You can unzip the zip file and click the rdf-format file to import zotero 7 beta.

AllanChain commented 2 months ago

Sorry, I didn't look into the example arXiv paper in detail. The paper 2310.03842 doesn't contain the arXiv ID, and thus it is currently impossible to determine the version.

An ordinary arXiv paper looks like this. Note the arXiv ID on the left. Screenshot of attention is all you need

The message is indeed misleading: the plugin failed to determine the current version and thus is unable to tell whether the online version is newer or not. I'll first improve the message.

Some more questions:

0x1orz commented 2 months ago

Yeach. The paper is a special and occasional case.

I checked the hash codes just to discriminate between the offline versions. 'Data Added' of the metadata may be helpful to determine whether it is out-of-data.
In common how to deal with an out-of-data and annotated PDF and a latest one, should be needed to manually manager, which is a hard question. Maybe a diff tool for PDF is another one develop requirement.

Anyway, your work is nice and helpful. Thanks.

github-actions[bot] commented 2 months ago

:rocket: This ticket has been resolved in v0.2.2. See Release 0.2.2 for release notes.