Skip to content

Conversation

@rahul-p19
Copy link

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
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
Copy link
Member

subhramit commented Dec 12, 2025

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),
Copy link
Member

@calixtus calixtus Dec 12, 2025

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
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.

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
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
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.

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
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