Added matchfield organizerself <Boolean> to <EventMatchProperty>

This commit is contained in:
Ross Scroggs
2023-10-03 08:34:37 -07:00
parent 0e0d45322e
commit 7f79bf0e87
8 changed files with 49 additions and 10 deletions

View File

@@ -185,6 +185,7 @@ Client access works when accessing Resource calendars.
(matchfield location <RegularExpression>)| (matchfield location <RegularExpression>)|
(matchfield organizeremail <RegularExpression>)| (matchfield organizeremail <RegularExpression>)|
(matchfield organizername <RegularExpression>)| (matchfield organizername <RegularExpression>)|
(matchfield organizerself <Boolean>)|
(matchfield status <RegularExpression>)| (matchfield status <RegularExpression>)|
(matchfield summary <RegularExpression>)| (matchfield summary <RegularExpression>)|
(matchfield transparency <RegularExpression>)| (matchfield transparency <RegularExpression>)|

View File

@@ -10,6 +10,21 @@ 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. See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation.
### 6.64.05
Added `matchfield organizerself <Boolean>` to `<EventMatchProperty>` to simplify selecting events
where the user in the following commands is/is not the organizer of the event.
```
gam <UserTypeEntity> update events <UserCalendarEntity> [<EventEntity>]
gam <UserTypeEntity> delete events <UserCalendarEntity> [<EventEntity>]
gam <UserTypeEntity> purge events <UserCalendarEntity> [<EventEntity>]
gam <UserTypeEntity> move events <UserCalendarEntity> [<EventEntity>]
gam <UserTypeEntity> info events <UserCalendarEntity> [<EventEntity>]
gam <UserTypeEntity> show events <UserCalendarEntity> [<EventEntity>]
gam <UserTypeEntity> print events <UserCalendarEntity> [<EventEntity>]
gam <UserTypeEntity> update calattendees <UserCalendarEntity> <EventEntity>
```
### 6.64.04 ### 6.64.04
Updated `gam calendars <CalendarEntity> move events` and `gam <UserTypeEntity> move events <UserCalendarEntity>` Updated `gam calendars <CalendarEntity> move events` and `gam <UserTypeEntity> move events <UserCalendarEntity>`

View File

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

View File

@@ -250,6 +250,7 @@
(matchfield location <RegularExpression>)| (matchfield location <RegularExpression>)|
(matchfield organizeremail <RegularExpression>)| (matchfield organizeremail <RegularExpression>)|
(matchfield organizername <RegularExpression>)| (matchfield organizername <RegularExpression>)|
(matchfield organizerself <Boolean>)|
(matchfield status <RegularExpression>)| (matchfield status <RegularExpression>)|
(matchfield summary <RegularExpression>)| (matchfield summary <RegularExpression>)|
(matchfield transparency <RegularExpression>)| (matchfield transparency <RegularExpression>)|

View File

@@ -3,7 +3,7 @@
Print the current version of Gam with details Print the current version of Gam with details
``` ```
gam version gam version
GAMADV-XTD3 6.64.04 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource GAMADV-XTD3 6.64.05 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.11.5 64-bit final Python 3.11.5 64-bit final
MacOS Monterey 12.6.6 x86_64 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 Print the current version of Gam with details and time offset information
``` ```
gam version timeoffset gam version timeoffset
GAMADV-XTD3 6.64.04 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource GAMADV-XTD3 6.64.05 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.11.5 64-bit final Python 3.11.5 64-bit final
MacOS Monterey 12.6.6 x86_64 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 Print the current version of Gam with extended details and SSL information
``` ```
gam version extended gam version extended
GAMADV-XTD3 6.64.04 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource GAMADV-XTD3 6.64.05 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.11.5 64-bit final Python 3.11.5 64-bit final
MacOS Monterey 12.6.6 x86_64 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 Path: /Users/Admin/bin/gamadv-xtd3
Version Check: Version Check:
Current: 5.35.08 Current: 5.35.08
Latest: 6.64.04 Latest: 6.64.05
echo $? echo $?
1 1
``` ```
@@ -72,7 +72,7 @@ echo $?
Print the current version number without details Print the current version number without details
``` ```
gam version simple gam version simple
6.64.04 6.64.05
``` ```
In Linux/MacOS you can do: In Linux/MacOS you can do:
``` ```
@@ -82,7 +82,7 @@ echo $VER
Print the current version of Gam and address of this Wiki Print the current version of Gam and address of this Wiki
``` ```
gam help gam help
GAM 6.64.04 - https://github.com/taers232c/GAMADV-XTD3 GAM 6.64.05 - https://github.com/taers232c/GAMADV-XTD3
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.11.5 64-bit final Python 3.11.5 64-bit final
MacOS Monterey 12.6.6 x86_64 MacOS Monterey 12.6.6 x86_64

View File

