diff --git a/gcalsync.py b/gcalsync.py index 70ce3fb..57af902 100644 --- a/gcalsync.py +++ b/gcalsync.py @@ -1,14 +1,15 @@ from src.date_period import DatePeriod from src.calendar import Calendar +import sys -def main(): +def main(clientCalendarId): twCalendar = Calendar("tw", "primary") - clientCalendarId = "" ## Put here the ID of your client calendar visible from your TW account - ## use twCalendar.printCalendars() to see all your calendars and find out this id. clientCalendar = Calendar("tw", clientCalendarId ) twCalendar.copyAllEventsFrom(clientCalendar, DatePeriod.weeks(1)) if __name__ == '__main__': - main() \ No newline at end of file + main(sys.argv[1]) + ## Pass as first an single argument the ID of your client calendar visible from your TW account + ## use twCalendar.printCalendars() to see all your calendars and find out this id. \ No newline at end of file