Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: update preprint #2

Open
he-hai opened this issue Jan 11, 2024 · 2 comments
Open

Feature request: update preprint #2

he-hai opened this issue Jan 11, 2024 · 2 comments

Comments

@he-hai
Copy link

he-hai commented Jan 11, 2024

Hi, I was wondering if it is possible to have a feature of updating preprint metadata, especially to the journal published one. Many thanks.

When published in a journal, some severs, for example BioRxiv (e.g. https://www.biorxiv.org/content/10.1101/2022.06.09.495438v1), update with a DOI of the published version. Could it possible to use this for the updating the metadata?

When I manually change the DOI of the entry, I still need to change the Item type from preprint to Journal Article to be able to update.

Reading from Zotero forums, it seems also be interesting to update the versions of the preprint for some research fields.

Thanks.

@RoadToDream
Copy link
Owner

Hi, it's definitely possible to implement this feature as both biorxiv and arxiv provide api access to their database. It can be a great addon to the code, but unfortunately i currently don't have much time to do so. PRs are welcome!
May add myself when not too busy.

@yezaijun
Copy link

Hi! I have just successfully achieved arXiv support by following these steps. You can try it yourself.

Steps to Implement the Required Changes

  1. Provide the Original File to ChatGPT

    • Make the original file, such as src/chrome/content/journal.js, available to ChatGPT for reference.
  2. Avoid Creating a New Object for the Target API

    • Ensure that you do not introduce a new object to support the required API.
  3. Create a New JavaScript File

    • Add a new JavaScript file in the src/chrome/content/ directory.
  4. Modify the Following Files:

    • src/bootstrap.js
      Add the following line to load your new script:

      Services.scriptloader.loadSubScript(rootURI + 'chrome/content/yourjs.js');
    • src/chrome/content/overlay.xul
      Include the new JavaScript file in the XUL overlay:

      <script src="yourjs.js"/>
    • src/chrome/content/zotmeta.js
      Adjust the judgment logic in the updateSelectedItemsMetadata function to incorporate the changes introduced in your new script.

Useful Link (in Chinese) https://zotero-chinese.com/plugin-dev-guide/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants