Skip to main content

Moodley CLI — Sync Moodle assignment deadlines to Google Calendar

Project description

Moodley CLI

Moodley is a cross-platform command-line tool that fetches assignments from LMS and VITOL and automatically creates corresponding events in Google Calendar.

⚠️ Note: This tool is specifically designed for VIT Chennai. The LMS and VITOL integrations are tailored for this college's systems and may not work with other institutions. If you want to use it with other Moodle-based sites, you can update the URLs in the BASE_URLS dictionary in the core.py file.

Credentials are securely stored using the system keyring, and Google OAuth handles calendar access.


Features

  • Fetch assignments from LMS and VITOL.
  • Automatically create Google Calendar events for assignment deadlines.
  • Secure credential storage via system keyring.
  • Cross-platform support: Windows, macOS, Linux.
  • Simple and intuitive CLI interface.

Installation

From PyPI (Recommended)

pip install moodley

From Source (Editable Mode)

git clone https://github.com/Faheem12005/moodley.git
cd moodley
pip install -e .

Setup

Before using Moodley:

  1. Obtain your credentials.json from the Google Cloud Console for the Calendar API.
  2. Run Moodley for the first time:
moodley
  1. Follow the prompts to enter your LMS, VITOL, and Google credentials.
  2. Credentials will be securely stored, and Google OAuth will generate token.json.

CLI Usage

moodley [OPTIONS]

Fetch Assignments and Sync with Google Calendar

Fetch assignments once from all sources:

moodley --check

Initialize Credentials and Google Calendar

moodley --init

This will guide you interactively to set your LMS/VITOL credentials and Google Calendar authentication.


Change Existing Credentials

moodley --change

Allows you to update LMS, VITOL, or Google Calendar credentials interactively.


Reset All Stored Credentials

moodley --reset

Deletes all saved credentials.


Activate Background Worker

moodley --activate FREQUENCY

Start the background worker to fetch assignments periodically. FREQUENCY is in seconds (minimum 60, default is 900).


Deactivate Background Worker

moodley --deactivate

Stop the background worker if running.


Check Background Worker Status

moodley --status

Project Structure

moodley/
├── moodley/              # Main package
│   ├── __init__.py
│   ├── main.py           # CLI entry point
│   ├── core.py           # Core logic
│   ├── api.py            # LMS/VITOL API interactions
│   ├── background.py     # Background job handling
│   ├── calendar_utils.py # Google Calendar helpers
│   ├── helpers.py        # Paths, logging, token handling
│   └── models.py         # Models for validating API requests
├── tests/                # Unit tests
├── pyproject.toml        # Build configuration
├── LICENSE               # MIT License
└── README.md             # Project description

Logging

Moodley logs runtime events automatically at:

  • Windows: %LOCALAPPDATA%\moodley\Logs\moodley.log
  • macOS: ~/Library/Application Support/moodley/Logs/moodley.log
  • Linux: ~/.local/share/moodley/Logs/moodley.log

License

This project is licensed under the MIT License. See LICENSE for details.

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

moodley-0.1.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

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

moodley-0.1.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for moodley-0.1.0.tar.gz
Algorithm Hash digest
SHA256 513670673664979f9775db71160b87f2c0d6590803b2920e6babaf2489af989a
MD5 431b83f661ecf64b55b2f914fea2b6a3
BLAKE2b-256 df3ae279adf975b0aab0c7509e1ef891fc3c50aa75733ee62a45de1d9861bd2c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for moodley-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c997cb909dfcf37264494d321f640a68dcc4a72b1e646cc90eece44dce34994f
MD5 8b48f8811a63ae3a5d6c396e0a66ddca
BLAKE2b-256 8d112cbe653c5a9d13532f9f77088badf061ef1af26d2875de8f5b5d3d023f11

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