Skip to main content

Library to check if courses are available.

Project description

Course Watcher Module for ILIAS

This README is outdated...

This is an unoffial Application. It is not associated with the ILIAS project.

This library let's you query your ILIAS instance in some specific ways described in the task types section.

Usage

Because I hate argparse, getopt and the likes and because a command might get pretty complicated otherwise, you only need to specify exactly one argument:

The path of the [config file]{#configuration}. Alternatively - can be specified to read the config file from stdin.

# Setup needed before!
./icw config.json

This programm does not (yet?) have any daemon capabilities. It conceived to be run regularly by another tool such as cron or systemd timers.

Example configurations are provided in ilias-course-watcher.service + ilias-course-watcher.timer and ilias-course-watcher.crontab.

Setup

pypi.org (Recommended)

pip install --user ilias-course-watcher

Manual

# Install poetry using your package manager and then run:
poetry install
poetry build
pip install --user dist/*.tar.gz
# This will install all needed dependencies in a virtual environment
#
### You could also install the dependencies specified in the
### pyproject.toml yourself (maybe also in a virtual environment)
### and run CourseWatcher.py directly. There's no need to use poetry.

Systemd timer

./install-systemd-user-config.sh

Configuration

The configuration is specified in JSON format. A template can be found in template-config.json.

Always specified need to be the fields:

  • "Domain": string
  • "Username": string
  • "Password": string
  • "Tasks": list of tasks
{
	"Domain": "https://www.studon.fau.de",
	"Username": "my-username",
	"Password": "my-password",
	"Tasks": [
		... See Task Types ...
	]
}

Task Types

There are 3 different task types serving each a different function.

Search Entry (search_entry)

A category search searches in a given Category page for entries containing the given search string (case-insensitive).

{
	"type": "search_entry",
	"search_object": "crs123456",
	"search_string": "WS 2023",
	"success_command": "notify-send"
}

The search_object can optionally include a .html-suffix.

The success_command is executed if the search_string was found in the title of one of the entries of the specified category, course or fold.

Search Update (search_update)

An update search remembers the contents of a category, course or fold page (if the search has been run before) and compares them to the current contents.

A history of past contents is saved in the cached files.

A cache directory can optionally be specified. By default the XDG Cache Directory is used (~/.cache/ilias-course-watcher by default).

{
	"type": "search_update",
	"search_object": "fold123456.html",
	"cache_dir": "~/.ilias-course-watcher",
	"success_command": "command ls -1 -c ~/.ilias-course-watcher/fold123456.icw* | head -n 2 | tac | xargs diff"
}

The success_command is executed if an update has been detected. The command pipeline in the example above prints the name of the files containing the up-to-date contents and the previous contents respectively. This output is then piped to xargs, which in turn then runs diff providing these two files as parameters. Other possible may include sending emails for example.

Queue Availability (queue)

The queue task is not yet implemented. It should in the future monitor a queue to a course, running the success command if the course is open for sign-up and maybe even try to sign up by itself.

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

iliascw-0.2.0.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

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

iliascw-0.2.0-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file iliascw-0.2.0.tar.gz.

File metadata

  • Download URL: iliascw-0.2.0.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for iliascw-0.2.0.tar.gz
Algorithm Hash digest
SHA256 42811329bb426f33d51afefa13f33aa91d7f19fe9e92b0b0ebb478aa9a617ced
MD5 a39873bc34a6e2da63d0db9c6539c470
BLAKE2b-256 c0dd69e499dda423982d93c75ad415bc2b9fe535a9ac3eef0bfc008b2e8dbe57

See more details on using hashes here.

File details

Details for the file iliascw-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: iliascw-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for iliascw-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fea3dca155a6ee05d9188c134a011cc95d1e963e973f13c8c73aa8122d88a228
MD5 053633eb9a972cf31bb4dfd0d851fcdb
BLAKE2b-256 ff05778a7327984f45c5a0cb21832bf2cc82f5e14c289af580d7e18a287f77f8

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