Skip to main content
ReadTheDocs PyPI-Server Coveralls Project generated with PyScaffold

docite

Some tools to format references in documentation

This is a small package I created to help me format references in my documentation. It uses pandoc to convert the references from bibtex to a format that can be used in markdown files.

For example, this input file along with the corresponding bibliography file can be used to generate this output file.

Installation

You can install the package via pip:

pip install docite

Usage

You can use the package from the command line as follows:

docite --inputfile <INPUTFILE> --outputfile <OUTPUTFILE> --bibfile <BIFILE>

or:

python -m docite.cli --inputfile <INPUTFILE> --outputfile <OUTPUTFILE> --bibfile <BIFILE>

You can also use the package from python as follows:

from docite import convert
convert.convert_with_refs(inputfile, outputfile, bibfile)

My personal workflow is:

  • I use Zotero to manage my references and then export them to a Better Bibtex file.

  • I use the Citation Picker for Zotero extension within VSCode to add the references to my markdown files.

  • I use docite to generate an output markdown file with the references formatted.

Here is a gif showing how I use the package:

Usage

Customize

By default, the package will use the IEEE citation style. You can change the citation style by using the –stylefile option, e.g., to change the citation style to APA you can use the following command:

docite --inputfile <INPUTFILE> --outputfile <OUTPUTFILE> --bibfile <BIFILE> --stylefile path/to/downloaded/apa.csl

You can find citation style language files in the citation-style-language repository.

Making Changes & Contributing

This project uses pre-commit, please make sure to install it before making any changes:

pip install pre-commit
cd docite
pre-commit install

It is a good idea to update the hooks to the latest version:

pre-commit autoupdate

Don’t forget to tell your contributors to also install and use pre-commit.

Note

This project has been set up using PyScaffold 4.5. For details and usage information on PyScaffold see https://pyscaffold.org/.

Metadata

Release files for docite 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docite 0.1.3
File Size Uploaded Provenance
docite-0.1.3.tar.gz 40.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for docite 0.1.3
File Interpreter ABI Platform
docite-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 62.4 kB

Release files / docite-0.1.3.tar.gz

Download URL docite-0.1.3.tar.gz
Size 40.6 kB
Tags Source
SHA-256 checksum
How to use checksums
832653579758212deb68cb03b9be62e6210d1c1a11f3c23b9178166a39c52a12
BLAKE2b-256 checksum
How to use checksums
0550ecae08f88749eea3077e717d2378f0677595f0d9c035723a00cf649800df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / docite-0.1.3-py3-none-any.whl

Download URL docite-0.1.3-py3-none-any.whl
Size 21.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94aacbb319475cc74be5cf39a7f6a5c78cec4f511cf8ef3421d15ed136b8921c
BLAKE2b-256 checksum
How to use checksums
26865198e9ca024b0541995e753bc4febb390baf32bdc024e4bfb707556194b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Security for docite 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page