mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 20:31:35 +00:00
Added option oneitemperrow to 'gam print vaultholds`
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.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
|
### 6.72.10
|
||||||
|
|
||||||
Added `timeofdayrange=<HH:MM>/<HH:MM>` and `timeofdayrange!=<HH:MM>/<HH:MM>` to `<RowValueFilter>` that allows
|
Added `timeofdayrange=<HH:MM>/<HH:MM>` and `timeofdayrange!=<HH:MM>/<HH:MM>` to `<RowValueFilter>` that allows
|
||||||
|
|||||||
@@ -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.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>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.2 64-bit final
|
Python 3.12.2 64-bit final
|
||||||
MacOS Sonoma 14.2.1 x86_64
|
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>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.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>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.2 64-bit final
|
Python 3.12.2 64-bit final
|
||||||
Windows-10-10.0.17134 AMD64
|
Windows-10-10.0.17134 AMD64
|
||||||
|
|||||||
@@ -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>]
|
gam print vaultholds|holds [todrive <ToDriveAttributes>*] [matters <MatterItemList>]
|
||||||
[fields <VaultHoldFieldNameList>] [shownames]
|
[fields <VaultHoldFieldNameList>] [shownames]
|
||||||
[formatjson [quotechar <Character>]]
|
[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,
|
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.
|
* `formatjson` - Display the fields in JSON format.
|
||||||
|
|
||||||
|
|||||||
@@ -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.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>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.2 64-bit final
|
Python 3.12.2 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.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>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.2 64-bit final
|
Python 3.12.2 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.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>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.2 64-bit final
|
Python 3.12.2 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.72.10
|
Latest: 6.72.11
|
||||||
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.72.10
|
6.72.11
|
||||||
```
|
```
|
||||||
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.72.10 - https://github.com/taers232c/GAMADV-XTD3
|
GAM 6.72.11 - https://github.com/taers232c/GAMADV-XTD3
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.2 64-bit final
|
Python 3.12.2 64-bit final
|
||||||
MacOS Sonoma 14.2.1 x86_64
|
MacOS Sonoma 14.2.1 x86_64
|
||||||
|
|||||||
@@ -5137,6 +5137,7 @@ gam info vaulthold|hold <MatterItem> <HoldItem>
|
|||||||
gam print vaultholds|holds [todrive <ToDriveAttribute>*] [matters <MatterItemList>]
|
gam print vaultholds|holds [todrive <ToDriveAttribute>*] [matters <MatterItemList>]
|
||||||
[fields <VaultHoldFieldNameList>] [shownames]
|
[fields <VaultHoldFieldNameList>] [shownames]
|
||||||
[formatjson [quotechar <Character>]]
|
[formatjson [quotechar <Character>]]
|
||||||
|
[oneitemperrow]
|
||||||
gam show vaultholds|holds [matters <MatterItemList>]
|
gam show vaultholds|holds [matters <MatterItemList>]
|
||||||
[fields <VaultHoldFieldNameList>] [shownames]
|
[fields <VaultHoldFieldNameList>] [shownames]
|
||||||
[formatjson]
|
[formatjson]
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
Merged GAM-Team version
|
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
|
6.72.10
|
||||||
|
|
||||||
Added `timeofdayrange=<HH:MM>/<HH:MM>` and `timeofdayrange!=<HH:MM>/<HH:MM>` to `<RowValueFilter>` that allows
|
Added `timeofdayrange=<HH:MM>/<HH:MM>` and `timeofdayrange!=<HH:MM>/<HH:MM>` to `<RowValueFilter>` that allows
|
||||||
|
|||||||
@@ -39316,16 +39316,27 @@ PRINT_VAULT_HOLDS_TITLES = ['matterId', 'matterName', 'holdId', 'name', 'updateT
|
|||||||
# gam print vaultholds|holds [todrive <ToDriveAttribute>*] [matters <MatterItemList>]
|
# gam print vaultholds|holds [todrive <ToDriveAttribute>*] [matters <MatterItemList>]
|
||||||
# [fields <VaultHoldFieldNameList>] [shownames]
|
# [fields <VaultHoldFieldNameList>] [shownames]
|
||||||
# [formatjson [quotechar <Character>]]
|
# [formatjson [quotechar <Character>]]
|
||||||
|
# [oneitemperrow]
|
||||||
# gam show vaultholds|holds [matters <MatterItemList>]
|
# gam show vaultholds|holds [matters <MatterItemList>]
|
||||||
# [fields <VaultHoldFieldNameList>] [shownames]
|
# [fields <VaultHoldFieldNameList>] [shownames]
|
||||||
# [formatjson]
|
# [formatjson]
|
||||||
def doPrintShowVaultHolds():
|
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)
|
v = buildGAPIObject(API.VAULT)
|
||||||
csvPF = CSVPrintFile(PRINT_VAULT_HOLDS_TITLES, 'sortall') if Act.csvFormat() else None
|
csvPF = CSVPrintFile(PRINT_VAULT_HOLDS_TITLES, 'sortall') if Act.csvFormat() else None
|
||||||
FJQC = FormatJSONQuoteChar()
|
FJQC = FormatJSONQuoteChar()
|
||||||
matters = []
|
matters = []
|
||||||
cd = None
|
cd = None
|
||||||
fieldsList = []
|
fieldsList = []
|
||||||
|
oneItemPerRow = False
|
||||||
while Cmd.ArgumentsRemaining():
|
while Cmd.ArgumentsRemaining():
|
||||||
myarg = getArgument()
|
myarg = getArgument()
|
||||||
if csvPF and myarg == 'todrive':
|
if csvPF and myarg == 'todrive':
|
||||||
@@ -39336,6 +39347,8 @@ def doPrintShowVaultHolds():
|
|||||||
cd = buildGAPIObject(API.DIRECTORY)
|
cd = buildGAPIObject(API.DIRECTORY)
|
||||||
elif getFieldsList(myarg, VAULT_HOLD_FIELDS_CHOICE_MAP, fieldsList, initialField=['holdId', 'name']):
|
elif getFieldsList(myarg, VAULT_HOLD_FIELDS_CHOICE_MAP, fieldsList, initialField=['holdId', 'name']):
|
||||||
pass
|
pass
|
||||||
|
elif csvPF and myarg == 'oneitemperrow':
|
||||||
|
oneItemPerRow = True
|
||||||
else:
|
else:
|
||||||
FJQC.GetFormatJSONQuoteChar(myarg, False)
|
FJQC.GetFormatJSONQuoteChar(myarg, False)
|
||||||
fields = getItemFieldsFromFieldsList('holds', fieldsList)
|
fields = getItemFieldsFromFieldsList('holds', fieldsList)
|
||||||
@@ -39399,13 +39412,12 @@ def doPrintShowVaultHolds():
|
|||||||
else:
|
else:
|
||||||
for hold in holds:
|
for hold in holds:
|
||||||
_cleanVaultHold(hold, cd)
|
_cleanVaultHold(hold, cd)
|
||||||
row = flattenJSON(hold, flattened={'matterId': matterId, 'matterName': matterName}, timeObjects=VAULT_HOLD_TIME_OBJECTS)
|
if not oneItemPerRow or not hold.get('accounts', []):
|
||||||
if not FJQC.formatJSON:
|
_printVaultHold(hold)
|
||||||
csvPF.WriteRowTitles(row)
|
else:
|
||||||
elif csvPF.CheckRowTitles(row):
|
for account in hold.pop('accounts'):
|
||||||
csvPF.WriteRowNoFilter({'matterId': matterId, 'matterName': matterName,
|
hold['account'] = account
|
||||||
'holdId': hold['holdId'], 'name': hold['name'],
|
_printVaultHold(hold)
|
||||||
'JSON': json.dumps(cleanJSON(hold, timeObjects=VAULT_HOLD_TIME_OBJECTS), ensure_ascii=False, sort_keys=True)})
|
|
||||||
if csvPF:
|
if csvPF:
|
||||||
csvPF.writeCSVfile('Vault Holds')
|
csvPF.writeCSVfile('Vault Holds')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user