Skip to content

Commit

Permalink
feature: 강의실 정보가 있는 경우 location을 icalender에 저장함
Browse files Browse the repository at this point in the history
  • Loading branch information
BasicNeural committed Aug 30, 2022
1 parent 2839574 commit b3e76d3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def get_calendar(self, timetable, start_date, end_date):
event.add('dtstart', parser.parse("%s %s" % (self.get_nearest_date(start_date, time["day"]), time["startAt"])))
event.add('dtend', parser.parse("%s %s" % (self.get_nearest_date(start_date, time["day"]), time["endAt"])))
event.add('rrule', {'freq': 'WEEKLY', 'until': parser.parse(end_date)})
if time["place"] != "":
event.add('location', time["place"])
cal.add_component(event)

f = open(os.path.join('', 'calendar.ics'), 'wb')
Expand Down

0 comments on commit b3e76d3

Please sign in to comment.