@ 引用-js/cli
引文使用过时参数coauthors (帮助) CLI for Citation.js.
安装
npm install --global @citation-js/cli
使用量
Usage: citation-js [options]
Options:
-h, --help output usage information
-V, --version output the version number
-i, --input <path> Input file. If all input options are omitted, it uses stdin
-t, --text <string> Input text. If all input options are omitted, it uses stdin
-o, --output <path> Output file (omit file extension). If this option is omitted, the output is written to stdout
--pipe Pipe and transform from stdin to stdout
-R, --output-non-real Output as a text file
-f, --output-type <option> Output structure type: string, html, json (default: "json")
-s, --output-style <option> Output scheme. A combination of --output-format json and --output-style citation-* is considered invalid. Options: csl (Citation Style Lanugage JSON), bibtex, citation-* (where * is any formatting style) (default: "csl")
-l, --output-language <option> Output language. [RFC 5646](https://tools.ietf.org/html/rfc5646) codes (default: "en-US")
--log-level <level> Log level: silent, error, warn, info, debug, http (default: "warn")
--plugins <names> Plugin names (@citation-js/plugin-NAME); bibjson, bibtex, csl, doi, ris & wikidata are preloaded (default: [])
--plugin-config <config> @plugin.property.path=value;... (default: [])
--formatter-options <config> property.path=value;... (default: [])
--no-input-generate-graph Do not include the parsing graph in CSL output
--input-force-type <type> Force parsing as a certain type
--input-max-chain-length <number> Set the maximal number of parsing iterations
--no-input-strict Do not use the strict parsing mode
--input-target <type> Stop parsing when a certain type is reached
投入
输入可以从 stdin,作为文件通过 -i, --input <path> 或者,对于简单的ID,作为纯文本 -t, --text。 。 。 .
$ echo "Q30000000" > input.txt
$ cat input.txt | citation-js
[{"title": "The Synergistic Activity ...", ...}]
$ citation-js --input input.txt
[{"title": "The Synergistic Activity ...", ...}]
$ citation-js --text Q30000000
[{"title": "The Synergistic Activity ...", ...}]
产出
CLI 输出到 stdout 默认情况下,但可以写入文件 -o, --output 选项.
$ citation-js --text Q30000000
[{"title": "The Synergistic Activity ...", ...}]
$ citation-js -t Q30000000 -o output
$ more output.json
[{"title": "The Synergistic Activity ...", ...}]
注意:文件扩展名是自动确定的,因此应在
-o选项。 要强制文件扩展名, 只需省略-o并重定向stdout以至首选文件.
输出格式
要格式化输出,请使用 -R, (中文(简体) ), -s, (中文(简体) ), -f 财务报告和审定财务报表 -l 选项。 这些选项映射到旧输出选项 .
| CLI 选项 | 默认值 | 其他价值 |
|---|---|---|
-R, --output-non-real | 省略(real(中文(简体) ) | 现( u)string,纯文本) |
-f, --output-type | json | json, (中文(简体) ), string |
-s, --output-style | csl | citation-*, (中文(简体) ), bibtex, (中文(简体) ), bibtxt, (中文(简体) ), data |
-l, --output-language | en-US | es-ES, (中文(简体) ), fr-FR, (中文(简体) ), du-DU, (中文(简体) ), nl-NL |
例如,格式化 doi:10.5281/zenodo.1005176 (英语) 以APA格式用法语:
$ citation-js -t 10.5281/zenodo.1005176 -f string -s citation-apa -l fr-FR
Willighagen, L., & Willighagen, E. (2017, octobre 9). Larsgw/Citation.Js V0.3.3. Zenodo. https://doi.org/10.5281/zenodo.1005176