Automations used around the lab.
- Reads the NEW collection on Zotero via Atom feed
- Determines which items are new
- Posts new items on the #papers channel on Slack via webhook
Runs every 5 minutes using GitHub Actions.
DiskSentinel monitors disk usage and alerts Slack with a per-user /home or /hdd breakdown.
-
Go to https://api.slack.com/apps and click Create New App → From scratch
-
Name it DiskSentinel, select your workspace
-
Under OAuth & Permissions → Scopes, add Bot Token Scopes:
chat:write
channels:read
- (optional)
chat:write.public
if you want to post in channels without inviting the bot
-
Install the app to your workspace and authorize
-
Copy the Bot User OAuth Token (
xoxb-…
) and the Channel ID (e.g.C01234567
)
As sudo
, clone into /etc
:
cd /etc
sudo git clone https://github.com/bionicvisionlab/automations bvl-automations
Make sure the bash script is executable (it should already be):
cd bvl-automations
chmod +x disk_sentinel.sh
In /etc/bvl-automations
, create a file called .disk_sentinel.conf
and export
the following variables:
SLACK_BOT_TOKEN="xoxb-…" # from Slack Apps
SLACK_CHANNEL_ID="C01234567" # from channel info
THRESHOLD=90 # percentage
MOUNT_POINTS="/home /hdd" # optional
Then lock it down:
chmod 600 .disk_sentinel.conf
sudo crontab -e
# add a line to run it every 10 mins:
*/10 * * * * /etc/bvl-automations/disk_sentinel.sh