New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timetable import and export feature #55
Timetable import and export feature #55
Conversation
…elp us parse .ics files.
… work. Instructions on biweekly's git not clear for noob. Not sure what I am doing here. Not enough handholding.
…so Created function for export in IcsUtil. Also created additional functions in TimeSlot and TimeTable classes to get some of their data easily.
-Can now export the timetable, but the format of the exported .ics file is incomplete and broken! :(
Export function now works, and can be imported back it after being exported! :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Quite amazing that you managed to migrate over to the new library in just a few days. Also, it looks like my concerns of not having enough lines of code to write isn't really a concern.
* 2) Also used during import and export commands (ie, read and write) | ||
* | ||
* NOTE: Only support ICS to-and-from TimeTable Objects(!!). | ||
* TODO: allow conversion to objects other than timetable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I don't think there's a need to convert anything else to .ics format...
What other things were you thinking about?
* | ||
* NOTE: Only support ICS to-and-from TimeTable Objects(!!). | ||
* TODO: allow conversion to objects other than timetable | ||
* TODO: create a 'serialisable' class to serialise(?) the timetable objects to ics file formats |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think "serializable" actually has any special meaning lol, so I don't think this is necessary
private static IcsUtil instance; | ||
|
||
private IcsUtil(){ | ||
//any things to initialise? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not
LocalTime timeSlotEndTime = timeStringToLocalTime(timeEndStr); | ||
DayOfWeek timeSlotDay = dateStringToDayOfWeek(dateStartStr); | ||
|
||
System.out.println(timeSlotStartTime + " to " + timeSlotEndTime + " on " + timeSlotDay + ": " + summaryStr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to remove this xd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah of course XD oops.
NOTE: I changed build.gradle to have an extra dependency: biweekly. This has not been reflected in UG/DG/docs yet.