Automated roll-call answering bot for Xiamen University TronClass platform (lnt.xmu.edu.cn), running 24/7 on a Linux server. The answering logic is based on XMU-Rollcall-Bot; this repo provides a 24/7 server polling wrapper.
- Number roll-call: Waits until at least 10 classmates have signed in, then automatically fetches the number code and submits. Keeps waiting (non-stop) until the threshold is met; gives up gracefully if the roll-call disappears from the list.
- Radar roll-call: Uses a two-probe trilateration method — submits two probe coordinates, reads the reported distances from the server, computes the intersection of two circles, and answers with the solved position.
- QR-code roll-call: Cannot be automated. Sends a ServerChan (WeChat push) reminder so you can scan it manually.
- WeChat notifications: Every result is pushed via ServerChan.
- Multi-account: Run one copy of the script per account, each with its own config directory (set via
XMU_ROLLCALL_CONFIG_DIR). - Survivability: Runs as a systemd service with
Restart=always; cached sessions are reused and re-login happens automatically on expiry.
- Install Python 3.x and
pip install requests. - Create a config file:
mkdir -p /root/.xmu_rollcall
cat > /root/.xmu_rollcall/config.json << 'EOF'
{
"username": "your_student_id",
"password": "your_password",
"sendkey": "your_ServerChan_SendKey"
}
EOF- Install as a systemd service (
/etc/systemd/system/xmu-signin.service):
[Unit]
Description=XMU Rollcall Auto Sign-in Service
After=network-online.target
[Service]
ExecStart=/usr/bin/python3 /root/xmu_signin.py
Restart=always
[Install]
WantedBy=multi-user.targetsystemctl enable --now xmu-signin
The core roll-call answering logic (radar trilateration, number-code handling, etc.) is largely based on KrsMt-0113/XMU-Rollcall-Bot. This project mainly contributes a server-side 24/7 polling deployment script around it.
All credentials (student ID, password, ServerChan key) live in config.json, which is excluded from this repository via .gitignore. The script itself contains no secrets.