Skip to content

Latest commit

 

History

History
51 lines (35 loc) · 1.42 KB

README.md

File metadata and controls

51 lines (35 loc) · 1.42 KB

newsletter

Utilities to help collate/organize the rands-leadership-slack newsletter

Authentication

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.

Default Usage

> 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.

Default Usage

> ./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.

Default Usage

> env API_TOKEN=<YOUR_SECRET_API_TOKEN> ./notification.py --url <URL> --deadline "Monday 9 AM Pacific" --user_list ./users.txt --dry

Setup/Install

Install all required python packages:

> pip install -r requirements.txt