Created
October 2, 2017 12:25
-
-
Save not7cd/0805f365717e72f6347c06677b2d57ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from icalendar import Calendar, Event | |
file_path = 'fizyka_techniczna.ics' | |
g = open(file_path,'rb') | |
cal = Calendar.from_ical(g.read()) | |
for component in cal.walk(): | |
if component.name == "VEVENT": | |
component['uid'] = '%s%s' % (component['uid'], component['dtstart']) | |
f = open('fixed_' + file_path, 'wb') | |
f.write(cal.to_ical()) | |
f.close() | |
g.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment