Skip to content

Add Unpaywall fetcher and add JabKit commands for citations#14340

Merged
koppor merged 38 commits intomainfrom
add-cites-citing
Nov 18, 2025
Merged

Add Unpaywall fetcher and add JabKit commands for citations#14340
koppor merged 38 commits intomainfrom
add-cites-citing

Conversation

@koppor
Copy link
Copy Markdown
Member

@koppor koppor commented Nov 17, 2025

This adds our citation feature to JabKit

Moreover, adds Unpaywall fulltext fetcher.

Steps to test

./gradlew :jabkit:run --args="get-cited-works 10.31083/j.rcm.2018.04.3187"
./gradlew :jabkit:run --args="get-citing-works 10.31083/j.rcm.2018.04.3187"

Mandatory checks

calixtus and others added 27 commits October 20, 2025 22:32
- entry point: JabKitLauncher
- command "jabkit": JabKit
- some alphabetical sorting
- refine comments
- some null markers
- some variable name tweaks
…es-citing"

This reverts commit ab02d15, reversing
changes made to 403910e.
@koppor koppor marked this pull request as ready for review November 17, 2025 21:39
@koppor koppor added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 17, 2025
Siedlerchr
Siedlerchr previously approved these changes Nov 17, 2025
@Siedlerchr
Copy link
Copy Markdown
Member

/home/runner/work/jabref/jabref/jablib/src/main/java/org/jabref/logic/importer/fetcher/CustomizableKeyFetcher.java:5: error: cannot find symbol
import jakarta.annotation.Nullable;
-> must be jspecify

Siedlerchr
Siedlerchr previously approved these changes Nov 17, 2025
/// Fetcher for <https://unpaywall.org/>
///
/// Currently only used for storing an "API key" to be able to cope with URLs appearing at web server answers such as `Paper or abstract available at https://api.unpaywall.org/v2/10.47397/tb/44-3/tb138kopp-jabref?email=<INSERT_YOUR_EMAIL>`
public class UnpaywallFetcher implements SearchBasedFetcher, CustomizableKeyFetcher, FulltextFetcher {
Copy link
Copy Markdown
Member

@Siedlerchr Siedlerchr Nov 17, 2025

Choose a reason for hiding this comment

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

Add getTestUrl for api key check, see e.g. MedlineFetcher

@Siedlerchr
Copy link
Copy Markdown
Member

Have you checked if this work with this check in the ui?

URLDownload urlDownload = new URLDownload(testUrlWithoutApiKey + apiKey);

@koppor koppor changed the title Add JabKit commands for citations Add Unpaywall fetcher and add JabKit commands for citations Nov 18, 2025
@koppor
Copy link
Copy Markdown
Member Author

koppor commented Nov 18, 2025

grafik grafik

@koppor koppor added this pull request to the merge queue Nov 18, 2025
Merged via the queue into main with commit a0570c9 Nov 18, 2025
53 of 54 checks passed
@koppor koppor deleted the add-cites-citing branch November 18, 2025 09:09
merlinymy pushed a commit to merlinymy/jabref that referenced this pull request Nov 19, 2025
…4340)

* Revert "Update Gradle Wrapper from 9.3.0-jabref-1 to 9.1.0 (JabRef#14033)"

This reverts commit 1fc12a7.

* Clean up packages in JabKit

* Fix namings

- entry point: JabKitLauncher
- command "jabkit": JabKit

* First GetCitedWorks

* Add some NonNull annotations

* Fix main class name

* Fix option

* Add initial support for unpaywall downloads

- some alphabetical sorting
- refine comments
- some null markers
- some variable name tweaks

* Fix alphabetical ordering

* No default email for Unpaywall

* Other handling of Unpaywall

* Handle empty key

* Fix key customization

* Revert changes of gradlew and gradlew.bat

* Make UnpayWallFetcher a WebFetcher

* Add CHANGELOG.md line

* Add commands

* Revert "Merge branch 'revert-14033-gradlew-update-9.1.0' into add-cites-citing"

This reverts commit ab02d15, reversing
changes made to 403910e.

* Add links to CHANGELOG.md

* Discard changes to .github/workflows/binaries.yml

* Fix import

* Fix imports

* Fix formatting

* Fix typo

* Fix test

* Add getTestUrl()

* Swap methods

* Fix typo

* Fix formatting

* Adapt tests to new behavior

---------

Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants