Added option oneitemperrow to 'gam print vaultholds`

This commit is contained in:
Ross Scroggs
2024-04-15 15:59:57 -07:00
parent 3f5d96e13b
commit bad4866bf7
7 changed files with 42 additions and 15 deletions

View File

@@ -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
### 6.72.11
Added option `oneitemperrow` to 'gam print vaultholds` to have each of a
hold's accounts displayed on a separate row with all of the other hold fields.
### 6.72.10
Added `timeofdayrange=<HH:MM>/<HH:MM>` and `timeofdayrange!=<HH:MM>/<HH:MM>` to `<RowValueFilter>` that allows

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$ ./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.72.10 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.72.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.2 64-bit final
MacOS Sonoma 14.2.1 x86_64
@@ -1006,7 +1006,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.72.10 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.72.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.2 64-bit final
Windows-10-10.0.17134 AMD64

View File

@@ -657,7 +657,11 @@ By default, Gam displays the information as an indented list of keys and values.
gam print vaultholds|holds [todrive <ToDriveAttributes>*] [matters <MatterItemList>]
[fields <VaultHoldFieldNameList>] [shownames]
[formatjson [quotechar <Character>]]
[oneitemperrow]
```
By default, all accounts for a hold are displayed on a single row;
use `oneitemperrow` to have each account displayed on a separate row.
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format,
* `formatjson` - Display the fields in JSON format.

View File

@@ -3,7 +3,7 @@
Print the current version of Gam with details
```
gam version
GAMADV-XTD3 6.72.10 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.72.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.2 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.72.10 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.72.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.2 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.72.10 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.72.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.2 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.72.10
Latest: 6.72.11
echo $?
1
```
@@ -72,7 +72,7 @@ echo $?
Print the current version number without details
```
gam version simple
6.72.10
6.72.11
```
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.72.10 - https://github.com/taers232c/GAMADV-XTD3
GAM 6.72.11 - https://github.com/taers232c/GAMADV-XTD3
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.2 64-bit final
MacOS Sonoma 14.2.1 x86_64

View File

@@ -5137,6 +5137,7 @@ gam info vaulthold|hold <MatterItem> <HoldItem>
gam print vaultholds|holds [todrive <ToDriveAttribute>*] [matters <MatterItemList>]
[fields <VaultHoldFieldNameList>] [shownames]
[formatjson [quotechar <Character>]]
[oneitemperrow]
gam show vaultholds|holds [matters <MatterItemList>]
[fields <VaultHoldFieldNameList>] [shownames]
[formatjson]

View File

@@ -2,6 +2,11 @@
Merged GAM-Team version
6.72.11
Added option `oneitemperrow` to 'gam print vaultholds` to have each of a
hold's accounts displayed on a separate row with all of the other hold fields.
6.72.10
Added `timeofdayrange=<HH:MM>/<HH:MM>` and `timeofdayrange!=<HH:MM>/<HH:MM>` to `<RowValueFilter>` that allows

View File

@@ -39316,16 +39316,27 @@ PRINT_VAULT_HOLDS_TITLES = ['matterId', 'matterName', 'holdId', 'name', 'updateT
# gam print vaultholds|holds [todrive <ToDriveAttribute>*] [matters <MatterItemList>]
# [fields <VaultHoldFieldNameList>] [shownames]
# [formatjson [quotechar <Character>]]
# [oneitemperrow]
# gam show vaultholds|holds [matters <MatterItemList>]
# [fields <VaultHoldFieldNameList>] [shownames]
# [formatjson]
def doPrintShowVaultHolds():
def _printVaultHold(hold):
row = flattenJSON(hold, flattened={'matterId': matterId, 'matterName': matterName}, timeObjects=VAULT_HOLD_TIME_OBJECTS)
if not FJQC.formatJSON:
csvPF.WriteRowTitles(row)
elif csvPF.CheckRowTitles(row):
csvPF.WriteRowNoFilter({'matterId': matterId, 'matterName': matterName,
'holdId': hold['holdId'], 'name': hold['name'],
'JSON': json.dumps(cleanJSON(hold, timeObjects=VAULT_HOLD_TIME_OBJECTS), ensure_ascii=False, sort_keys=True)})
v = buildGAPIObject(API.VAULT)
csvPF = CSVPrintFile(PRINT_VAULT_HOLDS_TITLES, 'sortall') if Act.csvFormat() else None
FJQC = FormatJSONQuoteChar()
matters = []
cd = None
fieldsList = []
oneItemPerRow = False
while Cmd.ArgumentsRemaining():
myarg = getArgument()
if csvPF and myarg == 'todrive':
@@ -39336,6 +39347,8 @@ def doPrintShowVaultHolds():
cd = buildGAPIObject(API.DIRECTORY)
elif getFieldsList(myarg, VAULT_HOLD_FIELDS_CHOICE_MAP, fieldsList, initialField=['holdId', 'name']):
pass
elif csvPF and myarg == 'oneitemperrow':
oneItemPerRow = True
else:
FJQC.GetFormatJSONQuoteChar(myarg, False)
fields = getItemFieldsFromFieldsList('holds', fieldsList)
@@ -39399,13 +39412,12 @@ def doPrintShowVaultHolds():
else:
for hold in holds:
_cleanVaultHold(hold, cd)
row = flattenJSON(hold, flattened={'matterId': matterId, 'matterName': matterName}, timeObjects=VAULT_HOLD_TIME_OBJECTS)
if not FJQC.formatJSON:
csvPF.WriteRowTitles(row)
elif csvPF.CheckRowTitles(row):
csvPF.WriteRowNoFilter({'matterId': matterId, 'matterName': matterName,
'holdId': hold['holdId'], 'name': hold['name'],
'JSON': json.dumps(cleanJSON(hold, timeObjects=VAULT_HOLD_TIME_OBJECTS), ensure_ascii=False, sort_keys=True)})
if not oneItemPerRow or not hold.get('accounts', []):
_printVaultHold(hold)
else:
for account in hold.pop('accounts'):
hold['account'] = account
_printVaultHold(hold)
if csvPF:
csvPF.writeCSVfile('Vault Holds')