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-1.0.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

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

moodley-1.0.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: moodley-1.0.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for moodley-1.0.0.tar.gz
Algorithm Hash digest
SHA256 38c3349ece8f5d63ce3873daa3c55a76d6eb1784964e6c325f8b637ff6d0a41c
MD5 7a596fcf6f4e2879634e79380c0a1701
BLAKE2b-256 55221a2e58cc4ecfbaca2a29b7160e4109d6218d6eecb420ada39110a28fea7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for moodley-1.0.0.tar.gz:

Publisher: release.yml on Faheem12005/moodley

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: moodley-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for moodley-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4066f514d52dc3f437ab89a170301f75e8c181704e2c765c1c26926b9bec20e2
MD5 a446a3c845174a65903123b4e14d00d0
BLAKE2b-256 e886f8b2e4cf9e21b8e63998b8fea6ac65e3fb9b10663dfdf23d3255313a3f7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for moodley-1.0.0-py3-none-any.whl:

Publisher: release.yml on Faheem12005/moodley

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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