Added support for calendar working location events.

This commit is contained in:
Ross Scroggs
2023-08-16 19:26:03 -07:00
parent 03fd8c296d
commit 09581ae654
7 changed files with 148 additions and 14 deletions

View File

@@ -10,6 +10,12 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation.
### 6.63.00
Added support for calendar working location events.
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Calendars-Events#working-location-events
### 6.62.08
Added option `addcsvdata <FieldName> <String>` to these commands. This adds additional columns of data to the CSV file output

View File

@@ -329,7 +329,7 @@ writes the credentials into the file oauth2.txt.
admin@server:/Users/admin/bin/gamadv-xtd3$ rm -f /Users/admin/GAMConfig/oauth2.txt
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam version
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
GAMADV-XTD3 6.62.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.63.00 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.10.8 64-bit final
MacOS High Sierra 10.13.6 x86_64
@@ -969,7 +969,7 @@ writes the credentials into the file oauth2.txt.
C:\GAMADV-XTD3>del C:\GAMConfig\oauth2.txt
C:\GAMADV-XTD3>gam version
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
GAMADV-XTD3 6.62.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.63.00 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.11.4 64-bit final
Windows-10-10.0.17134 AMD64

View File

@@ -18,10 +18,14 @@
- [Empty calendar trash](#empty-calendar-trash)
- [Display calendar events](#display-calendar-events)
- [Update calendar event attendees](#update-calendar-event-attendees)
- [Working location events](#working-location-events)
- [Manage working location events](#manage-working-location-events)
- [Display working location events](#display-working-location-events)
## API documentation
* https://developers.google.com/calendar/v3/reference/events
* https://developers.google.com/calendar/v3/reference/events/import
* https://developers.google.com/calendar/api/guides/working-hours-and-location
## Definitions
* [`<UserTypeEntity>`](Collections-of-Users)
@@ -306,7 +310,11 @@
tentative|
(timezone <TimeZone>)|
(transparency opaque|transparent)|
(visibility default|public|private)
(visibility default|public|private)|
(workinglocation (home|
(custom <String>)|
(office <String> [building|buildingid <String>] [floor|floorname <String>]
[section|floorsection <String>] [desk|deskcode <String>])))
The following attributes are equivalent:
available - transparency transparent
@@ -682,3 +690,76 @@ option causes GAM to make two updates to the attendee list; the first removes th
the second adds the primary email.
The attendee changes are displayed but not processed unless `doit` is specified.
## Working location events
## Manage working location events
You can create and delete working location events; they can not be updated.
To update a working location event, delete the working location event and recreate it.
```
gam <UserTypeEntity> create workinglocation
(home|
(custom <String>)|
(office <String> [building|buildingid <String>] [floor|floorname <String>]
[section|floorsection <String>] [desk|deskcode <String>]))
((date yyyy-mm-dd)|
(range yyyy-mm-dd yyyy-mm-dd)|
(daily yyyy-mm-dd <Number>)|
(weekly yyyy-mm-dd <Number>)|
(timerange <Time> <Time>))+
gam <UserTypeEntity> delete workinglocation
((date yyyy-mm-dd)|
(range yyyy-mm-dd yyyy-mm-dd)|
(daily yyyy-mm-dd <Number>)|
(weekly yyyy-mm-dd <Number>)|
(timerange <Time> <Time>))+
```
Use one of `home`, `custom <String>` and `office <String>` to specify the working location event label.
Working location events are either single all day events or span a time range:
* `date yyyy-mm-dd` - A specific day
* `range yyyy-mm-dd yyyy-mm-dd` - Every day in the range
* `daily yyyy-mm-dd <Number>` - Every day starting on the date for `<Number>` total days
* `weekly yyyy-mm-dd <Number>` - A day per week starting on the date for `<Number>` total weeks
* `timerange <Time> <Time>` - A time range, may span multiple days
## Display working location events
```
gam <UserTypeEntity> show workinglocation
((date yyyy-mm-dd)|
(range yyyy-mm-dd yyyy-mm-dd)|
(daily yyyy-mm-dd <Number>)|
(weekly yyyy-mm-dd <Number>)|
(timerange <Time> <Time>))+
[showdayofweek]
[formatjson]
```
`showdayofweek` displays `dayOfWeek` when event start and end times are displayed.
By default, Gam displays the information as an indented list of keys and values.
* `formatjson` - Display the fields in JSON format.
```
gam <UserTypeEntity> print workinglocation
((date yyyy-mm-dd)|
(range yyyy-mm-dd yyyy-mm-dd)|
(daily yyyy-mm-dd <Number>)|
(weekly yyyy-mm-dd <Number>)|
(timerange <Time> <Time>))+
[showdayofweek]
[formatjson [quotechar <Character>]] [todrive <ToDriveAttribute>*]
```
`showdayofweek` displays columns `start.dayOfWeek` and `end.dayOfWeek` when event start and end times are displayed.
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format,
* `formatjson` - Display the fields in JSON format.
By default, Gam displays event details, use `countsonly` to display only the number of events. `formatjson` does not apply in this case.
By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
The `quotechar <Character>` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output.
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.

View File

@@ -3,7 +3,7 @@
Print the current version of Gam with details
```
gam version
GAMADV-XTD3 6.62.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.63.00 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.11.4 64-bit final
MacOS Monterey 12.6.6 x86_64
@@ -15,7 +15,7 @@ Time: 2023-06-02T21:10:00-07:00
Print the current version of Gam with details and time offset information
```
gam version timeoffset
GAMADV-XTD3 6.62.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.63.00 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.11.4 64-bit final
MacOS Monterey 12.6.6 x86_64
@@ -27,7 +27,7 @@ Your system time differs from www.googleapis.com by less than 1 second
Print the current version of Gam with extended details and SSL information
```
gam version extended
GAMADV-XTD3 6.62.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.63.00 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.11.4 64-bit final
MacOS Monterey 12.6.6 x86_64
@@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64
Path: /Users/Admin/bin/gamadv-xtd3
Version Check:
Current: 5.35.08
Latest: 6.62.08
Latest: 6.63.00
echo $?
1
```
@@ -72,7 +72,7 @@ echo $?
Print the current version number without details
```
gam version simple
6.62.08
6.63.00
```
In Linux/MacOS you can do:
```
@@ -82,7 +82,7 @@ echo $VER
Print the current version of Gam and address of this Wiki
```
gam help
GAM 6.62.08 - https://github.com/taers232c/GAMADV-XTD3
GAM 6.63.00 - https://github.com/taers232c/GAMADV-XTD3
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.11.4 64-bit final
MacOS Monterey 12.6.6 x86_64

View File

@@ -1622,7 +1622,11 @@ gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*]
tentative|
(timezone <TimeZone>)|
(transparency opaque|transparent)|
(visibility default|public|private)
(visibility default|public|private)|
(workinglocation (home|
(custom <String>)|
(office <String> [building|buildingid <String>] [floor|floorname <String>]
[section|floorsection <String>] [desk|deskcode <String>])))
The following attributes are equivalent:
available - transparency transparent
@@ -5655,6 +5659,43 @@ gam <UserTypeEntity> update calattendees <UserCalendarEntity> <EventEntity> [any
(updatestatus [<AttendeeAttendance>] [<AttendeeStatus>] <EmailAddress>)*
(updateentitystatus [<AttendeeAttendance>] [<AttendeeStatus>] <EmailAddressEntity>)*
Manage/Display Working Locations
gam <UserTypeEntity> create workinglocation
(home|
(custom <String>)|
(office <String> [building|buildingid <String>] [floor|floorname <String>]
[section|floorsection <String>] [desk|deskcode <String>]))
((date yyyy-mm-dd)|
(range yyyy-mm-dd yyyy-mm-dd)|
(daily yyyy-mm-dd <Number>)|
(weekly yyyy-mm-dd <Number>)|
(timerange <Time> <Time>))+
gam <UserTypeEntity> delete workinglocation
((date yyyy-mm-dd)|
(range yyyy-mm-dd yyyy-mm-dd)|
(daily yyyy-mm-dd <Number>)|
(weekly yyyy-mm-dd <Number>)|
(timerange <Time> <Time>))+
gam <UserTypeEntity> show workinglocation
((date yyyy-mm-dd)|
(range yyyy-mm-dd yyyy-mm-dd)|
(daily yyyy-mm-dd <Number>)|
(weekly yyyy-mm-dd <Number>)|
(timerange <Time> <Time>))+
[showdayofweek]
[formatjson]
gam <UserTypeEntity> print workinglocation
((date yyyy-mm-dd)|
(range yyyy-mm-dd yyyy-mm-dd)|
(daily yyyy-mm-dd <Number>)|
(weekly yyyy-mm-dd <Number>)|
(timerange <Time> <Time>))+
[showdayofweek]
[formatjson [quotechar <Character>]] [todrive <ToDriveAttribute>*]
# Users Chat
<ChatContent> ::=

View File

@@ -2,6 +2,12 @@
Merged GAM-Team version
6.63.00
Added support for calendar working location events.
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Calendars-Events#working-location-events
6.62.08
Added option `addcsvdata <FieldName> <String>` to these commands. This adds additional columns of data to the CSV file output

View File

@@ -47887,10 +47887,10 @@ def _showCalendarWorkingLocation(primaryEmail, calId, eventEntityType, event, k,
Ind.Decrement()
# gam <UserTypeEntity> create workinglocation
# home|
# custom <String>
# office <String> [building|buildingid <String>] [floor|floorname <String>]
# [section|floorsection <String>] [desk|deskcode <String>]
# (home|
# (custom <String>)|
# (office <String> [building|buildingid <String>] [floor|floorname <String>]
# [section|floorsection <String>] [desk|deskcode <String>]))
# ((date yyyy-mm-dd)|
# (range yyyy-mm-dd yyyy-mm-dd)|
# (daily yyyy-mm-dd N)|