Skip to content

Conversation

@palukku
Copy link
Member

@palukku palukku commented May 30, 2025

Adds the ability to use the extensions which normally can be used with better-bibtex to startup the cayw citation picker in zotero.

Closes #13187

The cayw endpoint and gui can be opened with

curl http://localhost:23119/better-bibtex/cayw

after that it opens up a window where you can search

image

Provide path to bif file - and say JSON format

curl http://localhost:23119/better-bibtex/cayw?librarypath=C%3A%5CUsers%5CDEMO%5CDownloads%5CChocolate.bib&format=json

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • [/] Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (if change is visible to the user)
  • [/] Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • [/] Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

Copy link
Member

@subhramit subhramit left a comment

Choose a reason for hiding this comment

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

Great progress so far, Philip!
I have left some comments.

Also, if possible, please add javadoc to every non-trivial method you write during the project (by non-trivial I mean ones which are not getX, setZ or displayP etc.) so that any maintainer taking a walk can review your code easily without having to gather context.
^This suggestion holds for all GSoC students @Yubo-Cao @Kaan0029 @wanling0000.

@koppor koppor added project: gsoc component: cite-as-you-write cayw (similar to better-bibtex for Zotero) labels May 30, 2025
@JabRef JabRef deleted a comment from jabref-machine May 30, 2025
@palukku palukku closed this May 30, 2025
@koppor
Copy link
Member

koppor commented May 30, 2025

Tmp moved to JabRef#709

koppor
koppor previously approved these changes Jul 1, 2025
InAnYan
InAnYan previously approved these changes Jul 1, 2025
@koppor koppor dismissed stale reviews from InAnYan and themself via 5389fdc July 1, 2025 20:35

/// @return a stream to the `Chocolate.bib` file in the classpath (is null only if the file was moved or there are issues with the classpath)
private @Nullable InputStream getChocolateBibAsStream() {
return BibDatabase.class.getResourceAsStream(CHOCOLATEBIB_PATH);
Copy link

Choose a reason for hiding this comment

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

Method can return null but doesn't use Optional to explicitly handle the null case, violating the principle of not returning null from public methods.

Comment on lines +90 to +91
Platform.runLater(() -> {
SearchDialog<BibEntry> dialog = new SearchDialog<>();
Copy link

Choose a reason for hiding this comment

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

GUI code is directly implemented in the resource class instead of being delegated to a proper logic layer in org.jabref.logic package.

InAnYan
InAnYan previously approved these changes Jul 1, 2025
koppor
koppor previously approved these changes Jul 1, 2025
@koppor koppor dismissed stale reviews from InAnYan and themself via d58a196 July 1, 2025 21:03
@trag-bot
Copy link

trag-bot bot commented Jul 1, 2025

@trag-bot didn't find any issues in the code! ✅✨

1 similar comment
@trag-bot
Copy link

trag-bot bot commented Jul 1, 2025

@trag-bot didn't find any issues in the code! ✅✨

@jabref-machine
Copy link
Collaborator

JUnit tests of jablib are failing. You can see which checks are failing by locating the box "Some checks were not successful" on the pull request page. To see the test output, locate "Tests / Unit tests (pull_request)" and click on it.

You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide.

@koppor koppor merged commit 7959b16 into JabRef:main Jul 1, 2025
1 check passed
koppor added a commit to iloveskittles82/jabref that referenced this pull request Jul 3, 2025
@palukku palukku changed the title Implement a Zotero Picker compatible CAYW Endpoint Feat: Implement a basic Zotero picker compatible CAYW endpoint Nov 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: cite-as-you-write cayw (similar to better-bibtex for Zotero) project: gsoc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Initial endpoint for cite-as-you-write

5 participants