CLI tool to sync ODTUClass (METU Moodle) course files to local disk
Project description
metuclass
CLI tool to sync ODTUClass course files to your local machine.
Downloads PDFs, slides, homeworks, and any other files from your enrolled courses. Tracks changes so subsequent syncs only download new or updated files.
Install
pip install metuclass
Requires Python 3.11+.
Quick start
# Log in with your METU credentials
metuclass login
# See your courses
metuclass courses
# Download everything
metuclass sync
Files are saved to ~/metuclass/ by default, organized by course and section:
~/metuclass/
CENG 334 Section 1/
Week 01 - Introduction/
slides.pdf
Week 02 - Processes/
slides.pdf
notes.pdf
CENG 596 Section 1/
General/
syllabus.pdf
...
Commands
metuclass login
Authenticate with your METU username and password. Stores a session token locally — you only need to do this once (or again if your password changes).
metuclass login
metuclass courses
List all your enrolled courses.
metuclass courses
metuclass ls <course>
Show files available in a course. You can use the course shortname or ID.
metuclass ls "CENG 334 Section 1"
metuclass ls 3100
metuclass sync [course]
Download new and updated files. Omit the course to sync all courses.
# Sync a specific course
metuclass sync "CENG 334 Section 1"
# Sync all courses
metuclass sync
# Preview what would be downloaded
metuclass sync --dry-run
# Overwrite locally modified files
metuclass sync --force
# Download to a specific directory
metuclass sync --sync-dir ~/Documents/courses
metuclass config [key] [value]
View or change configuration.
# Show all config
metuclass config
# Set sync directory
metuclass config sync.directory ~/Documents/courses
Configuration
Config is stored at ~/.config/metuclass/config.toml.
Sync directory
Where files are downloaded to (default: ~/metuclass). Set it with any of these (highest priority first):
--sync-dirflagMETUCLASS_SYNC_DIRenvironment variablemetuclass config sync.directory <path>
Environment variables
You can set these in a .env file (in your working directory or ~/.config/metuclass/.env):
METUCLASS_USERNAME=e123456
METUCLASS_PASSWORD=your_password
METUCLASS_SYNC_DIR=~/metuclass
When METUCLASS_USERNAME and METUCLASS_PASSWORD are set, metuclass login won't prompt for input — useful for automation.
How sync works
- Fetches the file list from ODTUClass for each course
- Compares against a local manifest (SQLite database) to find new/updated files
- Downloads changes concurrently, writing to temp files and renaming on success
- Files with local modifications are skipped as conflicts (use
--forceto overwrite)
Running metuclass sync a second time is a no-op if nothing changed on ODTUClass.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file metuclass-0.2.0.tar.gz.
File metadata
- Download URL: metuclass-0.2.0.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32dca2425de6d5ef16046dfc2727dd785ecc1a0f3885c43dc1645555c44a36a8
|
|
| MD5 |
d262d8eb0a48e17e935dcf7ad9d31714
|
|
| BLAKE2b-256 |
007316f374577b66321c2cdea0159c96caef7da2079347d35a02291d8849412b
|
File details
Details for the file metuclass-0.2.0-py3-none-any.whl.
File metadata
- Download URL: metuclass-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e974f018bf398cbb255d00f23ed570b9916fb5ff5cfbc0cd931265a9f38747f
|
|
| MD5 |
a51899d0e89565105c5d29ee6b4eb242
|
|
| BLAKE2b-256 |
52d14e25fa368112625632e9138cab18d66c586954436e66c11b0fe7dcf2a3cb
|