@@ -1575,6 +1575,7 @@ gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*]
(matchfield location <RegularExpression>)| (matchfield location <RegularExpression>)|
(matchfield organizeremail <RegularExpression>)| (matchfield organizeremail <RegularExpression>)|
(matchfield organizername <RegularExpression>)| (matchfield organizername <RegularExpression>)|
(matchfield organizerself <Boolean>)|
(matchfield status <RegularExpression>)| (matchfield status <RegularExpression>)|
(matchfield summary <RegularExpression>)| (matchfield summary <RegularExpression>)|
(matchfield transparency <RegularExpression>)| (matchfield transparency <RegularExpression>)|
@@ -5655,7 +5656,7 @@ gam <UserTypeEntity> show events <UserCalendarEntity> [<EventEntity>] <EventDisp
[fields <EventFieldNameList>] [showdayofweek] [fields <EventFieldNameList>] [showdayofweek]
[countsonly] [countsonly]
[formatjson] [formatjson]
gam <UserTypeEntity> print events <UserCalendarEntity> [<EventtEntity>] <EventDisplayProperty>* gam <UserTypeEntity> print events <UserCalendarEntity> [<EventEntity>] <EventDisplayProperty>*
[fields <EventFieldNameList>] [showdayofweek] [fields <EventFieldNameList>] [showdayofweek]
[countsonly] [countsonly]
[formatjson [quotechar <Character>]] [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]] [todrive <ToDriveAttribute>*]

View File

@@ -1,3 +1,18 @@
6.64.05
Added `matchfield organizerself <Boolean>` to `<EventMatchProperty>` to simplify selecting events
where the user in the following commands is/is not the organizer of the event.
```
gam <UserTypeEntity> update events <UserCalendarEntity> [<EventEntity>]
gam <UserTypeEntity> delete events <UserCalendarEntity> [<EventEntity>]
gam <UserTypeEntity> purge events <UserCalendarEntity> [<EventEntity>]
gam <UserTypeEntity> move events <UserCalendarEntity> [<EventEntity>]
gam <UserTypeEntity> info events <UserCalendarEntity> [<EventEntity>]
gam <UserTypeEntity> show events <UserCalendarEntity> [<EventEntity>]
gam <UserTypeEntity> print events <UserCalendarEntity> [<EventEntity>]
gam <UserTypeEntity> update calattendees <UserCalendarEntity> <EventEntity>
```
7.00.00 7.00.00
Merged GAM-Team version Merged GAM-Team version

View File

@@ -35178,8 +35178,10 @@ LIST_EVENTS_MATCH_FIELDS = {
'creatoremail': ['creator', 'email'], 'creatoremail': ['creator', 'email'],
'organizername': ['organizer', 'displayName'], 'organizername': ['organizer', 'displayName'],
'organizeremail': ['organizer', 'email'], 'organizeremail': ['organizer', 'email'],
'organizerself': ['organizer', 'self'],
'organisername': ['organizer', 'displayName'], 'organisername': ['organizer', 'displayName'],
'organiseremail': ['organizer', 'email'], 'organiseremail': ['organizer', 'email'],
'organiserself': ['organizer', 'self'],
'status': ['status'], 'status': ['status'],
'transparency': ['transparency'], 'transparency': ['transparency'],
'visibility': ['visibility'], 'visibility': ['visibility'],
@@ -35233,7 +35235,9 @@ def getCalendarEventEntity():
calendarEventEntity['queries'].append(getString(Cmd.OB_QUERY)) calendarEventEntity['queries'].append(getString(Cmd.OB_QUERY))
elif myarg == 'matchfield': elif myarg == 'matchfield':
matchField = getChoice(LIST_EVENTS_MATCH_FIELDS, mapChoice=True) matchField = getChoice(LIST_EVENTS_MATCH_FIELDS, mapChoice=True)
if matchField[0] != 'attendees' or matchField[1] == 'match': if matchField[0] == 'organizer' and matchField[1] == 'self':
calendarEventEntity['matches'].append((matchField, getBoolean()))
elif matchField[0] != 'attendees' or matchField[1] == 'match':
calendarEventEntity['matches'].append((matchField, getREPattern(re.IGNORECASE))) calendarEventEntity['matches'].append((matchField, getREPattern(re.IGNORECASE)))
elif matchField[1] == 'email': elif matchField[1] == 'email':
calendarEventEntity['matches'].append((matchField, getNormalizedEmailAddressEntity())) calendarEventEntity['matches'].append((matchField, getNormalizedEmailAddressEntity()))
@@ -35519,6 +35523,8 @@ def _eventMatches(event, match):
eventAttr = eventAttr.get(attr, '') eventAttr = eventAttr.get(attr, '')
if not eventAttr: if not eventAttr:
break break
if match[0][0] == 'organizer' and match[0][1] == 'self':
return bool(eventAttr) == match[1]
if match[0][0] != 'hangoutLink': if match[0][0] != 'hangoutLink':
return match[1].search(eventAttr) is not None return match[1].search(eventAttr) is not None
# vkj-przn-nvg or vkjprznnvg # vkj-przn-nvg or vkjprznnvg