Skip to content

Conversation

@subhramit
Copy link
Member

@subhramit subhramit commented Nov 20, 2025

Follow-up to #13153
Closes #12268
Addresses review comments, makes a few enhancements, cleans up some existing code and resolves merge conflicts.

  • Unifies URL validation logic across the codebase (URLUtil, URLChecker, LinkedFile).
  • Also adds Semantic scholar search (thanks @InAnYan!)

Description copied from the previous PR (and slightly enhanced):

Summary of Changes

This PR adds a new "Search Google Scholar" feature to JabRef, similar to the existing "Search ShortScience" functionality. The feature allows users to quickly search for a selected entry's title in Google Scholar directly from the main table's context menu. The search engines are moved under the "Search..." tab in the right click menu for better organization:

Screenshot 2025-05-30 at 4 01 57 PM

In addition, we make Google Scholar and Short Science links configurable in the Preferences tab, under a new section named "Search Engine URL Templates". One of the comments mentioned, in the issue, that "the URL should be configurable. Reason: We cannot maintain JabRef for all site URLs; and the list of sites might be opinionated." This allows users to customize their URL templates, such as adding additional query parameters like author or strings.

Screenshot 2025-05-30 at 3 54 02 PM

The following shows the link the user is directed to after clicking "Search Google Scholar":

Screenshot 2025-05-30 at 4 15 12 PM

Bullet Pointed List of Changes:

  • Added new search Google Scholar option
  • Moved search engines to a "Search" sub-menu in right click menu
  • Allow "Search Google Scholar" and "Search Short Science" URLs to be configurable in Preferences under the "Search Engine URL Templates" section

Collaborators

@lydia-yan @yoasaaa @brandon-lau0 @FlyJoanne

Mandatory checks

subhramit and others added 2 commits November 21, 2025 01:03
Co-authored-by: Brandon Lau <1brandonlau@gmail.com>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
@subhramit subhramit changed the title Support searching references at Google Scholar Support "Open in Google Scholar" Nov 20, 2025
@subhramit subhramit changed the title Support "Open in Google Scholar" Support searching references at Google Scholar Nov 20, 2025
@subhramit subhramit added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 20, 2025
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
Signed-off-by: subhramit <subhramit.bb@live.in>
@subhramit subhramit added the dev: code-quality Issues related to code or architecture decisions label Nov 20, 2025
@subhramit subhramit changed the title Support searching references at Google Scholar Support searching references at Google Scholar (+ misc. code cleanup) Nov 20, 2025
@InAnYan
Copy link
Member

InAnYan commented Nov 23, 2025

Semantic Scholar has different schema for authors. Instead of single author field, it requires that all authors are separated and an index is added like author[0]=ABC&author[1]=XYZ, but I haven't implemented this properly

@InAnYan
Copy link
Member

InAnYan commented Nov 23, 2025

Gosh I did something with submodules

@InAnYan
Copy link
Member

InAnYan commented Nov 23, 2025

I don't know where I got this java packaging

@subhramit subhramit changed the title Support searching references at Google Scholar Support searching references at Google Scholar & Semantic Scholar Nov 23, 2025
@InAnYan
Copy link
Member

InAnYan commented Nov 23, 2025

Sorry, but I'm unable to fix the code right now. Hope there are issues only in code formatting

@InAnYan
Copy link
Member

InAnYan commented Nov 23, 2025

But I wonder, can I parse a list of authors by just separating by and? Is and always present if there are several authors? It's not configurable?

@koppor
Copy link
Member

koppor commented Nov 23, 2025

But I wonder, can I parse a list of authors by just separating by and? Is and always present if there are several authors? It's not configurable?

This is BibTeX standard. They define the letters and to seperate authors.

Just use org.jabref.logic.importer.AuthorListParser#parse - or did I miss something?

@koppor
Copy link
Member

koppor commented Nov 23, 2025

Gosh I did something with submodules

Maybe, you tried out #14124, where we had that submodule for a short time.

@InAnYan
Copy link
Member

InAnYan commented Nov 23, 2025

Maybe, but now everything should be alright with the submodules

@koppor koppor marked this pull request as draft November 23, 2025 20:45
@koppor
Copy link
Member

koppor commented Nov 23, 2025

I converted to draft, because OpenRewrite fails.

void getSemanticScholarSearchURLIncludesAuthor() {
BibEntry entry = createEntryWithTitleAndAuthor("Quantum Computing", "Alice Smith");
Optional<String> url = linkCreator.getSemanticScholarSearchURL(entry);
System.err.println(url.get());
Copy link
Member

Choose a reason for hiding this comment

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

No system.err println

Copy link
Member

Choose a reason for hiding this comment

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

OMG SORRY
I should've deleted this

Copy link
Member

Choose a reason for hiding this comment

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

OMG SORRY
I should've deleted this

Copy link
Member

Choose a reason for hiding this comment

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

Our architecture test needs to be adapted.

LOGGER.debug would have been the right replacement 😅

Copy link
Member

Choose a reason for hiding this comment

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

Our architecture test needs to be adapted.

LOGGER.debug would have been the right replacement 😅

Signed-off-by: subhramit <subhramit.bb@live.in>
@koppor koppor marked this pull request as ready for review November 23, 2025 22:13
@subhramit subhramit added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 24, 2025
@koppor koppor enabled auto-merge November 24, 2025 07:10
@koppor koppor added this pull request to the merge queue Nov 24, 2025
Merged via the queue into JabRef:main with commit 5e08c82 Nov 24, 2025
54 checks passed
@koppor koppor deleted the open-reference branch November 24, 2025 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: maintable dev: code-quality Issues related to code or architecture decisions 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.

"Open in Google Scholar" / "Semantic Scholar"

4 participants