Big Cases Bot 2 is the sequel to Brad Heath's excellent Big Cases Bot for Twitter.
The goals of Big Cases Bot 2 are:
- First and foremost, to bring the bot back!
- Expand the bot to Mastodon
Further development is intended, and all contributors, corrections and additions are welcome.
Free Law Project built this ... This project represents ...
We believe to be the ....
- Store cases, documents, and posting criteria in a database (SQLite)
- Process incoming new-document webhooks from CourtListener (
/webhooks/docket
)- Look up case
- Save to DB
- Decide if it's worth posting
- Construct a message
- Construct any media attachments
- Post
- To Mastodon
- To Twitter
- Process incoming messages from Mastodon or Twitter
- Mastodon: check notifications (Mastodon.py - webhook at
/webhooks/mastodon
- Twitter: check notifications/stream
- Is the user authorized to instruct the bot?
- Parse message
- Read up-thread if necessary to find what case is being discussed
- Respond
- Follow a case
- POST to CL API?
- Send reply message confirming case followed
- Send a RECAP docket link (construct from case ID)
- Send a RECAP document link
- Follow a case
- Check dockets for updates
- Original bot did this via polling court RSS feeds
- Decide if a new entry looks like it's worth downloading
- If yes, download the new document. (Webhook will fire at that point, so this is as far as the bot's checking needs to go.)
- Mastodon: check notifications (Mastodon.py - webhook at
- Flask
- Free Law Project's
courts-db
You can feed in a X as ... .. ...
IMPORTS
CALL EXAMPLE
returns:
""EXAMPLE OUTPUT
Somethings to keep in mind as ....
- ...
- ...
id
==> string; Courtlistener Court Identifiercourt_url
==> string; url for court websiteregex
==> array; regexes patterns to find courts
Installing Big Cases Bot 2 is easy.
pip install bigcases2
Or install the latest dev version from GitHub
pip install git+https://github.com/freelawproject/bigcases2.git@master
- Continue to improve ...
- Future updates
If you wish to create a new version manually, the process is:
-
Update version info in
setup.py
-
Install the requirements using
poetry install
-
Set up a config file at
~/.pypirc
-
Generate a universal distribution that works in py2 and py3 (see setup.cfg)
python setup.py sdist bdist_wheel
- Upload the distributions
twine upload dist/* -r pypi (or pypitest)
This repository is available under the permissive BSD license, making it easy and safe to incorporate in your own libraries.
Pull and feature requests welcome. Online editing in GitHub is possible (and easy!)