an extensible tool to process legal citations in text
Project description
Sample Input | Output |
---|---|
Federal law provides that courts should award prevailing civil rights plaintiffs reasonable attorneys fees, see 42 USC § 1988(b), and, by discretion, expert fees, see id. at (c). This is because the importance of civil rights litigation cannot be measured by a damages judgment. See Riverside v. Rivera, 477 U.S. 561 (1986). But Evans v. Jeff D., upheld a settlement where the plaintiffs got everything they wanted, on condition that they waive attorneys fees. 475 U.S. 717 (1986). This ruling lets savvy defendants create a wedge between plaintiffs and their attorneys, discouraging civil rights suits and undermining the court's logic in Riverside, 477 U.S. at 574-78. | Federal law provides that courts should award prevailing civil rights plaintiffs reasonable attorneys fees, see 42 USC § 1988(b), and, by discretion, expert fees, see id. at (c). This is because the importance of civil rights litigation cannot be measured by a damages judgment. See Riverside v. Rivera, 477 U.S. 561 (1986). But Evans v. Jeff D., upheld a settlement where the plaintiffs got everything they wanted, on condition that they waive attorneys fees. 475 U.S. 717 (1986). This ruling lets savvy defendants create a wedge between plaintiffs and their attorneys, discouraging civil rights suits and undermining the court's logic in Riverside, 477 U.S. at 574-78. |
CiteURL is an extensible tool to process legal citations in text and generate links to sites where you can view the cited language online. By default, it supports Bluebook-style citations to the following bodies of law, among others:
- most state and federal court cases
- the U.S. Code and Code of Federal Regulations
- the U.S. Constitution and all state constitutions
- codified laws for every state and territory except Arkansas, Georgia, Guam, and Puerto Rico
The full list is available here. You can also customize CiteURL to support more bodies of law by writing your own citation schemas in YAML format.
In addition to longform citations, CiteURL can recognize subsequent shortform citations that appear. And in addition to generating hyperlinks, it can tally up all of the times that a text cites a particular authority.
If you want to try out the citation lookup features without installing anything, you can use LawSearch, a JavaScript implementation of CiteURL I maintain on my website.
Installation
CiteURL has been tested with Python version 3.9, but earlier versions probably work. Install Python if you don't have it, then run this command:
python -m pip install citeurl
Usage
To run CiteURL from command prompt, use the citeurl -h
command to see the list of options. CiteURL can also be used as an extension to Python-Markdown, or as a Python library.
As mentioned above, a Javascript implementation of CiteURL's citation lookup features is available on my website. Linux users with the GNOME shell can also install CiteURL as a search provider available directly from their desktop.
More detailed documentation for each of these use-cases is available here.
Credits
These are the sites that CiteURL's default schemas predominantly link to:
- Harvard's Caselaw Access Project - for court case links
- Cornell's Legal Information Institute - for the U.S. Code and many federal rules
- LawServer.com - for a large number of state statutes
- Ballotpedia - for the vast majority of state constitutions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.