Utilities to help collate/organize the rands-leadership-slack newsletter
Most utilities need to have API_TOKEN env variable set for a Slack API token, which you can get from https://api.slack.com/docs/oauth-test-tokens
This will search slack for channels and then for messages in each channel that have reactions or a large number of threaded responses. It will put these inside a subdirectory named for today's date, with a text file for each channel for which messages were found.
> env API_TOKEN=<YOUR_SECRET_API_TOKEN> ./weekly_digest.py --exclude-list ./default_exclude.txt
This will download a given post (via it's publicly available url) and scan it for usernames mentioned in the post, printing a sorted list of those usernames.
> ./extract_usernames.py <URL> --exclude-list ./evergreen_permissions.txt
This will format a message as if from a robot, letting them know about potential newsletter inclusion and how to allow (or reject) the inclusion.
> env API_TOKEN=<YOUR_SECRET_API_TOKEN> ./notification.py --url <URL> --deadline "Monday 9 AM Pacific" --user_list ./users.txt --dry
Install all required python packages:
> pip install -r requirements.txt