Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rgieseke/cite
Command line tool to get bibliography e.g. BibTex entries
https://github.com/rgieseke/cite
Last synced: about 1 month ago
JSON representation
Command line tool to get bibliography e.g. BibTex entries
- Host: GitHub
- URL: https://github.com/rgieseke/cite
- Owner: rgieseke
- License: bsd-2-clause
- Created: 2018-10-22T16:06:03.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2023-02-10T10:44:54.000Z (almost 2 years ago)
- Last Synced: 2024-10-31T23:41:57.911Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 47.9 KB
- Stars: 14
- Watchers: 5
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cite
[![CI](https://img.shields.io/github/actions/workflow/status/rgieseke/cite/main.yml?branch=main&style=for-the-badge&label=actions&logo=github&logoColor=white)](https://github.com/rgieseke/cite/actions)
[![PyPI](https://img.shields.io/pypi/v/cite.svg?style=for-the-badge)](https://pypi.org/project/cite/)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/cite.svg?style=for-the-badge)](https://anaconda.org/conda-forge/cite)## Installation
```
pip install cite
```## Usage
Prints citation from DOIs or URLs of journal articles which provide DOIs in their
metadata.```
$ cite https://doi.org/10.1103/PhysRev.48.73Einstein, A., & Rosen, N. (1935). The Particle Problem in the General Theory of Relativity. Physical Review, 48(1), 73–77. doi:10.1103/physrev.48.73
```Other output styles formats are supported, see the list of CSL styles ar
```
$ cite --style iso690-author-date-en https://doi.org/10.1103/PhysRev.48.73EINSTEIN, A. and ROSEN, N., 1935, The Particle Problem in the General Theory of Relativity. Physical Review [online]. 1 July 1935. Vol. 48, no. 1, p. 73–77. DOI 10.1103/physrev.48.73. Available from: http://dx.doi.org/10.1103/PhysRev.48.73
```To generate a BibTeX entry with a shortdoi-based unique key use `--bibtex` or `-b`
```
$ cite --bibtex https://doi.org/10.1103/PhysRev.48.73
```The entry's key is made of name, year and [short DOI](http://shortdoi.org/) of the item.
To get Citeproc-JSON use `--json` or `-j`.
Where the journals provide the DOI in their website's metadata it is also
possible to use the article website URL:
```
$ cite https://journals.aps.org/pr/abstract/10.1103/PhysRev.48.73Einstein, A., & Rosen, N. (1935). The Particle Problem in the General Theory of Relativity. Physical Review, 48(1), 73–77. doi:10.1103/physrev.48.73
```To add to an entry to an existing BibTex file:
```
cite --bibtex https://doi.org/10.1103/PhysRev.48.73 >> bibliography.bib
```For the full list of options, see
```
$ cite --help
```Uses Crosscite [DOI Content Negotiation](https://citation.crosscite.org/).