Skip to main content

BUAA Boya WebVPN CLI for course cache, autonomous-sign course automation, and check-in/out workflows

Project description

AutoBoya

PyPI Python License Stars Last Commit

Python CLI for BUAA Boya course viewing and guarded automation through WebVPN.

AutoBoya can cache Boya course data, display selected courses and statistics, preview autonomous-sign course candidates, and run a local scheduler for automatic course selection, check-in, and check-out.

Quickstart

# 1) Install from PyPI
pip install autoboya

# 2) Initialize local state under ~/.autoboya
autoboya init

# 3) Add a BUAA account. The password is stored in the system keyring when possible.
autoboya user add 223xxxxx --password-stdin

# 4) Login through WebVPN. Type the CAPTCHA shown by the CLI when prompted.
autoboya login 223xxxxx

# 5) Refresh course cache and inspect candidates.
autoboya courses refresh
autoboya courses list --only-selectable
autoboya courses auto-preview

# 6) Run one automation pass for debugging, or keep the scheduler running.
autoboya run-once
autoboya run
autoboya stop

PATH Notes

If autoboya is not found after installation, use Python's module entry point first:

python -m autoboya --help

Then add the user script directory to your shell PATH.

macOS / Linux:

python -m pip install --user autoboya
echo 'export PATH="$(python3 -m site --user-base)/bin:$PATH"' >> ~/.zprofile

Windows PowerShell:

py -m pip install --user autoboya
$d = py -c "import sysconfig; print(sysconfig.get_path('scripts','nt_user'))"; [Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path","User") + ";" + $d, "User")

Command Reference

General:

autoboya -h
autoboya --help
autoboya version
autoboya init
autoboya doctor

Users and login:

autoboya user add <username> --password-stdin
autoboya user add <username> --unsafe-store-password
autoboya user list
autoboya user remove <username>
autoboya login <username>

Courses and cache:

autoboya courses refresh
autoboya courses refresh --user <username>
autoboya courses list
autoboya courses list --only-selectable
autoboya courses list --json
autoboya courses show <course_id>
autoboya courses show <course_id> --json
autoboya courses auto-preview
autoboya courses auto-preview --json

autoboya courses refresh fetches the full paginated course list once and refreshes selected-course/statistics caches for every enabled user. Use --user to refresh selected-course/statistics caches for only one user.

Selected courses and statistics:

autoboya selected
autoboya selected --user <username>
autoboya selected --json
autoboya stats
autoboya stats --user <username>
autoboya stats --json

Automation:

autoboya run
autoboya run-once
autoboya stop

Manual operations:

autoboya select <course_id> --user <username> --yes
autoboya select <course_id> --all-users --yes
autoboya drop <course_id> --user <username> --yes
autoboya drop <course_id> --all-users --yes
autoboya sign <course_id> --user <username>
autoboya sign <course_id> --all-users
autoboya signout <course_id> --user <username>
autoboya signout <course_id> --all-users

sign and signout require the course to already be selected. Use select first, then sign during the configured sign window. drop accepts a course ID and refreshes the selected-course cache after a successful drop.

Diagnostics:

autoboya logs tail
autoboya logs tail --lines 200

Every command and command group accepts both -h and --help.

Automation Policy

AutoBoya does not select every selectable course. The daemon only auto-selects cached courses that are currently selectable, whose sign method is 自主签到, derived from a non-empty courseSignConfig.signPointList, and whose category is not 其他方面. Courses with 常规签到, no location sign config, or category 其他方面 are skipped. Use autoboya courses auto-preview to inspect the courses that would be selected before running the daemon.

CAPTCHA handling follows UBAA: the CLI fetches the SSO CAPTCHA image and asks the operator to type the code. It does not OCR or bypass CAPTCHA.

State is stored under ~/.autoboya: users, settings, cache, logs, run files, CAPTCHA images, and session metadata.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autoboya-0.1.0.tar.gz (34.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autoboya-0.1.0-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

Details for the file autoboya-0.1.0.tar.gz.

File metadata

  • Download URL: autoboya-0.1.0.tar.gz
  • Upload date:
  • Size: 34.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for autoboya-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7d535d423ad2f23f2f48c36e0d5aa00ac60f0dde485942ef1e4e71470a45e99c
MD5 32fe191a88d1f2ee07cca620b18358d1
BLAKE2b-256 381dc65462bbb46b6c2f1439950442e6059e049435ef9fda1987e530544d0c6e

See more details on using hashes here.

File details

Details for the file autoboya-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: autoboya-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for autoboya-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7991b24b3b6192f76aef420cab4743324a7ce350b0222ca6e3e6431a88e89705
MD5 7f751a6edc536b28797eb0418435776d
BLAKE2b-256 38643932ece19d5a71eaa4e1e6662912a0b475456f6e7e0f0fea358ab5f2fea0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page