Checks whether the next meetup is announced on pyvo.cz. If not, sends a message to the specified Slack channel to remind about the situation and provide a link to documentation on how anyone can fix it.
- Create a Slack app.
- Add scopes allowing the app to write to Slack channels (
chat:write
,chat:write.public
). - Create a bot user for the app so it can act independently.
- Install the app for your workspace.
- Find the bot token (starts with
xoxb-
) and set it as an environment variable before running the script:
$ export SLACK_API_TOKEN=...
$ python jechova.py '#pyvo-praha' praha-pyvo
First argument is a channel name where the message should go. Beware, if you specify it as #pyvo-praha
, standard shell interprets the #
as a start of a comment and will ignore the rest of the line. You must pass it either as pyvo-praha
or as '#pyvo-praha'
(both works).
Second argument is the meetup slug used in the meetup URL. For example, if the meetup URL is https://pyvo.cz/praha-pyvo/
, the slug would be praha-pyvo
.
When debugging, force sending of the message by adding -f
. (And use #automatizace
or other less populated channel.)
The script is deployed as a daily GitHub Action. SLACK_API_TOKEN
needs to be set as a secret. If you want Jechová to handle meetup in your town as well, just add a new workflow.
@dependabot is set up to automatically upgrade dependencies on the repo. It won't automerge PRs if there are no checks though, so there's also a default build as a GitHub Action, currently only consisting of a linter check.
There are no tests. If the code breaks, we'll know when it crashes during the daily cron build.