https://github.com/zedthree/cff-reader-python
Python reader for Citation File Format
https://github.com/zedthree/cff-reader-python
Last synced: 22 days ago
JSON representation
Python reader for Citation File Format
- Host: GitHub
- URL: https://github.com/zedthree/cff-reader-python
- Owner: ZedThree
- License: apache-2.0
- Created: 2018-09-05T11:21:43.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-05T16:00:16.000Z (almost 8 years ago)
- Last Synced: 2025-01-18T00:53:57.091Z (over 1 year ago)
- Language: Python
- Size: 23.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# cff-reader-python
A python reader for the Citation File Format (cff). It can load cff
files locally or from github repositories, and provides a class for
citations.
Heavily based on https://github.com/citation-file-format/cff-converter-python
## Getting started
Download the code and install using
pip install --user .
in the download folder.
Use the code by importing into your own python file:
```python
import cffreader
```
## Usage examples
Read from a local CITATION.cff file:
```python
citation = cffreader.reader(from_filename="CITATION.cff")
```
Read from a github repository (eg this one!):
```python
citation = cffreader.reader(from_url="https://github.com/ZedThree/cff-reader-python")
```
## Running the tests
Tests are written using pytest. Run pytest in the toplevel.
## Acknowledgments
Some code from the cff-convertor-python project at https://github.com/citation-file-format/cff-converter-python/
Initial code developed at the cff-file-format hackday