g.citation
Provide scientific citation for GRASS modules and add-ons.
g.citation [-ads] [module=string] format=string [style=string] [vertical_separator=string] [output=name] [--verbose] [--quiet] [--qq] [--ui]
Example:
g.citation module=string format=bibtex
grass.script.parse_command("g.citation", module=None, format="bibtex", style="harvard1", vertical_separator=None, output=None, flags=None, verbose=False, quiet=False, superquiet=False)
Example:
gs.parse_command("g.citation", module="string", format="json")
Parameters
module=string
GRASS GIS module to be cited
format=string [required]
Citation format or style
Allowed values: bibtex, cff, json, pretty-json, csl-json, citeproc, chicago-footnote, dict, plain
Default: bibtex
bibtex: BibTeX
cff: Citation File Format
json: JSON
pretty-json: Pretty printed JSON
csl-json: Citation Style Language JSON (citeproc JSON) format
citeproc: Use the citeproc-py library to create the citation (CSL)
chicago-footnote: Chicago style for footnotes
dict: Pretty printed Python dictionary
plain: Plain text
style=string
Citation style for the citeproc formatter (CSL)
Default: harvard1
vertical_separator=string
Separator of individual citation records
Inserted before each item
output=name
Path of the output file
-a
Provide citations for all modules
-d
Add GRASS GIS as dependency to citation
Add GRASS GIS as dependency, reference, or additional citation to the citation of a module if applicable for the format (currently only CFF)
-s
Skip errors, provide warning only
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
module : str, optional
GRASS GIS module to be cited
format : str, required
Citation format or style
Allowed values: bibtex, cff, json, pretty-json, csl-json, citeproc, chicago-footnote, dict, plain
bibtex: BibTeX
cff: Citation File Format
json: JSON
pretty-json: Pretty printed JSON
csl-json: Citation Style Language JSON (citeproc JSON) format
citeproc: Use the citeproc-py library to create the citation (CSL)
chicago-footnote: Chicago style for footnotes
dict: Pretty printed Python dictionary
plain: Plain text
Default: bibtex
style : str, optional
Citation style for the citeproc formatter (CSL)
Default: harvard1
vertical_separator : str, optional
Separator of individual citation records
Inserted before each item
output : str, optional
Path of the output file
Used as: input, file, name
flags : str, optional
Allowed values: a, d, s
a
Provide citations for all modules
d
Add GRASS GIS as dependency to citation
Add GRASS GIS as dependency, reference, or additional citation to the citation of a module if applicable for the format (currently only CFF)
s
Skip errors, provide warning only
verbose: bool, optional
Verbose module output
Default: False
quiet: bool, optional
Quiet module output
Default: False
superquiet: bool, optional
Very quiet module output
Default: False
DESCRIPTION
g.citation - creates citation or metadata based on documentation of a given module.
Formats
Citation File Format
Citation File Format (CFF) is
a YAML based format for citations, specifically CITATION files to be
included with software or code as CITATION.cff
.
JSON
Currently, the keys and the overall structure are subject to change, but the plan is to stabilize it or to provide existing metadata format in JSON. Pretty-printed version is good, e.g., for saving into files, while the other, compact version is good for further processing.
Pretty printed Python dictionary
This format is essentially a dump of the internal data structure holding the citation entry. It should not be used in scripts, i.e. further parsed, for that there are other formats such as JSON. When this is advantageous is exploring what information the module was able to acquire for the citation.
NOTES
- Don't use the
format=dict
for further processing. It is meant for exploration of what information the module acquired. - The structure of the JSON output is yet not guaranteed.
EXAMPLES
g.citation module=v.select format=plain
g.citation f=pretty-json -a -s | grep '"name": ' | sort | uniq
g.citation -s format=citeproc vsep="< p>" -a > all.html
KNOWN ISSUES
- More output formats or styles are needed. The following formats were
suggested so far:
csl,datacite,dublincore,json-ld,narcxml
- The structure of the JSON output is not guaranteed. It reflects the internal structure (only the empty entries are removed).
- Version and date in CFF output are incomplete.
SEE ALSO
AUTHORS
Vaclav Petras, NCSU GeoForAll
Lab (ORCID:
0000-0001-5566-9236)
Peter Loewe (ORCID: 0000-0003-2257-0517)
Markus Neteler, mundialis (ORCID:
0000-0003-1916-1966)
SOURCE CODE
Available at: g.citation source code
(history)
Latest change: Friday Feb 21 10:10:05 2025 in commit 7d78fe3