lesander / magister-calendar

:date: Automatically plan your Magister appointments in your Google calendar.
https://git.io/magister
MIT License
11 stars 6 forks source link

Improvements (titles and school adress), correct end times for my school and fixed #41 #39

Open jvdoorn opened 6 years ago

jvdoorn commented 6 years ago

My school's Magister uses abbreviations such as "netl" for "Nederlands(e taal)" which were annoying me to be honest... so I extended your script to check if we have a replacement title for it, par example it looks up "netl" in the titles.json file and fetches the proper title which is "Nederlands", if it can't be found it just uses "netl".

The result: screen shot 2018-08-22 at 10 21 17

The titles.json file can easily be extended to include different abbreviations/names. The structure of the file should be pretty self-explanatory.

jvdoorn commented 5 years ago

Alright, what I did is add a small piece of code that allows you to add your school's address. Why is this useful? Well, my phone will now tell me when it's time to leave (Apple does this automatically if there is a location included in the event).

The way the location is formatted as following now:

Lokaal XXX
Straat 10, 1234 AA Amsterdam, Nederland

It might be that in order for it to work properly you need to update the string a bit in the config.json (par example replacing the , with \n.

jvdoorn commented 5 years ago

My latest commit fixes issue #41.

jvdoorn commented 5 years ago

Alright, so I created a folder where custom scripts can be made. Currently they are used in two situations:

Some things that need to be done now are the following:

jvdoorn commented 5 years ago

On a side note if anyone from Zwin College ever comes across this - please confirm that the break times for the lower classes are handled properly as well, they should be, but not sure.

jvdoorn commented 5 years ago

Alright, to fix your last change request I updated the way the address works. You can now select a default address and add exceptions to it either based on title or location. You also have the possibility to completely disable it.

jvdoorn commented 5 years ago

I added some documentation to README.md on how to configure the address and custom scripts. This PR is ready for a review again @lesander.

jvdoorn commented 5 years ago

A while back I started getting authentication errors. Turn out Magister changed the way you are authenticated so magister.js had to be updated. In my 4 last commits I updated magister.js and adapted MagisterCalendar to work with the changes.

When you start using these changes please make sure everything is still working as expected. A lot of variables have been renamed in magister.js and functions changed to properties. If you encounter any problems please let me know and I'll take a look at them.

jvdoorn commented 5 years ago

Please wait with merging until #43 has been resolved.

jvdoorn commented 5 years ago

43 Has been fixed as far as I know. This pull request is ready to be merged (again).

ChrisvanChip commented 3 years ago

Any update?