cffconvert-2.0.0
توضیحات
Command line program to validate and convert CITATION.cff files.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | cffconvert-2.0.0 |
| نام | cffconvert |
| نسخه کتابخانه | 2.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Jurriaan H. Spaaks |
| ایمیل نویسنده | j.spaaks@esciencecenter.nl |
| آدرس صفحه اصلی | https://github.com/citation-file-format/cff-converter-python |
| آدرس اینترنتی | https://pypi.org/project/cffconvert/ |
| مجوز | - |
# `cffconvert`
[](https://doi.org/10.5281/zenodo.1162057)
[](https://github.com/citation-file-format/cff-converter-python/actions/workflows/testing.yml)
[](https://github.com/citation-file-format/cff-converter-python/actions/workflows/linting.yml)
[](https://sonarcloud.io/dashboard?id=citation-file-format_cff-converter-python)
[](https://pypi.python.org/pypi/cffconvert/)
[](https://bestpractices.coreinfrastructure.org/projects/1811)
[](https://www.research-software.nl/software/cff-converter-python)
[](https://fair-software.eu)
Command line program to validate and convert [`CITATION.cff`](https://github.com/citation-file-format/citation-file-format) files.
Supported input versions of the Citation File Format:
| Citation File Format schema version | Link to Zenodo release |
| --- | --- |
| `1.2.0` | [](https://doi.org/10.5281/zenodo.5171937) |
| `1.1.0` | [](https://doi.org/10.5281/zenodo.4813122) |
| `1.0.3` | [](https://doi.org/10.5281/zenodo.1222163) |
| `1.0.2` | [](https://doi.org/10.5281/zenodo.1120256) |
| `1.0.1` | [](https://doi.org/10.5281/zenodo.1117789) |
Supported output formats:
1. APA-like plaintext
1. BibTeX
3. CodeMeta
4. EndNote
1. RIS
1. schema.org JSON
1. Zenodo JSON
`cffconvert` does not support converting items from `references` or `preferred-citation` keys at the moment.
## Installing
To install in user space,
```shell
python3 -m pip install --user cffconvert
```
Ensure that the user space directory `~/.local/bin/` is on the `PATH`.
```shell
which cffconvert
```
should now return the location of the program.
See [docs/alternative-install-options.md](docs/alternative-install-options.md) for alternative install options.
## Command line interface
See `cffconvert`'s options:
```shell
cffconvert --help
```
Shows:
```shell
Usage: cffconvert [OPTIONS]
Options:
-i, --infile PATH Path to the CITATION.cff input file. If this
option is omitted, './CITATION.cff' is used.
-o, --outfile PATH Path to the output file.
-f, --format [apalike|bibtex|cff|codemeta|endnote|ris|schema.org|zenodo]
Output format.
-u, --url TEXT URL to the CITATION.cff input file.
-h, --help Show help and exit.
--show-trace Show error trace.
--validate Validate the CITATION.cff file and exit.
--version Print version and exit.
```
## Example usage
### Validating a local CITATION.cff file
```shell
cffconvert --validate
cffconvert --validate -i CITATION.cff
cffconvert --validate -i ${PWD}/CITATION.cff
cffconvert --validate -i ../some-other-dir/CITATION.cff
```
### Validating a remote CITATION.cff file
```shell
cffconvert --validate --url https://github.com/<org>/<repo>
cffconvert --validate --url https://github.com/<org>/<repo>/commit/<sha>
cffconvert --validate --url https://github.com/<org>/<repo>/tree/<sha>
cffconvert --validate --url https://github.com/<org>/<repo>/tree/<tag>
cffconvert --validate --url https://github.com/<org>/<repo>/tree/<branch>
```
### Converting metadata to other formats
If there is a valid `CITATION.cff` file in the current directory, you can convert to various other formats and
print the result on standard out with:
```shell
cffconvert -f bibtex
cffconvert -f codemeta
cffconvert -f endnote
cffconvert -f ris
cffconvert -f schema.org
cffconvert -f zenodo
cffconvert -f apalike
```
### Writing to a file
```shell
# with i/o redirection:
cffconvert -f bibtex > bibtex.bib
cffconvert -f zenodo > zenodo.json
cffconvert -f endnote > ${PWD}/endnote.enw
# etc
# without i/o redirection
cffconvert -f bibtex -o bibtex.bib
cffconvert -f zenodo -o zenodo.json
cffconvert -f endnote -o ${PWD}/endnote.enw
# etc
```
نیازمندی
| مقدار | نام |
|---|---|
| <9,>=7.0 | click |
| <3,>=2.20 | requests |
| >=0.16.0 | ruamel.yaml |
| >=1.6 | pykwalify |
| <4,>=3.0 | jsonschema |
| >=1.4 | prospector[with_pyroma] |
| - | isort |
| >=6 | pytest |
| - | pytest-cov |
| - | flask |
| - | twine |
| - | wheel |
نحوه نصب
نصب پکیج whl cffconvert-2.0.0:
pip install cffconvert-2.0.0.whl
نصب پکیج tar.gz cffconvert-2.0.0:
pip install cffconvert-2.0.0.tar.gz