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

Frontiers Journals: Improve metadata and efficiency; save supplements; multiple-saving from search page #3145

Merged

Conversation

zoe-translates
Copy link
Collaborator

@zoe-translates zoe-translates commented Sep 20, 2023

The translator for Frontiers journals has been updated for metadata accuracy, better detection of and saving from the search page, and the possibility to save supplementary files.

  • For metadata, use Embedded Metadata (the richest and most accurate of Frontiers sources) on the document itself if the document is already available or requested, and use BibTeX if the document is not necessary. The former approach uses RIS but the RIS file generated by Frontiers misses some fields such as the DOI. Fixes Frontiners Journal Import misses most metadata #3135.
  • Multiple-saving now works on the search page and article-listing by journal, too. For the research-topic page, multiple-saving is improved by updating selectors.
  • It is possible now to save supplementary files as attachments if configured.
  • Improvements to inner workings:
    • Async functions for network requests, instead of Z.doGet()
    • minVersion bumped
    • More test cases for the new features and bugfixes
    • Don't request the full document if unnecessary. When possible, request the small text files (BibTeX, and JSON for saving supplements) for their lower overhead. However, when the document is already available, it is used as the metadata source.

Edit: Original content of this first-post in the PR was identical to the commit message of cdeaa93

- Use Embedded Metadata when the document is available, which produces
  accurate metadata. This avoids any further network requests if
  supplementary files are not requested.
- Use BibTeX when the document itself is not necessary (for example,
  from a search result "multiple"). BibTeX has much smaller overhead
  than requesting the document itself, and provides more accurate
  metadata than the RIS
- Make it possible to save supplement files
- Adjust the selectors for article listing (multiple) results
The research-topic page lists articles by Ajax calls. Before the article
lists are populated, detection of "multiple" may fail. This is IRL not
much a concern but it causes the test case to fail spuriously with
"detection error".

This is somewhat helped by deferring the test.
Multiple-saving now works on the search page in addition to the article
listings by journal or topic.

This is done by getting the numerical articleID from the search page,
from which the article URL can be constructed (as /articles/articleID).
This URL will be redirected to the proper, DOI-based URL.
@zoe-translates zoe-translates marked this pull request as ready for review September 20, 2023 10:00
@zoe-translates zoe-translates changed the title Frontiers Journals: Improve metadata and efficiency; save supplements Frontiers Journals: Improve metadata and efficiency; save supplements; multiple-saving from search page Sep 20, 2023
- Add comment about overall approach and URL format
- Fix some misleading comments
Copy link
Member

@AbeJellinek AbeJellinek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. One comment!

Frontiers.js Outdated Show resolved Hide resolved
Also remove noise in comments arising from botched yank&paste
@alex-ter
Copy link
Contributor

alex-ter commented Mar 3, 2024

This one seems to be ready for merging and could be a quick win to fix a bug. Is there anything else necessary for a merge (e.g., more testing, I could do that)?

@AbeJellinek AbeJellinek merged commit ab50e8c into zotero:master Mar 5, 2024
@AbeJellinek
Copy link
Member

Thanks, yeah, tested and working well!

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

Successfully merging this pull request may close these issues.

Frontiners Journal Import misses most metadata
3 participants