Open Marathon2112 opened 3 years ago
The whole XMP handling should be improved. That is written down at https://github.com/koppor/jabref/issues/337.
Hi I've started looking into this... So yeah I tried this rather naively
BibEntry bibEntry = new BibEntry(StandardEntryType.Article);
bibEntry.setCitationKey("Weiß_2018");
BibDatabase db = new BibDatabase(List.of(bibEntry));
Assertions.assertNotNull(db.getEntryByCitationKey("Weiß_2018").get());
And it works fine. so yeah, any idea how I can go about debugging the flow from cli input? O I could add temp logs, build and deploy the exe, and see how it works but I'm not sure how to go about that either
Edit : Okay I think by running in debug mode, putting a debug point in argumentProcessor and adding program arguments in run config, I can debug it.... Would it be possible to provide the args/ relevant data to re-create the scenario? Thanks!
Edit 2 : Not sure if I'm missing something, but I'm unable to re-create it...
These are the args I used : --writeMetadatatoPdf Weiß_2018 .\src\test\resources\org\jabref\logic\xmp\article_dublinCore.bib
@Siedlerchr maybe this issue doesn't occur anymore with the latest version of jabref?
@addak If you cannot reproduce it anylonger it's good!
It would be great if you could submit a pull request adding a test case. The class to touch seems to be https://github.com/JabRef/jabref/blob/main/src%2Ftest%2Fjava%2Forg%2Fjabref%2Flogic%2Fxmp%2FXmpUtilWriterTest.java.
The test case should include passing command line parameters to JabRef. Maybe even a new GitHub workflow needs to be generated.
@Marathon2112 Could you share your complete command line? I would assume something like
jabref -w Weiß_2018 test.bib
That would be the command line to use (when writing this bug report, I was using the GUI feature however).
When I do run this command, I get the following error:
File Weiß_2018 is not linked to any entry in database.
I can confirm that the file is linked in the database, despite the error message.
We cannot reproduce using the GUI.
We click on "Write XMP Metadata to PDF" - and get that it is successfully written:
I put it into "Reserved" until the issue is reproducible easily.
I think, this is a linux issue - I assume that there is no special file system involved.
To reproduce:
Weiß.pdf
(rename https://github.com/JabRef/jabref/blob/main/src/test/resources/org/jabref/logic/importer/fileformat/LNCS-minimal.pdf to Weiß.pdf
)@Article
)If that shows the error, write a test case doing that. You can check in Weiß.pdf
in the repository.
The feature added in #7814 works pretty well, except when the citation keys include special unicode character (e.g. the sharp s in Weiß_2018). In these cases, JabRef returns "Cannot find [...] in library."
Opening the '.bib' library in a standard text editor shows that the unicode character is saved correctly into the database.
JabRef 5.3--ArchLinux--1 Linux 5.12.15-arch1-1 amd64 Java 16.0.1 JavaFX 16+8