Skip to content

Commit

Permalink
Merge pull request #7 from BasicNeural/master
Browse files Browse the repository at this point in the history
data 필드에 place가 비어있지 않은 문자열인 경우 location을 icalender에 저장합니다.
  • Loading branch information
sookcha authored Sep 4, 2022
2 parents 2839574 + b3e76d3 commit a603ba2
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 a603ba2

Please sign in to comment.