Package: citeurl
CiteURL is an extensible tool that parses legal citations and makes links to websites where you can read the relevant law for free. It can be used to quickly look up a reference, or to insert a hyperlink for every long- or short-form citation found in a longer text.If you want to quickly try it out, it's available as a web app atcitation.link.Here's a sample of the links CiteURL can make:Federal law provides that courts should award prevailing civil rights plaintiffs reasonable attorneys fees,42 USC § 1988(b), and, by discretion, expert fees,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.By default, CiteURL supports Bluebook-style citations toover 130 sourcesof U.S. law, including:most reported state and federal court opinionsthe U.S. Code and Code of Federal Regulationsthe U.S. Constitution and all state constitutionsthe codified laws for every state and territory except Arkansas, Georgia, Guam, and Puerto Rico.You can also add more sources of law bywriting your own citation templatesin YAML format.InstallationTo install just enough to make CiteURL work, run this command:python3-mpipinstallciteurlSubstituteciteurl[full]forciteurlif you want to install the optional dependenciesflaskandappdirs, necessary for hosting citeurl as a website and reading custom templates from the user's home directory.UsageCiteURL provides four command-line tools:citeurl process: Parse a text and insert an HTML hyperlink for every citation it contains, including shortform citations.citeurl lookup: Look up a single citation and display information about it.citeurl host: Host an instance of CiteURL as a web app likecitation.link.citeurl makejs: Export an instance of CiteURL's lookup feature as JavaScript or a static web page. More info is availablehere.Each command has its own command-line arguments you can view with the-hoption. They all share the-toption, which allows you to load a list of customcitation templatesin YAML form.Here are a few common use cases:# Process a court opinion and output a version where each citation is hyperlinked:citeurlprocess-iINPUT_FILE.html-oOUTPUT_FILE.html# Look up a single citation and open it directly in a browserciteurllookup"42 USC 1983"-b# List the top ten authorities cited in a text, from most citations to least:catINPUT_FILE.html|citeurlprocess-a10# Host a lookup tool with custom templates, and serve it on the local network:citeurlhost-tPATH_TO_YOUR_TEMPLATES.YAML-sCiteURL is also available in a few other forms besides the command-line tool:citation.link, the web appa flexible Python libraryan extensiontoPython-Markdowna desktop search providerfor Linux users with the GNOME shellCreditsMany thanks to these websites, which CiteURL's default templates frequently link to:Harvard'sCaselaw Access Project- for most court casesCourtListener- for other court casesCornell'sLegal Information Institute- for the U.S. Code and many federal rulesBallotpedia- for the vast majority of state constitutionsLawServer.com- for statutes in about a dozen states and territories whose websites don't have a compatible URL scheme