How vuhnger/autofag works
Autofag watches UiO Studentweb courses, reports newly available places, and can enroll automatically. The user initializes a watchlist and notification channels, then runs or resumes a watcher; it checks course status, attempts enrollment when enabled, records outcomes, and dispatches notifications. The map includes browser authentication, Studentweb parsing, pacing, persistence, and notification delivery as supporting layers. Several runtime connections are only partially sampled, so those edges are marked unverified rather than asserted as directly evidenced.
Main entry points: app.py Service assembly · watcher.py Course watcher · session.py Studentweb session · enroller.py Auto-enrollment
Components 21
Setup and control
- CLI commands
src/autofag/cli.py - Watchlist setup
src/autofag/init_flow.py - Service assembly
src/autofag/app.py - Configuration
src/autofag/config.py
Studentweb access
- Browser login
src/autofag/auth/browser.py - Browser page
src/autofag/studentweb/page.py - Studentweb session
src/autofag/studentweb/session.py - Result parsing
src/autofag/studentweb/parsing.py - Status classifier
src/autofag/studentweb/status.py - UiO Studentweb
Watch and enroll
- Course watcher
src/autofag/watch/watcher.py - Auto-enrollment
src/autofag/watch/enroller.py - Check scheduling
src/autofag/watch/tempo.py - Domain models
src/autofag/models.py
State and pacing
- SQLite storage
src/autofag/storage/db.py - State repositories
src/autofag/storage/repos.py - Request pacing
src/autofag/transport/pace.py
Notifications
- Notification dispatcher
src/autofag/notify/dispatcher.py - Delivery channels
src/autofag/notify/channels.py - Notification services
Other components
- Student
Connections 26
- Student → CLI commands: runs commands
README.md - CLI commands → Watchlist setup: starts setup
README.md - CLI commands → Course watcher: resumes watch
README.md - Watchlist setup → Browser login: signs in
- Service assembly → Configuration: uses settings
src/autofag/app.py - Service assembly → Studentweb session: assembles
src/autofag/app.py - Service assembly → Browser page: wraps page
src/autofag/app.py - Service assembly → State repositories: creates stores
src/autofag/app.py - Browser login → Browser page: drives browser
src/autofag/auth/browser.py - Browser page → UiO Studentweb: requests pages
- Studentweb session → Browser page: searches and enrolls
src/autofag/studentweb/session.py - Studentweb session → Result parsing: parses responses
src/autofag/studentweb/session.py - Studentweb session → Status classifier: classifies rows
src/autofag/studentweb/session.py - Course watcher → Studentweb session: checks courses
src/autofag/watch/watcher.py - Course watcher → Auto-enrollment: attempts enrollment
src/autofag/watch/watcher.py - Course watcher → State repositories: loads watchlist
src/autofag/watch/watcher.py - Course watcher → Check scheduling: schedules checks
src/autofag/watch/watcher.py - Auto-enrollment → Studentweb session: submits enrollment
src/autofag/watch/enroller.py - Auto-enrollment → State repositories: checks ledger
src/autofag/watch/enroller.py - Course watcher → Notification dispatcher: dispatches alerts
src/autofag/watch/watcher.py - Auto-enrollment → Notification dispatcher: reports outcome
src/autofag/watch/enroller.py - Service assembly → Notification dispatcher: builds delivery
src/autofag/app.py - Notification dispatcher → Delivery channels: fans out
src/autofag/notify/dispatcher.py - Delivery channels → Notification services: sends notifications
- State repositories → SQLite storage: reads and writes
src/autofag/storage/repos.py - Service assembly → Request pacing: wraps requests
src/autofag/app.py