Skip to content

Add Pseudonymize option to GUI#14592

Merged
calixtus merged 4 commits into
JabRef:mainfrom
rahul-p19:fix-for-issue-14118
Dec 15, 2025
Merged

Add Pseudonymize option to GUI#14592
calixtus merged 4 commits into
JabRef:mainfrom
rahul-p19:fix-for-issue-14118

Conversation

@rahul-p19

Copy link
Copy Markdown
Contributor

Closes #14118

To add the button in the GUI, I updated MainMenu and StandardActions to include Pseudonymize Library option. I created a new PseudonymizeAction class extending SimpleCommand - on clicking the button, execute() runs and uses the existing Pseudonymize class to pseudonymize the current library, then exports the result to .pseudo.bib and .pseudo.csv (keys) files.

Steps to test

Load a .bib file or library into JabRef, then go to the "Tools" menu in the Main Menu Bar at the top. Click on Pseudonymize Library. Choose a directory using the dialog and then the files are downloaded. In case there already exists a file with the same name at the same directory, the user is asked if they'd like to override the file or cancel the operation.

Screenshot

image

Screen Recording

Screen.Recording.2025-12-13.at.12.32.03.AM.mov

Mandatory checks

@github-actions

Copy link
Copy Markdown
Contributor

Hey @rahul-p19! 👋

Thank you for contributing to JabRef!

We have automated checks in place, based on which you will soon get feedback if any of them are failing.

After all automated checks pass, a maintainer will also review your contribution. Once that happens, you can go through their comments in the "Files changed" tab and act on them, or reply to the conversation if you have further inputs.

Please re-check our AI Usage Policy to ensure that your pull request is in line with it. It also contains links to our contribution guide in case of any other doubts related to our contribution workflow.

@github-actions github-actions Bot added first contrib status: changes-required Pull requests that are not yet complete labels Dec 12, 2025
@subhramit

subhramit commented Dec 12, 2025

Copy link
Copy Markdown
Member

Hey, your changes look promising. Please run openrewrite as instructed by @jabref-machine

Comment on lines +113 to +114
NEW_LIBRARY_FROM_PDF_OFFLINE(Localization.lang("New library based on references in PDF file... (offline)"), Localization.lang("This feature generates a new library based on the list of references in a PDF file. Thereby, it uses JabRef's built-in functionality."), IconTheme.JabRefIcons.NEW),
PSEUDONYMIZE_LIBRARY(Localization.lang("Pseudonymize library") + "...", Localization.lang("Pseudonymize the current library and generate a .bib and .csv file"), IconTheme.JabRefIcons.NEW),

@calixtus calixtus Dec 12, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please use the ellipsis in the localization too. In other languages there might be different ways to indicate this. See NEW_LIBRARY_FROM_PDF_OFFLINE.
Yes, i know, there are still other commands who do it like you did, but these need to be addressed in another PR.

@github-actions github-actions Bot removed the status: changes-required Pull requests that are not yet complete label Dec 13, 2025

@subhramit subhramit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One minor comment


public class PseudonymizeAction extends SimpleCommand {
private static final Logger LOGGER = LoggerFactory.getLogger(PseudonymizeAction.class);
private static final String PSEUDO_SUFFIX = ".pseudo";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am aware that .pseudo exists in the cli tool, but can you change this to _pseudo instead here?

@github-actions github-actions Bot added the status: changes-required Pull requests that are not yet complete label Dec 13, 2025

@subhramit subhramit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lgtm

@subhramit subhramit requested a review from calixtus December 13, 2025 11:03
@github-actions github-actions Bot removed the status: changes-required Pull requests that are not yet complete label Dec 13, 2025
@rahul-p19

Copy link
Copy Markdown
Contributor Author

@calixtus Could you review the changes please?

@calixtus calixtus added this pull request to the merge queue Dec 14, 2025
Merged via the queue into JabRef:main with commit bb7e6d6 Dec 15, 2025
51 checks passed
@rahul-p19 rahul-p19 deleted the fix-for-issue-14118 branch December 17, 2025 13:36
Siva-Sai22 pushed a commit to Siva-Sai22/jabref that referenced this pull request Dec 19, 2025
* add pseudonymize option to gui

* execute rewrite run

* include ellipsis in localization

* replace . with _ in pseudo suffix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to use pseudonymize libraries in GUI

3 participants