This repository has been archived by the owner on Feb 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathREADME
74 lines (51 loc) · 2.68 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
OSG-Software Google Calendar Triage assignment tool
First-time Setup:
$ ./setup.sh # set up venv and authenticate via web browser
Usage:
$ ./osg-triage [ACTION] [OPTIONS]
$ ./osg-triage --help
Where ACTION can be one of: list, assign, delete, load, generate,
generateFrom, generateRotation, or generateNextRotation.
An ACTION may also be specified with a leading "--" (eg, --list)
Typical Use:
$ ./osg-triage list | tail
$ ./osg-triage generateNextRotation > list.txt
$ ./osg-triage load list.txt
Other Examples:
$ ./osg-triage list --calendarId primary # use personal google calendar
$ ./osg-triage list --minDate 2014-03-01 --maxDate 2014-04-20
$ ./osg-triage assign 2014-07-28 "James Kirk"
$ ./osg-triage delete 2014-07-28
$ ./osg-triage delete ALL --minDate 2014-07-01 --maxDate 2014-08-01
$ ./osg-triage generateNextRotation | ./osg-triage load -
---
Notes:
The first time you run ./setup.sh, the script will have to authenticate with
google -- it will try to open a browser for this, otherwise you can use the
link it prints out manually. Once this is done, a file named "calendar.dat"
will be written, containing authentication data. After this, you should be
able to run the script non-interactively, ie, without browser assistance.
To force re-authentication, just remove "calendar.dat" .
There is also a "client_secrets.json", which google says you should keep
private, but in this case I think it's only the calendar.dat file that has
auth data for your google user, and I don't believe it's necessary to keep
the "client_secret" value in client_secrets.json a secret. If at some point
we want to secure it though, project owners can make a new one and project
members can get it from here:
https://console.developers.google.com/project/820929912154/apiui/credential
If you want to be added to the project, contact [email protected], who can
set you up. As I understand it though, what you really need is not to be a
member of the project, but to have access to the OSG Software calendar.
If you need write access to that, contact [email protected] .
Note also that even without write access to the OSG Software calendar, you
can use this tool to manage triage assignments on your own personal calendar
by specifying "--calendarId primary" .
---
Links:
Cloud Console OAuth 2.0 settings for this project:
https://cloud.google.com/console#/project/820929912154/apiui
Google API Python Client Library documentation:
https://developers.google.com/api-client-library/python/start/get_started
More on Calendar API:
https://developers.google.com/google-apps/calendar/firstapp
https://developers.google.com/resources/api-libraries/documentation/calendar/v3/python/latest/