chiark
/
gitweb
/
~matthewv
/
gooswapper
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9d7a5bf
)
add option to ignore existing gcal_id links
author
Matthew Vernon
<mv3@sanger.ac.uk>
Tue, 23 Oct 2018 15:40:26 +0000
(16:40 +0100)
committer
Matthew Vernon
<mv3@sanger.ac.uk>
Tue, 23 Oct 2018 15:40:26 +0000
(16:40 +0100)
gooswapper.py
patch
|
blob
|
history
diff --git
a/gooswapper.py
b/gooswapper.py
index 9f4cefa271a7ff60e1ef96d04db36b070e419a98..89ec41e882609ac4c4025bfbb96e3e79714e1862 100644
(file)
--- a/
gooswapper.py
+++ b/
gooswapper.py
@@
-325,16
+325,17
@@
def update_ex_to_gcal(ex_acct,
body=gevent,
sendUpdates="none").execute()
body=gevent,
sendUpdates="none").execute()
-def match_ex_to_gcal(ex_acct,gcal_acct,gcal_tz,events,gcal_id="primary"):
+def match_ex_to_gcal(ex_acct,gcal_acct,gcal_tz,events,gcal_id="primary"
,ignore_link=True
):
recur = 0
matched = 0
skipped = 0
for ev_id in events:
event = get_ex_event_by_itemid(ex_acct.calendar,ev_id)
recur = 0
matched = 0
skipped = 0
for ev_id in events:
event = get_ex_event_by_itemid(ex_acct.calendar,ev_id)
- if event.is_recurring:
- recur += 1
- continue
- elif event.gcal_link is not None:
+# if event.is_recurring:
+# recur += 1
+# continue
+#next line needs to be elif if above uncommented
+ if event.gcal_link is not None and ignore_link is False:
skipped += 1
continue
matches = gcal_acct.events().list(calendarId=gcal_id,
skipped += 1
continue
matches = gcal_acct.events().list(calendarId=gcal_id,