🤖 A cleanup, a formatter batch or an import in jabkit writes the library and tells the user how many entries it touched. It cannot say what it would change without changing it.
The machinery for that already exists and needs no undo journal at all:
- Every operation that edits entries returns
FieldChanges, and the undo model turns those into BibChange records that describe a modification as a value.
org.jabref.logic.undo.BibChangeDescriber already renders such a change as text the user reads — it is what the GUI's undo notification says ("Change field Author").
So a --dry-run flag would run the operation against the library, collect the changes, print them, and not save. The one design question is output: one line per change, or grouped per entry, and whether --dry-run belongs on each subcommand or as a global flag.
Context: the undo/redo workstream moved the change model from org.jabref.gui.undo into jablib precisely so that jabkit and jabsrv are not shut out of it. Nothing uses it outside the GUI yet; this is the smallest thing that would.
🤖 A cleanup, a formatter batch or an import in
jabkitwrites the library and tells the user how many entries it touched. It cannot say what it would change without changing it.The machinery for that already exists and needs no undo journal at all:
FieldChanges, and the undo model turns those intoBibChangerecords that describe a modification as a value.org.jabref.logic.undo.BibChangeDescriberalready renders such a change as text the user reads — it is what the GUI's undo notification says ("Change field Author").So a
--dry-runflag would run the operation against the library, collect the changes, print them, and not save. The one design question is output: one line per change, or grouped per entry, and whether--dry-runbelongs on each subcommand or as a global flag.Context: the undo/redo workstream moved the change model from
org.jabref.gui.undointo jablib precisely so that jabkit and jabsrv are not shut out of it. Nothing uses it outside the GUI yet; this is the smallest thing that would.