Skip to main content

easycit - Create Citations from the command-line

PyPI Changelog Tests License

Easily create citations from website URLs.

Installation

Install this tool using pip:

pip install easycit

Usage

For help, run:

easycit --help

You can also use:

python -m easycit --help

Generate a Citation

To generate a citation, use the following command:

easycit create <URL> -f <format>

Available Options

  • -f, --fmt [mla|apa|chicago|IEEE|Harvard]: The citation format (default: mla).
  • --no-date: Omit the accessed date from the citation.
  • --no-url: Omit the URL from the citation.
  • --override : Override specific fields (e.g., --override author "John Doe").
  • --dump: Don't dump citation to stdout (default: True).
  • --log: Prevent citation from being logged into the database (default: True).

Batch Processing

To generate citations for multiple URLs from a file, use the following command:

easycit batch <file> -f <format>

Available Options

  • -f, --fmt [mla|apa|chicago|IEEE|Harvard]: The citation format (default: mla).
  • --no-date: Omit the accessed date from the citation.
  • --no-url: Omit the URL from the citation.
  • --override : Override specific fields (e.g., --override author "John Doe").
  • --dump: Don't dump citation to stdout (default: True).
  • --log: Prevent citation from being logged into the database (default: True).

List Logs

To list the logged citations, use the following command:

easycit logs list

Available Options

  • -n, --count : Number of entries to show - defaults to 3, use 0 for all.
  • -q, --query : Search for logs matching this string.

Examples

Generate an MLA citation:

easycit create https://realpython.com/python-serialize-data/ -f mla

Generate an APA citation without the accessed date:

easycit create https://realpython.com/python-serialize-data/ -f apa --no-date

Generate a Chicago citation without the URL:

easycit create https://realpython.com/python-serialize-data/ -f chicago --no-url

Override the author and title fields:

easycit create https://realpython.com/python-serialize-data/ -f apa --override author "John Doe" --override title "Custom Title"

Generate citations for multiple URLs from a file:

easycit batch urls.txt -f mla

List all logged citations:

easycit logs list --count 3

Search for logged citations containing a specific string:

easycit logs list --query "Python"

Browsing logs using Datasette

You can also use Datesette to browse your logs like this:

datasette "$(easycit logs path)"

Development

To contribute to this tool, first checkout the code. Then create a new virtual environment:

cd easycit
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Metadata

Release files for easycit 0.2.1

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

Source distribution (sdist)

Source distribution for easycit 0.2.1
File Size Uploaded Provenance Actions
easycit-0.2.1.tar.gz 9.0 kB Without provenance Details for easycit-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 19.0 kB

Release files / easycit-0.2.1.tar.gz

Download URL easycit-0.2.1.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a68b8118e6432b5a72c016cf7218167ac63af8b8b4f8817b51a74cf351f22207
BLAKE2b-256 checksum
How to use checksums
5728724d89f3dd94a8523a8679dbbd60a8ae054d0d5e3e2c87e98493f9a8c700
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.4 Darwin/23.5.0

Release files / easycit-0.2.1-py3-none-any.whl

Download URL easycit-0.2.1-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe3e5e597203c6eba8885daa976d1114bb2448efa91c5e4440ac6548c1f879e1
BLAKE2b-256 checksum
How to use checksums
54c36f050132874c063c63d5453d9f8ae003185ce40b49e76425807d8ccf48ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.4 Darwin/23.5.0

Security for easycit 0.2.1

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