Skip to content

Commit

Permalink
Make source calendar a command argument
Browse files Browse the repository at this point in the history
  • Loading branch information
huanlui committed Jun 9, 2021
1 parent c933ad3 commit 92f67d6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gcalsync.py
Original file line number Diff line number Diff line change
@@ -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()
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.

0 comments on commit 92f67d6

Please sign in to comment.