diff --git a/docs/Domain-People-Contacts-Profiles.md b/docs/Domain-People-Contacts-Profiles.md index 53c30757..380c1fff 100644 --- a/docs/Domain-People-Contacts-Profiles.md +++ b/docs/Domain-People-Contacts-Profiles.md @@ -133,7 +133,7 @@ The `quotechar ` option allows you to choose an alternate quote chara ## Display Domain Profiles ### Display as an indented list of keys and values. ``` -gam info people|domainprofiles +gam info domainprofiles|people|peopleprofiles [allfields|(fields )] [formatjson] ``` @@ -143,7 +143,7 @@ By default, Gam displays the fields `names,emailaddresses`. By default, Gam displays the information as an indented list of keys and values. * `formatjson` - Display the fields in JSON format. ``` -gam show people|domainprofiles +gam show domainprofiles|people|peopleprofiles [query ] [mergesources ] [allfields|(fields )] @@ -163,7 +163,7 @@ By default, Gam displays the information as an indented list of keys and values. ### Display as a CSV file. ``` -gam print people|domainprofiles [todrive *] +gam print domainprofiles|people|peopleprofiles [todrive *] [query ] [mergesources ] [allfields|(fields )] diff --git a/docs/GamUpdates.md b/docs/GamUpdates.md index 7385502e..af148998 100644 --- a/docs/GamUpdates.md +++ b/docs/GamUpdates.md @@ -11,6 +11,11 @@ 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.67.38 + +Added option `tdnotify []` to `` that causes GAM to send notification +emails to all `tdshare ` users when the file is uploaded/updated. + ### 6.67.37 Fixed bug in `gam show messages ... showattachments` to avoid a trap when `text/plain` attachments diff --git a/docs/How-to-Upgrade-from-Standard-GAM.md b/docs/How-to-Upgrade-from-Standard-GAM.md index c4ffe76b..75657852 100644 --- a/docs/How-to-Upgrade-from-Standard-GAM.md +++ b/docs/How-to-Upgrade-from-Standard-GAM.md @@ -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$ ./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.67.37 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.67.38 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.1 64-bit final MacOS Sonoma 14.2.1 x86_64 @@ -1002,7 +1002,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.67.37 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.67.38 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.1 64-bit final Windows-10-10.0.17134 AMD64 diff --git a/docs/Organizational-Units.md b/docs/Organizational-Units.md index a5abf66e..8a70cb35 100644 --- a/docs/Organizational-Units.md +++ b/docs/Organizational-Units.md @@ -13,7 +13,7 @@ - [Synchronize ChromeOS devices with an organizational unit](#synchronize-chromeos-devices-with-an-organizational-unit) - [Display organizational units](#display-organizational-units) - [Print organizational units](#print-organizational-units) -- [Display orgamizational unit counts](#display-organizational-unit-counts) +- [Display organizational unit counts](#display-organizational-unit-counts) - [Display indented organizational unit tree](#display-indented-organizational-unit-tree) - [Special case handling for large number of organizational units](#special-case-handling-for-large-number-of-organizational-units) diff --git a/docs/Shared-Drives.md b/docs/Shared-Drives.md index ef8c2f20..8cdd5280 100644 --- a/docs/Shared-Drives.md +++ b/docs/Shared-Drives.md @@ -68,6 +68,10 @@ ``` ::= (json [charset ] ) | (json file [charset ]) | + ::= id: + ::= /|(/)+ + ::= | + ::= manager|organizer|owner| contentmanager|fileorganizer| diff --git a/docs/Todrive.md b/docs/Todrive.md index af0b73f9..520018f2 100644 --- a/docs/Todrive.md +++ b/docs/Todrive.md @@ -184,6 +184,7 @@ direct the uploaded file to a particular user and location and add a timestamp t (tdnobrowser [])| (tdnoemail [])| (tdnoescapechar [])| + (tdnotify [])| (tdparent (id:)|)| (tdretaintitle [])| (tdshare commenter|reader|writer)*| @@ -236,6 +237,7 @@ If `tdfileid ` is not specified, a new file is created. ## Open browser and send email * `tdnobrowser` - If False, a browser is opened to view the file uploaded to Google Drive; if not specified, the `todrive_nobrowser` value from gam.cfg is used. * `tdnoemail` - If False, an email is sent to `tduser` informing them of name and URL of the uploaded file; if not specified, the `todrive_noemail` value from gam.cfg is used. +* `tdnotify` - If True, an email is sent to all `tdshare ` users informing them of name and URL of the uploaded/updated file. ## Escape character * `tdnoescapechar ` - Should `\` be ignored as an escape character; if not specified, the value of `todrive_no_escape_char` from `gam.cfg` will be used diff --git a/docs/Users-Shared-Drives.md b/docs/Users-Shared-Drives.md index 6c54bd1e..58c8ce9a 100644 --- a/docs/Users-Shared-Drives.md +++ b/docs/Users-Shared-Drives.md @@ -69,6 +69,10 @@ ``` ::= (json [charset ] ) | (json file [charset ]) | + ::= id: + ::= /|(/)+ + ::= | + ::= manager|organizer|owner| contentmanager|fileorganizer| diff --git a/docs/Version-and-Help.md b/docs/Version-and-Help.md index f018c5d5..b02d6712 100644 --- a/docs/Version-and-Help.md +++ b/docs/Version-and-Help.md @@ -3,7 +3,7 @@ Print the current version of Gam with details ``` gam version -GAMADV-XTD3 6.67.37 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.67.38 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.1 64-bit final MacOS Sonoma 14.2.1 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.67.37 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.67.38 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.1 64-bit final MacOS Sonoma 14.2.1 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.67.37 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.67.38 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.1 64-bit final MacOS Sonoma 14.2.1 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.67.37 + Latest: 6.67.38 echo $? 1 ``` @@ -72,7 +72,7 @@ echo $? Print the current version number without details ``` gam version simple -6.67.37 +6.67.38 ``` 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.67.37 - https://github.com/taers232c/GAMADV-XTD3 +GAM 6.67.38 - https://github.com/taers232c/GAMADV-XTD3 Ross Scroggs Python 3.12.1 64-bit final MacOS Sonoma 14.2.1 x86_64 diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 2e9cc14c..dc39aa84 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -2,6 +2,11 @@ Merged GAM-Team version +6.67.38 + +Added option `tdnotify []` to `` that causes GAM to send notification +emails to all `tdshare ` users when the file is uploaded/updated. + 6.67.37 Fixed bug in `gam show messages ... showattachments` to avoid a trap when `text/plain` attachments diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 957b5483..099b74f2 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -7847,7 +7847,7 @@ class CSVPrintFile(): 'fileId': None, 'parentId': None, 'parent': GC.Values[GC.TODRIVE_PARENT], 'retaintitle': False, 'localcopy': GC.Values[GC.TODRIVE_LOCALCOPY], 'uploadnodata': GC.Values[GC.TODRIVE_UPLOAD_NODATA], 'nobrowser': GC.Values[GC.TODRIVE_NOBROWSER], 'noemail': GC.Values[GC.TODRIVE_NOEMAIL], - 'share': []} + 'share': [], 'notify': False} while Cmd.ArgumentsRemaining(): myarg = getArgument() if myarg == 'tduser': @@ -7923,6 +7923,8 @@ class CSVPrintFile(): self.todrive['share'].append({'emailAddress': normalizeEmailAddressOrUID(getString(Cmd.OB_EMAIL_ADDRESS)), 'type': 'user', 'role': getChoice(self.TDSHARE_ACL_ROLES_MAP, mapChoice=True)}) + elif myarg == 'tdnotify': + self.todrive['notify'] = getBoolean() else: Cmd.Backup() break @@ -8653,6 +8655,10 @@ class CSVPrintFile(): printKeyValueList([msg_txt]) if not self.todrive['noemail']: send_email(title, msg_txt, user, clientAccess=GC.Values[GC.TODRIVE_CLIENTACCESS]) + if self.todrive['notify']: + for share in self.todrive['share']: + if share['emailAddress'] != user: + send_email(title, msg_txt, share['emailAddress'], clientAccess=GC.Values[GC.TODRIVE_CLIENTACCESS]) if not self.todrive['nobrowser']: webbrowser.open(file_url) except (GAPI.forbidden, GAPI.insufficientPermissions): @@ -21839,7 +21845,7 @@ def _printShowPeople(source): if csvPF: csvPF.writeCSVfile(CSVTitle) -# gam info people +# gam info people|peopleprofile # [allfields|(fields )] [showmetadata] # [formatjson] def doInfoDomainPeopleProfile(): @@ -21851,13 +21857,13 @@ def doInfoDomainPeopleProfile(): def doInfoDomainPeopleContacts(): _infoPeople([GC.Values[GC.DOMAIN]], Ent.DOMAIN, 'domaincontact') -# gam print people [todrive *] +# gam print people|peopleprofile [todrive *] # [query ] # [mergesources ] # [countsonly] # [allfields|(fields )] [showmetadata] # [formatjson [quotechar ]] -# gam show people +# gam show people|peopleprofile # [query ] # [mergesources ] # [countsonly]