write out a codemeta.json file for a given package. This function is basically a wrapper around create_codemeta() to both create the codemeta object and write it out to a JSON-LD-formatted file in one command. It can also be used simply to write out to JSON-LD any existing object created with create_codemeta().
write_codemeta(pkg = ".", path = "codemeta.json", root = ".", id = NULL, force_update = getOption("codemeta_force_update", TRUE), ...)
package path to package root, or package name, or description file (character), or a codemeta object (list)
file name of the output, leave at default "codemeta.json"
if pkg is a codemeta object, optionally give the path to package root. Default guess is current dir.
identifier for the package, e.g. a DOI (or other resolvable URL)
Update guessed fields even if they are defined in an existing codemeta.json file
additional arguments to
writes out the codemeta.json file
If pkg is a codemeta object, the function will attempt to update any fields it can guess (i.e. from the DESRIPTION file), overwriting any existing data in that block. In this case, the package root directory should be the current working directory.
write_codemeta("codemeta", tempfile())#> Warning: path="codemeta": No such file or directory