|
1 | | -# WebUntis Timetable ICS Exporter |
| 1 | +# ICS-WebUntis |
2 | 2 |
|
3 | | -A Node.js/TypeScript service that generates ICS calendar files from WebUntis timetables. |
| 3 | +ICS-WebUntis is a lightweight service that exports timetables from [WebUntis](https://www.untis.at/) as `.ics` calendar feeds. |
| 4 | +It is designed for reliability, minimal resource usage, and straightforward deployment via Docker. |
4 | 5 |
|
5 | 6 | ## Features |
6 | 7 |
|
7 | | -- Generates `.ics` calendar files for multiple users. |
8 | | -- Supports caching for improved performance. |
9 | | -- Configurable via `config.json` or environment variables. |
10 | | -- Works in development (`ts-node`) and production (Docker). |
| 8 | +- Fetch timetables directly from WebUntis |
| 9 | +- Expose an `.ics` calendar endpoint for integration with any calendar client |
| 10 | +- Built-in caching to reduce load on WebUntis |
| 11 | +- Single-container deployment with Docker |
| 12 | +- Strictly validated configuration |
| 13 | +- Multiple Users supported |
11 | 14 |
|
12 | | -## Getting Started |
| 15 | +## Quick Start |
13 | 16 |
|
14 | | -### Development |
| 17 | +### Run with Docker Compose |
15 | 18 |
|
16 | 19 | ```bash |
17 | | -git clone https://github.com/NLion74/ics-webuntis.git |
18 | | -cd ics-webuntis |
19 | | -docker-compose -f dev-docker-compose.yml up |
| 20 | +version: "3.3" |
| 21 | + |
| 22 | +services: |
| 23 | + webuntis-timetable: |
| 24 | + image: nlion/ics-webuntis:latest |
| 25 | + container_name: webuntis-timetable |
| 26 | + environment: |
| 27 | + - NODE_ENV=production |
| 28 | + - PORT=7464 |
| 29 | + - CONFIG_FILE=/app/config.json |
| 30 | + volumes: |
| 31 | + - ./dev-config.json:/app/config.json:ro |
| 32 | + ports: |
| 33 | + - "7464:7464" |
| 34 | + restart: unless-stopped |
| 35 | + |
| 36 | +``` |
| 37 | + |
| 38 | +Start it with 'docker-compose up' |
| 39 | + |
| 40 | +This will fail without a 'config.json' |
| 41 | + |
| 42 | +## Configuration |
| 43 | + |
| 44 | +The service requires a JSON configuration file. |
| 45 | +`config.json` example |
| 46 | + |
| 47 | +``` |
| 48 | +{ |
| 49 | + "daysBefore": 7, |
| 50 | + "daysAfter": 14, |
| 51 | + "cacheDuration": 300, |
| 52 | + "users": [ |
| 53 | + { |
| 54 | + "school": "myschool", |
| 55 | + "username": "student1", |
| 56 | + "password": "secret", |
| 57 | + "baseurl": "https://mese.webuntis.com/WebUntis/", |
| 58 | + "friendlyName": "student1" |
| 59 | + } |
| 60 | + ] |
| 61 | +} |
20 | 62 | ``` |
| 63 | + |
| 64 | +## Usage |
| 65 | + |
| 66 | +Once running, the service exposes an `.ics` feed: |
| 67 | + |
| 68 | +``` |
| 69 | +http://<host>:7464/timetable/friendlyName.ics |
| 70 | +
|
| 71 | +``` |
| 72 | + |
| 73 | +friendlyName represents the one specified in the user configuration. This link can be subscribed to any calendar client and just works out of the box. |
| 74 | + |
| 75 | +## Contributing |
| 76 | + |
| 77 | +Feel free to contribute at any time! If so either create an issue to discuss your changes first or just open a Pull Request if you prefer. |
0 commit comments