mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-04 04:41:35 +00:00
Added option addcsvdata <FieldName> <String> to gam print datatransfers
This commit is contained in:
@@ -129,6 +129,9 @@ By default, the aliases in a list are separated by the `csv_output_field_delimit
|
|||||||
|
|
||||||
Specifying both `onerowpertarget` and `suppressnoaliasrows` causes GAM to not display any targets that have no aliases.
|
Specifying both `onerowpertarget` and `suppressnoaliasrows` causes GAM to not display any targets that have no aliases.
|
||||||
|
|
||||||
|
Add additional columns of data from the command line to the output
|
||||||
|
* `addcsvdata <FieldName> <String>`
|
||||||
|
|
||||||
When multiple domains are specified and a query/queries are specified, an API call is made for each domain/query combination.
|
When multiple domains are specified and a query/queries are specified, an API call is made for each domain/query combination.
|
||||||
```
|
```
|
||||||
$ gam print aliases domains school.org,students.school.org queries "'email:admin*','email:test*'"
|
$ gam print aliases domains school.org,students.school.org queries "'email:admin*','email:test*'"
|
||||||
|
|||||||
@@ -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.12
|
||||||
|
|
||||||
|
Added option `addcsvdata <FieldName> <String>` to `gam print datatransfers` that adds
|
||||||
|
additional columns of data to the CSV file output.
|
||||||
|
|
||||||
### 6.67.11
|
### 6.67.11
|
||||||
|
|
||||||
Updated various Gmail related commands to handle this error:
|
Updated various Gmail related commands to handle this error:
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ gam show datatransfers|transfers
|
|||||||
gam print datatransfers|transfers [todrive <ToDriveAttribute>*]
|
gam print datatransfers|transfers [todrive <ToDriveAttribute>*]
|
||||||
[olduser|oldowner <UserItem>] [newuser|newowner <UserItem>]
|
[olduser|oldowner <UserItem>] [newuser|newowner <UserItem>]
|
||||||
[status completed|failed|inprogress|<String>] [delimiter <Character>]
|
[status completed|failed|inprogress|<String>] [delimiter <Character>]
|
||||||
|
(addcsvdata <FieldName> <String>)*
|
||||||
```
|
```
|
||||||
By default, all data transfer operations are printed, use these options to select specific transfers.
|
By default, all data transfer operations are printed, use these options to select specific transfers.
|
||||||
* `olduser|oldowner <UserItem>`
|
* `olduser|oldowner <UserItem>`
|
||||||
@@ -72,3 +73,5 @@ By default, all data transfer operations are printed, use these options to selec
|
|||||||
By default, the entries in lists of items are separated by the `csv_output_field_delimiter` from `gam.cfg`.
|
By default, the entries in lists of items are separated by the `csv_output_field_delimiter` from `gam.cfg`.
|
||||||
* `delimiter <Character>` - Separate list items with `<Character>`
|
* `delimiter <Character>` - Separate list items with `<Character>`
|
||||||
|
|
||||||
|
Add additional columns of data from the command line to the output
|
||||||
|
* `addcsvdata <FieldName> <String>`
|
||||||
|
|||||||
@@ -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.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.67.12 - 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.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.67.12 - 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
|
||||||
|
|||||||
@@ -4,7 +4,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.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.67.12 - 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
|
||||||
@@ -16,7 +16,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.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.67.12 - 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
|
||||||
@@ -28,7 +28,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.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.67.12 - 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
|
||||||
@@ -65,7 +65,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.11
|
Latest: 6.67.12
|
||||||
echo $?
|
echo $?
|
||||||
1
|
1
|
||||||
```
|
```
|
||||||
@@ -73,7 +73,7 @@ echo $?
|
|||||||
Print the current version number without details
|
Print the current version number without details
|
||||||
```
|
```
|
||||||
gam version simple
|
gam version simple
|
||||||
6.67.11
|
6.67.12
|
||||||
```
|
```
|
||||||
In Linux/MacOS you can do:
|
In Linux/MacOS you can do:
|
||||||
```
|
```
|
||||||
@@ -83,7 +83,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.11 - https://github.com/taers232c/GAMADV-XTD3
|
GAM 6.67.12 - 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
|
||||||
|
|||||||
@@ -3140,6 +3140,7 @@ gam info datatransfer|transfer <TransferID>
|
|||||||
gam print datatransfers|transfers [todrive <ToDriveAttribute>*]
|
gam print datatransfers|transfers [todrive <ToDriveAttribute>*]
|
||||||
[olduser|oldowner <UserItem>] [newuser|newowner <UserItem>]
|
[olduser|oldowner <UserItem>] [newuser|newowner <UserItem>]
|
||||||
[status completed|failed|inprogress] [delimiter <Character>]
|
[status completed|failed|inprogress] [delimiter <Character>]
|
||||||
|
(addcsvdata <FieldName> <String>)*
|
||||||
gam show datatransfers|transfers
|
gam show datatransfers|transfers
|
||||||
[olduser|oldowner <UserItem>] [newuser|newowner <UserItem>]
|
[olduser|oldowner <UserItem>] [newuser|newowner <UserItem>]
|
||||||
[status completed|failed|inprogress] [delimiter <Character>]
|
[status completed|failed|inprogress] [delimiter <Character>]
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
Merged GAM-Team version
|
Merged GAM-Team version
|
||||||
|
|
||||||
|
6.67.12
|
||||||
|
|
||||||
|
Added option `addcsvdata <FieldName> <String>` to `gam print datatransfers` that adds
|
||||||
|
additional columns of data to the CSV file output.
|
||||||
|
|
||||||
6.67.11
|
6.67.11
|
||||||
|
|
||||||
Updated various Gmail related commands to handle this error:
|
Updated various Gmail related commands to handle this error:
|
||||||
|
|||||||
@@ -16426,6 +16426,7 @@ DATA_TRANSFER_SORT_TITLES = ['id', 'requestTime', 'oldOwnerUserEmail', 'newOwner
|
|||||||
# gam print datatransfers|transfers [todrive <ToDriveAttribute>*]
|
# gam print datatransfers|transfers [todrive <ToDriveAttribute>*]
|
||||||
# [olduser|oldowner <UserItem>] [newuser|newowner <UserItem>]
|
# [olduser|oldowner <UserItem>] [newuser|newowner <UserItem>]
|
||||||
# [status <String>] [delimiter <Character>]]
|
# [status <String>] [delimiter <Character>]]
|
||||||
|
# (addcsvdata <FieldName> <String>)*
|
||||||
# gam show datatransfers|transfers
|
# gam show datatransfers|transfers
|
||||||
# [olduser|oldowner <UserItem>] [newuser|newowner <UserItem>]
|
# [olduser|oldowner <UserItem>] [newuser|newowner <UserItem>]
|
||||||
# [status <String>] [delimiter <Character>]]
|
# [status <String>] [delimiter <Character>]]
|
||||||
@@ -16437,6 +16438,7 @@ def doPrintShowDataTransfers():
|
|||||||
status = None
|
status = None
|
||||||
csvPF = CSVPrintFile(['id'], DATA_TRANSFER_SORT_TITLES) if Act.csvFormat() else None
|
csvPF = CSVPrintFile(['id'], DATA_TRANSFER_SORT_TITLES) if Act.csvFormat() else None
|
||||||
delimiter = GC.Values[GC.CSV_OUTPUT_FIELD_DELIMITER]
|
delimiter = GC.Values[GC.CSV_OUTPUT_FIELD_DELIMITER]
|
||||||
|
addCSVData = {}
|
||||||
while Cmd.ArgumentsRemaining():
|
while Cmd.ArgumentsRemaining():
|
||||||
myarg = getArgument()
|
myarg = getArgument()
|
||||||
if csvPF and myarg == 'todrive':
|
if csvPF and myarg == 'todrive':
|
||||||
@@ -16449,6 +16451,9 @@ def doPrintShowDataTransfers():
|
|||||||
status = getChoice(DATA_TRANSFER_STATUS_MAP, mapChoice=True)
|
status = getChoice(DATA_TRANSFER_STATUS_MAP, mapChoice=True)
|
||||||
elif myarg == 'delimiter':
|
elif myarg == 'delimiter':
|
||||||
delimiter = getCharacter()
|
delimiter = getCharacter()
|
||||||
|
elif myarg == 'addcsvdata':
|
||||||
|
k = getString(Cmd.OB_STRING)
|
||||||
|
addCSVData[k] = getString(Cmd.OB_STRING, minLen=0)
|
||||||
else:
|
else:
|
||||||
unknownArgumentExit()
|
unknownArgumentExit()
|
||||||
try:
|
try:
|
||||||
@@ -16475,6 +16480,8 @@ def doPrintShowDataTransfers():
|
|||||||
row['oldOwnerUserEmail'] = convertUserIDtoEmail(transfer['oldOwnerUserId'])
|
row['oldOwnerUserEmail'] = convertUserIDtoEmail(transfer['oldOwnerUserId'])
|
||||||
row['newOwnerUserEmail'] = convertUserIDtoEmail(transfer['newOwnerUserId'])
|
row['newOwnerUserEmail'] = convertUserIDtoEmail(transfer['newOwnerUserId'])
|
||||||
row['overallTransferStatusCode'] = transfer['overallTransferStatusCode']
|
row['overallTransferStatusCode'] = transfer['overallTransferStatusCode']
|
||||||
|
if addCSVData:
|
||||||
|
row.update(addCSVData)
|
||||||
for app in transfer['applicationDataTransfers']:
|
for app in transfer['applicationDataTransfers']:
|
||||||
xrow = row.copy()
|
xrow = row.copy()
|
||||||
xrow['application'] = _convertTransferAppIDtoName(apps, app['applicationId'])
|
xrow['application'] = _convertTransferAppIDtoName(apps, app['applicationId'])
|
||||||
|
|||||||
Reference in New Issue
Block a user