mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-04 04:41:35 +00:00
Added option tdnotify [<Boolean>] to <ToDriveAttribute>
This commit is contained in:
@@ -133,7 +133,7 @@ The `quotechar <Character>` option allows you to choose an alternate quote chara
|
|||||||
## Display Domain Profiles
|
## Display Domain Profiles
|
||||||
### Display as an indented list of keys and values.
|
### Display as an indented list of keys and values.
|
||||||
```
|
```
|
||||||
gam info people|domainprofiles <PeopleResourceNameEntity>
|
gam info domainprofiles|people|peopleprofiles <PeopleResourceNameEntity>
|
||||||
[allfields|(fields <PeopleFieldNameList>)]
|
[allfields|(fields <PeopleFieldNameList>)]
|
||||||
[formatjson]
|
[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.
|
By default, Gam displays the information as an indented list of keys and values.
|
||||||
* `formatjson` - Display the fields in JSON format.
|
* `formatjson` - Display the fields in JSON format.
|
||||||
```
|
```
|
||||||
gam show people|domainprofiles
|
gam show domainprofiles|people|peopleprofiles
|
||||||
[query <String>]
|
[query <String>]
|
||||||
[mergesources <PeopleMergeSourceName>]
|
[mergesources <PeopleMergeSourceName>]
|
||||||
[allfields|(fields <PeopleFieldNameList>)]
|
[allfields|(fields <PeopleFieldNameList>)]
|
||||||
@@ -163,7 +163,7 @@ By default, Gam displays the information as an indented list of keys and values.
|
|||||||
|
|
||||||
### Display as a CSV file.
|
### Display as a CSV file.
|
||||||
```
|
```
|
||||||
gam print people|domainprofiles [todrive <ToDriveAttribute>*]
|
gam print domainprofiles|people|peopleprofiles [todrive <ToDriveAttribute>*]
|
||||||
[query <String>]
|
[query <String>]
|
||||||
[mergesources <PeopleMergeSourceName>]
|
[mergesources <PeopleMergeSourceName>]
|
||||||
[allfields|(fields <PeopleFieldNameList>)]
|
[allfields|(fields <PeopleFieldNameList>)]
|
||||||
|
|||||||
@@ -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
|
See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation
|
||||||
|
|
||||||
|
### 6.67.38
|
||||||
|
|
||||||
|
Added option `tdnotify [<Boolean>]` to `<ToDriveAttribute>` that causes GAM to send notification
|
||||||
|
emails to all `tdshare <EmailAddress>` users when the file is uploaded/updated.
|
||||||
|
|
||||||
### 6.67.37
|
### 6.67.37
|
||||||
|
|
||||||
Fixed bug in `gam <UserTypeEntity> show messages ... showattachments` to avoid a trap when `text/plain` attachments
|
Fixed bug in `gam <UserTypeEntity> show messages ... showattachments` to avoid a trap when `text/plain` attachments
|
||||||
|
|||||||
@@ -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.67.37 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.67.38 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.1 64-bit final
|
Python 3.12.1 64-bit final
|
||||||
MacOS Sonoma 14.2.1 x86_64
|
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>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.67.37 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.67.38 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.1 64-bit final
|
Python 3.12.1 64-bit final
|
||||||
Windows-10-10.0.17134 AMD64
|
Windows-10-10.0.17134 AMD64
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
- [Synchronize ChromeOS devices with an organizational unit](#synchronize-chromeos-devices-with-an-organizational-unit)
|
- [Synchronize ChromeOS devices with an organizational unit](#synchronize-chromeos-devices-with-an-organizational-unit)
|
||||||
- [Display organizational units](#display-organizational-units)
|
- [Display organizational units](#display-organizational-units)
|
||||||
- [Print organizational units](#print-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)
|
- [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)
|
- [Special case handling for large number of organizational units](#special-case-handling-for-large-number-of-organizational-units)
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,10 @@
|
|||||||
```
|
```
|
||||||
<JSONData> ::= (json [charset <Charset>] <String>) | (json file <FileName> [charset <Charset>]) |
|
<JSONData> ::= (json [charset <Charset>] <String>) | (json file <FileName> [charset <Charset>]) |
|
||||||
|
|
||||||
|
<OrgUnitID> ::= id:<String>
|
||||||
|
<OrgUnitPath> ::= /|(/<String>)+
|
||||||
|
<OrgUnitItem> ::= <OrgUnitID>|<OrgUnitPath>
|
||||||
|
|
||||||
<DriveFileACLRole> ::=
|
<DriveFileACLRole> ::=
|
||||||
manager|organizer|owner|
|
manager|organizer|owner|
|
||||||
contentmanager|fileorganizer|
|
contentmanager|fileorganizer|
|
||||||
|
|||||||
@@ -184,6 +184,7 @@ direct the uploaded file to a particular user and location and add a timestamp t
|
|||||||
(tdnobrowser [<Boolean>])|
|
(tdnobrowser [<Boolean>])|
|
||||||
(tdnoemail [<Boolean>])|
|
(tdnoemail [<Boolean>])|
|
||||||
(tdnoescapechar [<Boolean>])|
|
(tdnoescapechar [<Boolean>])|
|
||||||
|
(tdnotify [<Boolean>])|
|
||||||
(tdparent (id:<DriveFolderID>)|<DriveFolderName>)|
|
(tdparent (id:<DriveFolderID>)|<DriveFolderName>)|
|
||||||
(tdretaintitle [<Boolean>])|
|
(tdretaintitle [<Boolean>])|
|
||||||
(tdshare <EmailAddress> commenter|reader|writer)*|
|
(tdshare <EmailAddress> commenter|reader|writer)*|
|
||||||
@@ -236,6 +237,7 @@ If `tdfileid <DriveFileID>` is not specified, a new file is created.
|
|||||||
## Open browser and send email
|
## 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.
|
* `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.
|
* `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 <EmailAddress>` users informing them of name and URL of the uploaded/updated file.
|
||||||
|
|
||||||
## Escape character
|
## Escape character
|
||||||
* `tdnoescapechar <Boolean>` - Should `\` be ignored as an escape character; if not specified, the value of `todrive_no_escape_char` from `gam.cfg` will be used
|
* `tdnoescapechar <Boolean>` - Should `\` be ignored as an escape character; if not specified, the value of `todrive_no_escape_char` from `gam.cfg` will be used
|
||||||
|
|||||||
@@ -69,6 +69,10 @@
|
|||||||
```
|
```
|
||||||
<JSONData> ::= (json [charset <Charset>] <String>) | (json file <FileName> [charset <Charset>]) |
|
<JSONData> ::= (json [charset <Charset>] <String>) | (json file <FileName> [charset <Charset>]) |
|
||||||
|
|
||||||
|
<OrgUnitID> ::= id:<String>
|
||||||
|
<OrgUnitPath> ::= /|(/<String>)+
|
||||||
|
<OrgUnitItem> ::= <OrgUnitID>|<OrgUnitPath>
|
||||||
|
|
||||||
<DriveFileACLRole> ::=
|
<DriveFileACLRole> ::=
|
||||||
manager|organizer|owner|
|
manager|organizer|owner|
|
||||||
contentmanager|fileorganizer|
|
contentmanager|fileorganizer|
|
||||||
|
|||||||
@@ -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.67.37 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.67.38 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.1 64-bit final
|
Python 3.12.1 64-bit final
|
||||||
MacOS Sonoma 14.2.1 x86_64
|
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
|
Print the current version of Gam with details and time offset information
|
||||||
```
|
```
|
||||||
gam version timeoffset
|
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 <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.1 64-bit final
|
Python 3.12.1 64-bit final
|
||||||
MacOS Sonoma 14.2.1 x86_64
|
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
|
Print the current version of Gam with extended details and SSL information
|
||||||
```
|
```
|
||||||
gam version extended
|
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 <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.1 64-bit final
|
Python 3.12.1 64-bit final
|
||||||
MacOS Sonoma 14.2.1 x86_64
|
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
|
Path: /Users/Admin/bin/gamadv-xtd3
|
||||||
Version Check:
|
Version Check:
|
||||||
Current: 5.35.08
|
Current: 5.35.08
|
||||||
Latest: 6.67.37
|
Latest: 6.67.38
|
||||||
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.67.37
|
6.67.38
|
||||||
```
|
```
|
||||||
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.67.37 - https://github.com/taers232c/GAMADV-XTD3
|
GAM 6.67.38 - https://github.com/taers232c/GAMADV-XTD3
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.1 64-bit final
|
Python 3.12.1 64-bit final
|
||||||
MacOS Sonoma 14.2.1 x86_64
|
MacOS Sonoma 14.2.1 x86_64
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
Merged GAM-Team version
|
Merged GAM-Team version
|
||||||
|
|
||||||
|
6.67.38
|
||||||
|
|
||||||
|
Added option `tdnotify [<Boolean>]` to `<ToDriveAttribute>` that causes GAM to send notification
|
||||||
|
emails to all `tdshare <EmailAddress>` users when the file is uploaded/updated.
|
||||||
|
|
||||||
6.67.37
|
6.67.37
|
||||||
|
|
||||||
Fixed bug in `gam <UserTypeEntity> show messages ... showattachments` to avoid a trap when `text/plain` attachments
|
Fixed bug in `gam <UserTypeEntity> show messages ... showattachments` to avoid a trap when `text/plain` attachments
|
||||||
|
|||||||
@@ -7847,7 +7847,7 @@ class CSVPrintFile():
|
|||||||
'fileId': None, 'parentId': None, 'parent': GC.Values[GC.TODRIVE_PARENT], 'retaintitle': False,
|
'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],
|
'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],
|
'nobrowser': GC.Values[GC.TODRIVE_NOBROWSER], 'noemail': GC.Values[GC.TODRIVE_NOEMAIL],
|
||||||
'share': []}
|
'share': [], 'notify': False}
|
||||||
while Cmd.ArgumentsRemaining():
|
while Cmd.ArgumentsRemaining():
|
||||||
myarg = getArgument()
|
myarg = getArgument()
|
||||||
if myarg == 'tduser':
|
if myarg == 'tduser':
|
||||||
@@ -7923,6 +7923,8 @@ class CSVPrintFile():
|
|||||||
self.todrive['share'].append({'emailAddress': normalizeEmailAddressOrUID(getString(Cmd.OB_EMAIL_ADDRESS)),
|
self.todrive['share'].append({'emailAddress': normalizeEmailAddressOrUID(getString(Cmd.OB_EMAIL_ADDRESS)),
|
||||||
'type': 'user',
|
'type': 'user',
|
||||||
'role': getChoice(self.TDSHARE_ACL_ROLES_MAP, mapChoice=True)})
|
'role': getChoice(self.TDSHARE_ACL_ROLES_MAP, mapChoice=True)})
|
||||||
|
elif myarg == 'tdnotify':
|
||||||
|
self.todrive['notify'] = getBoolean()
|
||||||
else:
|
else:
|
||||||
Cmd.Backup()
|
Cmd.Backup()
|
||||||
break
|
break
|
||||||
@@ -8653,6 +8655,10 @@ class CSVPrintFile():
|
|||||||
printKeyValueList([msg_txt])
|
printKeyValueList([msg_txt])
|
||||||
if not self.todrive['noemail']:
|
if not self.todrive['noemail']:
|
||||||
send_email(title, msg_txt, user, clientAccess=GC.Values[GC.TODRIVE_CLIENTACCESS])
|
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']:
|
if not self.todrive['nobrowser']:
|
||||||
webbrowser.open(file_url)
|
webbrowser.open(file_url)
|
||||||
except (GAPI.forbidden, GAPI.insufficientPermissions):
|
except (GAPI.forbidden, GAPI.insufficientPermissions):
|
||||||
@@ -21839,7 +21845,7 @@ def _printShowPeople(source):
|
|||||||
if csvPF:
|
if csvPF:
|
||||||
csvPF.writeCSVfile(CSVTitle)
|
csvPF.writeCSVfile(CSVTitle)
|
||||||
|
|
||||||
# gam info people <PeopleResourceNameEntity>
|
# gam info people|peopleprofile <PeopleResourceNameEntity>
|
||||||
# [allfields|(fields <PeopleFieldNameList>)] [showmetadata]
|
# [allfields|(fields <PeopleFieldNameList>)] [showmetadata]
|
||||||
# [formatjson]
|
# [formatjson]
|
||||||
def doInfoDomainPeopleProfile():
|
def doInfoDomainPeopleProfile():
|
||||||
@@ -21851,13 +21857,13 @@ def doInfoDomainPeopleProfile():
|
|||||||
def doInfoDomainPeopleContacts():
|
def doInfoDomainPeopleContacts():
|
||||||
_infoPeople([GC.Values[GC.DOMAIN]], Ent.DOMAIN, 'domaincontact')
|
_infoPeople([GC.Values[GC.DOMAIN]], Ent.DOMAIN, 'domaincontact')
|
||||||
|
|
||||||
# gam print people [todrive <ToDriveAttribute>*]
|
# gam print people|peopleprofile [todrive <ToDriveAttribute>*]
|
||||||
# [query <String>]
|
# [query <String>]
|
||||||
# [mergesources <PeopleMergeSourceName>]
|
# [mergesources <PeopleMergeSourceName>]
|
||||||
# [countsonly]
|
# [countsonly]
|
||||||
# [allfields|(fields <PeopleFieldNameList>)] [showmetadata]
|
# [allfields|(fields <PeopleFieldNameList>)] [showmetadata]
|
||||||
# [formatjson [quotechar <Character>]]
|
# [formatjson [quotechar <Character>]]
|
||||||
# gam show people
|
# gam show people|peopleprofile
|
||||||
# [query <String>]
|
# [query <String>]
|
||||||
# [mergesources <PeopleMergeSourceName>]
|
# [mergesources <PeopleMergeSourceName>]
|
||||||
# [countsonly]
|
# [countsonly]
|
||||||
|
|||||||
Reference in New Issue
Block a user