It should be possible to export a planned timetable to an iCal file.
To do this, we just need to convert the UQTP internal representation to an iCal file. If someone is able to write a function in Typescript (or even Javascript) to do this conversion, I can easily integrate it into the web app.
Specification
An example of the UQTP data can be found here: https://gist.github.com/kentonlam/313459732778dad2e4628bb554f4ad2a. Basically, the structure is a nested dictionary keyed by course, then class type, then class group. Each class's events for the semester are described in inner-most object.
The important properties are time, duration, startDate and weekPattern. time and duration are self-explanatory. weekPattern describes the weeks where that class runs. The first digit in weekPattern represents startDate and every later digit is one week after the previous date. Note: to do operations on dates, you should use date-fns since it is already imported. This provides a number of functions to work with JS dates (see its documentation).
All this function needs to do is take this and compute all the dates/times where a class runs. Then, take this list of dates and generate an iCal file. A useful library will be ical.js (example of calendar creation here). It might be somewhat difficult to use with TS because it lacks type declarations, but I'm not too concerned if the provided code is missing some types or uses "any" in some places.
To get started, you can basically create-react-app a new app and hardcode the sample JSON data. Of course, you could try to build and integrate it with UQTP directly but I expect this would be much more work.
It should be possible to export a planned timetable to an iCal file.
To do this, we just need to convert the UQTP internal representation to an iCal file. If someone is able to write a function in Typescript (or even Javascript) to do this conversion, I can easily integrate it into the web app.
Specification
An example of the UQTP data can be found here: https://gist.github.com/kentonlam/313459732778dad2e4628bb554f4ad2a. Basically, the structure is a nested dictionary keyed by course, then class type, then class group. Each class's events for the semester are described in inner-most object.
The important properties are time, duration, startDate and weekPattern. time and duration are self-explanatory. weekPattern describes the weeks where that class runs. The first digit in weekPattern represents startDate and every later digit is one week after the previous date. Note: to do operations on dates, you should use date-fns since it is already imported. This provides a number of functions to work with JS dates (see its documentation).
All this function needs to do is take this and compute all the dates/times where a class runs. Then, take this list of dates and generate an iCal file. A useful library will be ical.js (example of calendar creation here). It might be somewhat difficult to use with TS because it lacks type declarations, but I'm not too concerned if the provided code is missing some types or uses "any" in some places.
To get started, you can basically create-react-app a new app and hardcode the sample JSON data. Of course, you could try to build and integrate it with UQTP directly but I expect this would be much more work.