Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for biblatex-software #391

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

joenio
Copy link

@joenio joenio commented Jun 28, 2024

This Pull-Request adds support for converting CITATION.cff to biblatex-software format adding the new --format biblatex, eg:

cffconvert -i CITATION.cff -f biblatex -o biblatex.bib

The Bibtex format --format bibtex was not changed, and the new format --format biblatex was added, the new format biblatex was build on top of the bibtex implementation, the source code of Bibtex was duplicated and modified to add the new fields below:

  • abstract
  • date
  • repository
  • license
  • version
  • institution
  • editor
  • swhid
  • keywords

Important to mention that the fields institution and editor doesn't have a straight match with any field from CFF format, AFAIK. My approach was to collect it from the field contact from the CITATION.cff.

The biblatex-software documentation defines the field institution such as:

  • "The institution(s) that took part in the software project"

I am not sure we have this kind of field on CITATION.cff, the strategy adopted here for the institution field is:

  • Search for the contact field in CITATION.cff
    • If a contact field is found search for the 1st entry that matches the criteria below
      • The contact has the field name defined
    • Add it to the institution field

The biblatex-software documentation defines the field editor such as:

  • "The coordinator(s) of large modular software projects"

Again, I am not sure we have this kind of field on CITATION.cff, the strategy adopted here for the editor field is:

  • Search for the contact field in CITATION.cff
    • If a contact field is found search for entries that matches the criteria below
      • The contact doesn't have the field name
      • The contact has the field given-names defined
      • The contact has the field family-names defined
    • Add given-names and family-names of all contacts to the output

Below you can see how the results between bibtex and biblatex differs for the same input file.

Example of use for the bibtex format

cffconvert -i tests/cli/cff_1_0_3/CITATION.cff -f bibtex
@misc{YourReferenceHere,
author = {Spaaks, Jurriaan H. and Klaver, Tom},
doi = {10.5281/zenodo.1162057},
month = {1},
title = {cffconvert},
url = {https://github.com/citation-file-format/cffconvert},
year = {2018}
}

Example of use for the biblatex format

cffconvert -i tests/cli/cff_1_0_3/CITATION.cff -f biblatex
@software{YourReferenceHere,
author = {Spaaks, Jurriaan H. and Klaver, Tom},
doi = {10.5281/zenodo.1162057},
month = {1},
title = {cffconvert},
url = {https://github.com/citation-file-format/cffconvert},
year = {2018},
date = {2018-01-16},
repository = {https://github.com/citation-file-format/cffconvert},
license = {Apache-2.0},
version = {1.0.0},
keywords = {citation, bibliography, cff, CITATION.cff}
}

Questions

I believe the code added by this PR is good but not good enough, I think I need some inputs from the more-experienced here about the compatibility between the CFF schema and the biblatex-software schema, specially for the fields editor and institution, the strategy that I've adopted is based on my experience using CITATION.cff to document some of my projects, where I have used the CITATION.cff contact field to describe who is the institution and the editors of the software project I am working on.

That said, I would like to ask: What do you think about the code proposed here, and about the strategy adopted for the fields I've mentioned?

Thanks for you time and your attention.

Closes: #152

Joenio Marques da Costa added 4 commits June 28, 2024 15:04
biblatex-fields added:
- abstract
- date
- repository
- license
- version
- institution
- editor
- swhid
- keywords

Issue: citation-file-format#152
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support biblatex-software
1 participant