Slack bot for the M2 channel. Each student records their thesis page count. Every Monday 12:00 JST the bot posts each person's page count and weekly change.
/thesis 42— record 42 as your current total page count./thesis— show your current page count.
Weekly report example:
*Thesis progress — 2026-10-12*
@alice: 42 pages (+8 this week)
@bob: 10 pages (new)
(new) means the user had no record 7 days before the report.
-
Go to https://api.slack.com/apps → Create New App → From a manifest. Select the lab workspace and paste
slack-manifest.yaml. -
Install App → install to the workspace. Copy the Bot User OAuth Token (
xoxb-...). -
Basic Information → App-Level Tokens → Generate Token and Scopes. Add the scope
connections:write. Copy the token (xapp-...). -
In Slack, open the M2 channel and run
/invite @thesis-bot. Get the channel ID: channel name → About (bottom of the dialog,C...). -
On the lab machine, install uv, then:
export SLACK_BOT_TOKEN=xoxb-... export SLACK_APP_TOKEN=xapp-... export SLACK_CHANNEL_ID=C... export DB_PATH=/path/to/thesis.db # optional, default ./thesis.db uv run thesis-bot
The process must keep running. If it is not running at Monday 12:00 (or within 1 hour after), that week's report is not posted.
uv run pytest
uv run ruff check .