gcal-slack-update
automatically changes your status in multiple Slack teams, depending on the current event in your Google Calendar.
It is designed to run periodically from a cron
job and, during each execution, it checks whether the current event Title in Google Calendar contains the match-text
defined in the set of configuration rules received as input.
Example of an input file in rules-example.conf
:
rules = [
{
match-text = "testing this"
status-emoji = ":smile:"
status-text = "It works"
},
{
match-text = "another test"
status-emoji = ":+1:"
status-text = "Count me in"
},
]
Configurations | Description | Maps to… |
---|---|---|
match-text |
Case insensitive string which can appear anywhere in the searched field | Google Calendar: Event Title |
status-emoji |
The symbol to display as the status | Slack: Status Emoji |
status-text |
The status’ description (can also contain emojis) | Slack: Status Text |
Authentication is read from a file named auth.conf
(see example in auth-example.conf
):
slack-token = "xoxp-legacy-token"
To generate such a token, go to the legacy tokens Slack page of the workspace where you wish to update the status.
- Get latest release from the repo releases page and unzip it to some location
- Make sure the execution script has execute permissions:
chmod a+x bin/gcal-slack-update
- Copy file
auth-example.conf
intoauth.conf
and update with your token for Slack - Copy file to
rules.conf
and customise it to your needs, as you prefer - Periodically run the command
./bin/gcal-slack-update rules.conf
with the frequency you wish to update status
- Change status in multiples Slack teams simultaneously!
- Support multiple Google Calendars?
- Search for matches in other event fields? (e.g. description, location)
- Support regex patterns to match events?
- Configure
sbt-native-packager
to ensure that the universal script files in./bin
have execute permissions