forked from huanlui/gcalsync
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make source calendar a command argument
- Loading branch information
Showing
1 changed file
with
5 additions
and
4 deletions.
There are no files selected for viewing
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
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. |