lhns / docker-untis-ical-server

0 stars 0 forks source link

any hints how to use? #1

Open Griesenb opened 6 years ago

Griesenb commented 6 years ago

Hi, could you provide a bit of information what I can do with your icalserver and how I get started? Thank you in advance.

lhns commented 6 years ago

Hi, this is just the docker image for LolHens/UntisIcalServer which is a little project I wrote to fetch data from the untis servers to upate a google calendar and to host an ical file. It is written in scala and if it is something you are interested in just go ahead and download/fork it. The src/main/resources/application.conf tells the server which classes to fetch (class id, teacher names, etc.). The setup for directly updating a google calendar is more complicated since you have to install an api key and autentication with google. If you want I can give you more information but I am not sure if this is really what you are looking after.

Griesenb commented 6 years ago

Hi, I totally missed the difference between LolHens/UntisIcalServer and docker-untis-ical-server and as I read it now it's obvious.

I'm looking for a way to give classes a way to get there timetables on their smartphones without the wonderful app and in best case get it synchronised. Untis seems not to interested in providing that service any more, because the app is easier to monetise.

Ical is the obvious way to go and with over 300 classes I don't want to do it by hand.

I'd like to test your code and am happy for any documentation I can get.

lhns commented 6 years ago

Yes this is indeed what the project is for. In addition to that I implemented a service that is autorized on a google account and actively modifies the events in a google calendar. It would of course also be possible to import the ical the application also hosts. This would provide an always up-to-date ical file that the google calendar syncs with. The problem with that approach is, that sometimes it takes a long time for google to poll a new ical file. this can take between 1 and 2 days from my experience which is just too long for a timetable to get synchronized. Therefore I also added that method. I will take a look at the shape of the project and clean up some things to make it easier to configure. I don't know if you intend to use the google stuff since it is a bit annoying to set up. You have to request an api key via the google developer console and do some other stuff to authenticate with google...

Griesenb commented 6 years ago

Sounds promising. I`ll probably skip the google part. Having hundreds up-to-date icals will get me a lot to play with. Where to import it and get it synced to seems to me at more moment like something to users can deal with.

lhns commented 6 years ago

Okay so I just published a new version (2.0.7). It will probably be easier to use the .sh.bat file, which should run under windows and linux. Just put an application.conf into the same folder, configure it and run it. It should automatically pull the events from untis and host them under localhost:8080/ical/schoolref/classref.ics The events should be synchronized every 30 seconds.

Griesenb commented 5 years ago

Thanks for the new Version and sorry for the late answer. The application.conf is not trivial for me.

Where do you get theses values from? Are defining down there every class and what lessons they have? I got ~70 teachers and over 300 classes and lessons. That seems to be a lot of work.

ref = "hnbk"**

"ber" = "Herr Bergmann" etc [...]

classes =
id = 301 // 183 ref = "fs15b" name = "FS-15B" lessons = { "it3" = {description = "Linux"} "aw1" = {description = "Webprogrammierung"} "förder" = {hidden = true} "sp" = {hidden = true}

lhns commented 5 years ago

The teachers need to be specified only once per school. So you would list those 70 teachers in the file only once. The classes all need to have an id, ref and name. You don't need to define all the lessons for each class. This feature is optional and is used to add some description to a lesson depending on the class. The id fields have to be retrieved from the urls of the untis web client. The ref fields specify under which url the finished ical calendar will be presented, so in this examle the url should be: "http://0.0.0.0/ical/hnbk/fs15b.ics".