17 Home
Hannes Braun edited this page 3 months ago

Welcome to the "TheCitadelofRicks" wiki!

"TheCitadelofRicks" (tcor for short) is an API for timetable and mensa data of the HS Offenburg. It's built with Spring and Kotlin.

tcor currently provides 3 request options. /courseList which will return an array "courses" with all currently available courses at the HS Offenburg, /timetable?courseName={coursename}&week={week} which will return a given weeks timetable for a given course and /mensamenu which will return the menu of the mensa for the current and next week.

Since software version 1.2.0 tcor supports cachet api reporting.

Just as a side note, if you ever wonder why lessons are calld lessons and not lectures, it's to be in line with the offical hs timetable naming schema.

Build

To run the project do ./gradlew bootRun. If you want to build a jar use ./gradlew bootJar.

Install/Configuration

Tcor will create a ".tcor" folder on first startup in the users home directory. In there is a folder containing the cached timetable data and a "config.xml" file. Via the config file it is possible to set a swfr mensa url and name, as well as the cachet base url and the cachet api key.

Here is an example of the config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>tcor configuration</comment>
<entry key="cachetBaseURL">https://status.mosad.xyz</entry>
<entry key="mensaMenuURL">https://www.swfr.de/essen-trinken/speiseplaene/mensa-offenburg/</entry>
<entry key="cachetAPIKey">0</entry>
<entry key="mensaName">Offenburg</entry>
</properties>

Docker

To build tcor as docker image, execute docker build -t tcor:latest . If the build was successful,
you can run tcor via docker run -v {path-to-the-tcor-folder}:/tcor -p 8080:8080 tcor. You can also use the tcor docker image from dockerhub, see https://hub.docker.com/r/mosadxyz/tcor.

For the docker image to work properly you need to copy a java keystore into the tcor folder (right besides the config.xml file). Also make sure the file is named "cacerts".

Docker Compose

version: "3"  
services:  
    tcor:  
      image: mosadxyz/tcor:latest
      restart: always
      ports:
       - 8080:8080  
      volumes:  
        - {path-to-the-tcor-folder}:/tcor

Libraries