From the Courtlistener site: "CourtListener is a free legal research website containing millions of legal opinions from federal and state courts. With CourtListener, lawyers, journalists, academics, and the public can research an important case, stay up to date with case law as it develops, or do deep analysis using our raw data."
Users can browse to the Courtlistenerwebsite and make queries against their databases to aid in legal research.
Courtlistenerprovides a set of APIs that open up their data up to developers wanting to develop legal research tools. See here: https://www.courtlistener.com/help/api/
Courtlistenersuggests that developers learn the APIs by studying the JSON returned from an HTTP OPTIONS request to the API url.
JSON files can be quite long and complex making it dificult to comprehend.
This Python project produces HTML versions of the API JSON in a nice, easy to read HTML tables inside of a set of HTML pages.
The basic process is to obtain the JSON from HTTP OPTIONS requests to the CourtListener rest APIs endpoints,
translate the JSON to HTML and create an HTML page containing the translation and, finally, create a small
wensite that can be deployed on anything from localhost to a hosting site.
The premise is that it is easier to learn an API from a nice HTML table than it is from a JSON file.
- Download the code zip file.
- Extract it into a local folder.
- Install the json2html GitHub repo. See: https://github.com/softvar/json2html
- At a command line:
1. Navigate to the folder you just created.
2. Run: python updateDocumentation.py
The update command runs the entire process including regenerating the clWebSiter folder
contiaining a small website that runs the documentation.
- assets - css and js files
- ClApiJSON - The JSON files for the API options requests.
- classes - contains Py classes that do all of the heavy lifting.
- clWebSite - the web site generated by the updateDocumenttion.py module..
- hemlPages - holds all of the generated HTML pages.
- templates - contains the templates for the HTML pages, the navbartemplate, the generated navbar,
the index.HTML template and the help.HTML template.
- config.ini - Simple configuration file.
- getApiJSON.py - makes a folder - ClApiJJSON - using getApiJSONs class.
- makeSite.py - generates the clWebSite folder for the current state.
- runit.py - generates the HTML pages using the generateDocs class.
- updateDocumenttion.py runs steps 2, 3 and 4 to regenerate everything.
- utils.py is a module of shared utility procedures.
- Readme.md - this file.
The files getApiJsion.py, makeSite.py and runit.py run the individual classes and are ment to be used for development and testing.