# \donttest{
# From a `cff` object ----
cff_object <- cff()
cff_object
# A `bibentry` object.
bib <- as_bibentry(cff_object)
class(bib)
bib
# Print as BibTeX.
toBibtex(bib)
# The S3 method also supports this.
toBibtex(cff_object)
# Other sources ----
# From a CITATION.cff.
path <- system.file("examples/CITATION_complete.cff", package = "cffr")
cff_file <- as_bibentry(path)
cff_file
# For an installed package with options.
installed_package <- as_bibentry("jsonvalidate", what = "all")
installed_package
# Use a DESCRIPTION file.
path2 <- system.file("examples/DESCRIPTION_gitlab", package = "cffr")
desc_file <- as_bibentry(path2)
toBibtex(desc_file)
# }
Run the code above in your browser using DataLab