Open jvdoorn opened 6 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
.
My latest commit fixes issue #41.
Alright, so I created a folder where custom scripts can be made. Currently they are used in two situations:
Not all schools have a delimiter of
-
for all their titles (see these examples).
Alright. So this special handling of appointment start and end times is starting to get a little out-of-scope of the main functionality of the program and 'bloated'.
Some things that need to be done now are the following:
Confirm nothing got broken for the following schools:
[ ] dspierson
[x] zwin
Create documentation on how to extend the scripts.
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.
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.
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.
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.
Please wait with merging until #43 has been resolved.
Any update?
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:
The
titles.json
file can easily be extended to include different abbreviations/names. The structure of the file should be pretty self-explanatory.