-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
As mentioned in #10917 (comment), it would be great to craft a round-trip test for the cff format, since we now have both an importer and an exporter.
The round-trip test should work importing https://github.com/JabRef/jabref/blob/main/CITATION.cff.
The current problem is that the importer only parses imports to BibEntry software type, as it was primarily intended by the Citation-File Format. On the other hand, the exporter uses the field preferred-citation to parse entries to their actual type, even if it is different that software. Also, the exporter uses the preferred-citation field even when the type is Software, which is not the expected behavior according to the CFF format.
There are four main things to implement in order for this round-trip test to work.
- make the importer parse the
preferred-citationfield, and in this case create another BibEntry for what is contained. - make the exporter parse the BibEntry
Softwaretype, and in this case output a cff file without anypreferred-citationfield. - parse the author's first name and last name separately, so that the exporter could use the fields
given-namesandfamily-namesinstead of the generic fieldnamein theauthorssection. - (more simple) parse all the fields from https://github.com/JabRef/jabref/blob/main/CITATION.cff in both importer and exporter
The exporter works using org.jabref.logic.exporter.TemplateExporter and the src/main/resources/resource/layout/cff.layout file. Importer is located in org.jabref.logic.importer.fileformat.CffImporter.
Some work was done in #10957 but then abandoned, it may help.