Add fetcher by id for SWHID
Sofware Heritage foundations provides the option to cite software. One can query their api https://docs.softwareheritage.org/devel/architecture/citation.html#citation-v1-architecture
Start reading at https://devdocs.jabref.org/code-howtos/fetchers.html
/assign-me
⚠️ Issue Already Assigned
Hi @7amo10, this issue is currently assigned to @ZiadAbdElFatah.
[!NOTE] If no progress is made within 8 days, the issue will be automatically unassigned.
Options for contributors
- Wait for availability: The issue may become available if auto-unassigned
- Collaborate: You can ask the assignee if they want help
- Maintainer assistance: A maintainer can add you as co-assignee if appropriate
Hi @Siedlerchr , @ZiadAbdElFatah
As I understand, Software Heritage Identifiers (SWHIDs) provide persistent identification for software source code artifacts. The goal of this issue (as I am expecting) is to enable users to import bibliographic entries directly into JabRef by simply providing an SWHID (or its archive URL), leveraging the Software Heritage citation API to retrieve the citation metadata in BibTeX format which is similar to how JabRef already handles DOIs, ISBNs, and arXiv IDs.
Here is my planned approach to tackle this (This is my point of view and I deduced after reading the links above):
- Identifier Model (
SWHID): • Add a newSWHIDidentifier underorg.jabref.model.entry.identifiersupporting standard SWHID syntax (swh:1:<type>:<hash>), qualifiers, and web-prefixed URLs (https://archive.softwareheritage.org/...). • Register it inIdentifier.javato enable automatic identifier detection. - Fetcher Logic (
SwhidFetcher): • Implement anIdBasedFetcherquerying Software Heritage's citation API (/api/1/raw-intrinsic- metadata/citation/swhid/?citation_format=bibtex&target_swhid=...). • Parse the returned BibTeX content into aBibEntryand ensureBiblatexSoftwareField.SWHIDis populated. • Register the fetcher inWebFetchers.javafor ID-based retrieval. - Testing:
• Unit tests for SWHID validation/parsing in
SWHIDTest. • Integration tests against the live endpoint inSwhidFetcherTestusing@ExternalServicesTest.
Does this approach look good to you, or would you recommend any adjustments?
https://dontpastetheai.com/ In general your approach sounds great, just create a draft PR and follow the guidelines
We think that this issue was fixed. Please head to https://builds.jabref.org/main to download a development build and try it out.
For any feedback, add a comment to the pull request at https://github.com/JabRef/jabref/pull/16849.