mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 20:31:35 +00:00
Added additional columns isBase and baseId' to gam <UserTypeEntity> print fileparenttree`
This commit is contained in:
@@ -10,6 +10,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.66.08
|
||||||
|
|
||||||
|
Added additional columns `isBase` and `baseId' to `gam <UserTypeEntity> print fileparenttree`
|
||||||
|
to simplify processing the output in a script.
|
||||||
|
|
||||||
### 6.66.07
|
### 6.66.07
|
||||||
|
|
||||||
Fixed bug in `gam <UserTypeEntity> print diskusage` that caused a trap.
|
Fixed bug in `gam <UserTypeEntity> print diskusage` that caused a trap.
|
||||||
|
|||||||
@@ -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.66.07 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.66.08 - 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
|
||||||
@@ -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.66.07 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.66.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.0 64-bit final
|
Python 3.12.0 64-bit final
|
||||||
Windows-10-10.0.17134 AMD64
|
Windows-10-10.0.17134 AMD64
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
- [Display a selected set of messages](#display-a-selected-set-of-messages)
|
- [Display a selected set of messages](#display-a-selected-set-of-messages)
|
||||||
- [Choose information to display](#choose-information-to-display)
|
- [Choose information to display](#choose-information-to-display)
|
||||||
- [Display message content](#display-message-content)
|
- [Display message content](#display-message-content)
|
||||||
- [Display message count](#display-message-count)
|
- [Display message counts](#display-message-counts)
|
||||||
- [Display label counts](#display-label-counts)
|
- [Display label counts](#display-label-counts)
|
||||||
- [Print only options](#print-only-options)
|
- [Print only options](#print-only-options)
|
||||||
- [Show only options](#show-only-options)
|
- [Show only options](#show-only-options)
|
||||||
@@ -539,7 +539,7 @@ The `dateheaderconverttimezone [<Boolean>]>` option converts `<SMTPDateHeader>`
|
|||||||
* `showsize` - Display the message size
|
* `showsize` - Display the message size
|
||||||
* `showsnippet` - Display the message snippet
|
* `showsnippet` - Display the message snippet
|
||||||
|
|
||||||
### Display message count and optionally cumulative message size
|
### Display message counts
|
||||||
* `countsonly` - Display the count of the number of messages
|
* `countsonly` - Display the count of the number of messages
|
||||||
* `showsize` - Display the cumulative message size
|
* `showsize` - Display the cumulative message size
|
||||||
|
|
||||||
|
|||||||
@@ -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.66.07 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.66.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.0 64-bit final
|
Python 3.12.0 64-bit final
|
||||||
MacOS Monterey 12.7 x86_64
|
MacOS Monterey 12.7 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.66.07 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.66.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.0 64-bit final
|
Python 3.12.0 64-bit final
|
||||||
MacOS Monterey 12.7 x86_64
|
MacOS Monterey 12.7 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.66.07 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.66.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.0 64-bit final
|
Python 3.12.0 64-bit final
|
||||||
MacOS Monterey 12.7 x86_64
|
MacOS Monterey 12.7 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.66.07
|
Latest: 6.66.08
|
||||||
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.66.07
|
6.66.08
|
||||||
```
|
```
|
||||||
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.66.07 - https://github.com/taers232c/GAMADV-XTD3
|
GAM 6.66.08 - https://github.com/taers232c/GAMADV-XTD3
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.0 64-bit final
|
Python 3.12.0 64-bit final
|
||||||
MacOS Monterey 12.7 x86_64
|
MacOS Monterey 12.7 x86_64
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
Merged GAM-Team version
|
Merged GAM-Team version
|
||||||
|
|
||||||
|
6.66.08
|
||||||
|
|
||||||
|
Added additional columns `isBase` and `baseId` to `gam <UserTypeEntity> print fileparenttree`
|
||||||
|
to simplify processing the output in a script.
|
||||||
|
|
||||||
6.66.07
|
6.66.07
|
||||||
|
|
||||||
Fixed bug in `gam <UserTypeEntity> print diskusage` that caused a trap.
|
Fixed bug in `gam <UserTypeEntity> print diskusage` that caused a trap.
|
||||||
|
|||||||
@@ -53344,7 +53344,7 @@ def printShowFilePaths(users):
|
|||||||
# [stripcrsfromname]
|
# [stripcrsfromname]
|
||||||
def printFileParentTree(users):
|
def printFileParentTree(users):
|
||||||
fileNameTitle = 'title' if not GC.Values[GC.DRIVE_V3_NATIVE_NAMES] else 'name'
|
fileNameTitle = 'title' if not GC.Values[GC.DRIVE_V3_NATIVE_NAMES] else 'name'
|
||||||
csvPF = CSVPrintFile(['Owner', 'id', fileNameTitle, 'parentId', 'depth', 'isRoot'], 'sortall')
|
csvPF = CSVPrintFile(['Owner', 'isBase', 'baseId', 'id', fileNameTitle, 'parentId', 'depth', 'isRoot'], 'sortall')
|
||||||
fileIdEntity = getDriveFileEntity()
|
fileIdEntity = getDriveFileEntity()
|
||||||
stripCRsFromName = False
|
stripCRsFromName = False
|
||||||
while Cmd.ArgumentsRemaining():
|
while Cmd.ArgumentsRemaining():
|
||||||
@@ -53372,6 +53372,7 @@ def printFileParentTree(users):
|
|||||||
for fileId in fileIdEntity['list']:
|
for fileId in fileIdEntity['list']:
|
||||||
j += 1
|
j += 1
|
||||||
fileList = []
|
fileList = []
|
||||||
|
baseId = fileId
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
result = callGAPI(drive.files(), 'get',
|
result = callGAPI(drive.files(), 'get',
|
||||||
@@ -53401,9 +53402,11 @@ def printFileParentTree(users):
|
|||||||
userSvcNotApplicableOrDriveDisabled(user, str(e), i, count)
|
userSvcNotApplicableOrDriveDisabled(user, str(e), i, count)
|
||||||
break
|
break
|
||||||
kcount = len(fileList)
|
kcount = len(fileList)
|
||||||
|
isBase = True
|
||||||
for result in fileList:
|
for result in fileList:
|
||||||
csvPF.WriteRow({'Owner': user, 'id': result['id'], fileNameTitle: result['name'], 'parentId': result['parents'][0],
|
csvPF.WriteRow({'Owner': user, 'isBase': isBase, 'baseId': baseId, 'id': result['id'], fileNameTitle: result['name'],
|
||||||
'depth': kcount, 'isRoot': result['isRoot']})
|
'parentId': result['parents'][0], 'depth': kcount, 'isRoot': result['isRoot']})
|
||||||
|
isBase = False
|
||||||
kcount -= 1
|
kcount -= 1
|
||||||
csvPF.writeCSVfile('Drive File Parent Tree')
|
csvPF.writeCSVfile('Drive File Parent Tree')
|
||||||
|
|
||||||
@@ -66825,7 +66828,8 @@ def printShowMessagesThreads(users, entityType):
|
|||||||
if senderMatchPattern:
|
if senderMatchPattern:
|
||||||
row['Sender'] = sender
|
row['Sender'] = sender
|
||||||
if not show_size:
|
if not show_size:
|
||||||
labelsMap.pop('size', None)
|
for label in labelsMap.values():
|
||||||
|
label.pop('size', None)
|
||||||
csvPF.WriteRowTitles(flattenJSON({'Labels': sorted(iter(labelsMap.values()), key=lambda k: k['name'])}, flattened=row))
|
csvPF.WriteRowTitles(flattenJSON({'Labels': sorted(iter(labelsMap.values()), key=lambda k: k['name'])}, flattened=row))
|
||||||
elif not senderMatchPattern:
|
elif not senderMatchPattern:
|
||||||
if not csvPF:
|
if not csvPF:
|
||||||
|
|||||||
Reference in New Issue
Block a user