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.
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.
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
softwaretype, as it was primarily intended by the Citation-File Format. On the other hand, the exporter uses the fieldpreferred-citationto parse entries to their actual type, even if it is different thatsoftware. Also, the exporter uses thepreferred-citationfield 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.
preferred-citationfield, and in this case create another BibEntry for what is contained.Softwaretype, and in this case output a cff file without anypreferred-citationfield.given-namesandfamily-namesinstead of the generic fieldnamein theauthorssection.The exporter works using
org.jabref.logic.exporter.TemplateExporterand thesrc/main/resources/resource/layout/cff.layoutfile. Importer is located inorg.jabref.logic.importer.fileformat.CffImporter.Some work was done in #10957 but then abandoned, it may help.