mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +00:00
Compare commits
5 Commits
v7.0.0
...
20240916.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4dab0bd4bb | ||
|
|
49ec0c6df4 | ||
|
|
f3d29c47e2 | ||
|
|
41b4577665 | ||
|
|
2ca813f209 |
40
.github/workflows/build.yml
vendored
40
.github/workflows/build.yml
vendored
@@ -31,68 +31,68 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-22.04
|
||||||
jid: 1
|
jid: 1
|
||||||
goal: build
|
goal: build
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
openssl_archs: linux-x86_64
|
openssl_archs: linux-x86_64
|
||||||
- os: [self-hosted, linux, arm64]
|
- os: ubuntu-20.04
|
||||||
jid: 2
|
jid: 2
|
||||||
goal: build
|
goal: build
|
||||||
|
arch: x86_64
|
||||||
|
openssl_archs: linux-x86_64
|
||||||
|
- os: [self-hosted, linux, arm64]
|
||||||
|
jid: 3
|
||||||
|
goal: build
|
||||||
arch: aarch64
|
arch: aarch64
|
||||||
openssl_archs: linux-aarch64
|
openssl_archs: linux-aarch64
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-20.04
|
||||||
jid: 3
|
jid: 4
|
||||||
goal: build
|
goal: build
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
openssl_archs: linux-x86_64
|
openssl_archs: linux-x86_64
|
||||||
staticx: yes
|
staticx: yes
|
||||||
- os: [self-hosted, linux, arm64]
|
- os: [self-hosted, linux, arm64]
|
||||||
jid: 4
|
jid: 5
|
||||||
goal: build
|
goal: build
|
||||||
arch: aarch64
|
arch: aarch64
|
||||||
openssl_archs: linux-aarch64
|
openssl_archs: linux-aarch64
|
||||||
staticx: yes
|
staticx: yes
|
||||||
- os: macos-12
|
- os: macos-12
|
||||||
jid: 5
|
jid: 6
|
||||||
goal: build
|
goal: build
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
openssl_archs: darwin64-x86_64
|
openssl_archs: darwin64-x86_64
|
||||||
- os: macos-14
|
- os: macos-14
|
||||||
jid: 6
|
jid: 7
|
||||||
goal: build
|
goal: build
|
||||||
arch: aarch64
|
arch: aarch64
|
||||||
openssl_archs: darwin64-arm64
|
openssl_archs: darwin64-arm64
|
||||||
- os: macos-14
|
|
||||||
jid: 7
|
|
||||||
goal: build
|
|
||||||
arch: universal2
|
|
||||||
openssl_archs: darwin64-arm64 darwin64-x86_64
|
|
||||||
- os: windows-2022
|
- os: windows-2022
|
||||||
jid: 8
|
jid: 9
|
||||||
goal: build
|
goal: build
|
||||||
arch: Win64
|
arch: Win64
|
||||||
openssl_archs: VC-WIN64A
|
openssl_archs: VC-WIN64A
|
||||||
- os: ubuntu-22.04
|
- os: ubuntu-22.04
|
||||||
goal: test
|
goal: test
|
||||||
python: "3.8"
|
python: "3.8"
|
||||||
jid: 9
|
|
||||||
arch: x86_64
|
|
||||||
- os: ubuntu-22.04
|
|
||||||
goal: test
|
|
||||||
python: "3.9"
|
|
||||||
jid: 10
|
jid: 10
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
- os: ubuntu-22.04
|
- os: ubuntu-22.04
|
||||||
goal: test
|
goal: test
|
||||||
python: "3.10"
|
python: "3.9"
|
||||||
jid: 11
|
jid: 11
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
- os: ubuntu-22.04
|
- os: ubuntu-22.04
|
||||||
goal: test
|
goal: test
|
||||||
python: "3.11"
|
python: "3.10"
|
||||||
jid: 12
|
jid: 12
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
goal: test
|
||||||
|
python: "3.11"
|
||||||
|
jid: 8
|
||||||
|
arch: x86_64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
cache.tar.xz
|
cache.tar.xz
|
||||||
key: gam-${{ matrix.jid }}-20240903
|
key: gam-${{ matrix.jid }}-20240916
|
||||||
|
|
||||||
- name: Untar Cache archive
|
- name: Untar Cache archive
|
||||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
|
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
|
||||||
|
|||||||
@@ -14,8 +14,10 @@
|
|||||||
- [Display Chrome policies](#display-chrome-policies)
|
- [Display Chrome policies](#display-chrome-policies)
|
||||||
- [Copy simple policies set directly in one OU to another OU](#copy-simple-policies-set-directly-in-one-ou-to-another-ou)
|
- [Copy simple policies set directly in one OU to another OU](#copy-simple-policies-set-directly-in-one-ou-to-another-ou)
|
||||||
- [Copy simple and complex policies set directly in one OU to another OU](#copy-simple-and-complex-policies-set-directly-in-one-ou-to-another-ou)
|
- [Copy simple and complex policies set directly in one OU to another OU](#copy-simple-and-complex-policies-set-directly-in-one-ou-to-another-ou)
|
||||||
|
- [Copy simple and complex policies set directly in one OU to multiple other OUs](#copy-simple-and-complex-policies-set-directly-in-one-ou-to-multiple-other-ous)
|
||||||
- [Copy simple policies in one Group to another Group](#copy-simple-policies-in-one-group-to-another-group)
|
- [Copy simple policies in one Group to another Group](#copy-simple-policies-in-one-group-to-another-group)
|
||||||
- [Copy simple and complex policies in one Group to another Group](#copy-simple-and-complex-policies-in-one-group-to-another-group)
|
- [Copy simple and complex policies in one Group to another Group](#copy-simple-and-complex-policies-in-one-group-to-another-group)
|
||||||
|
- [Copy simple and complex policies in one Group to multiple other Groups](#copy-simple-and-complex-policies-in-one-group-to-multiple-other-groups)
|
||||||
- [Create Chrome network](#create-chrome-network)
|
- [Create Chrome network](#create-chrome-network)
|
||||||
- [Delete Chrome network](#delete-chrome-network)
|
- [Delete Chrome network](#delete-chrome-network)
|
||||||
- [Chrome Policy Schema Table](#chrome-policy-schema-table)
|
- [Chrome Policy Schema Table](#chrome-policy-schema-table)
|
||||||
@@ -356,6 +358,22 @@ gam redirect csv ChromePolicies.csv print chromepolicies ou "/Path/To/OU1" forma
|
|||||||
gam config csv_input_row_filter "direct:boolean:true" csv ChromePolicies.csv quotechar "'" gam update chromepolicy "~name" json "~JSON" ou "/Path/To/OU2"
|
gam config csv_input_row_filter "direct:boolean:true" csv ChromePolicies.csv quotechar "'" gam update chromepolicy "~name" json "~JSON" ou "/Path/To/OU2"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Copy simple and complex policies set directly in one OU to multiple other OUs
|
||||||
|
Display direct policies, update all
|
||||||
|
```
|
||||||
|
gam redirect csv ChromePolicies.csv print chromepolicies ou "/Path/To/OU1" show direct formatjson quotechar "'"
|
||||||
|
```
|
||||||
|
Make a batch file (SetPolicies.bat) with a line for each target OU
|
||||||
|
```
|
||||||
|
gam csv ChromePolicies.csv quotechar "'" gam update chromepolicy "~name" json "~JSON" ou "/Path/To/OU2"
|
||||||
|
gam csv ChromePolicies.csv quotechar "'" gam update chromepolicy "~name" json "~JSON" ou "/Path/To/OU3"
|
||||||
|
...
|
||||||
|
```
|
||||||
|
Execute batch
|
||||||
|
```
|
||||||
|
gam redirect stdout ./SetPolicies.log multiprocess redirect stderr stdout tbatch SetPolicies.bat
|
||||||
|
```
|
||||||
|
|
||||||
## Copy simple policies in one Group to another Group
|
## Copy simple policies in one Group to another Group
|
||||||
Display all policies, update all
|
Display all policies, update all
|
||||||
```
|
```
|
||||||
@@ -369,6 +387,22 @@ gam redirect csv ChromePolicies.csv print chromepolicies group group1@domain.com
|
|||||||
gam csv ChromePolicies.csv quotechar "'" gam update chromepolicy "~name" json "~JSON" group group2@domain.com
|
gam csv ChromePolicies.csv quotechar "'" gam update chromepolicy "~name" json "~JSON" group group2@domain.com
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Copy simple and complex policies in one Group to multiple other Groups
|
||||||
|
Display all policies, update all
|
||||||
|
```
|
||||||
|
gam redirect csv ChromePolicies.csv print chromepolicies group group1@domain.com formatjson quotechar "'"
|
||||||
|
```
|
||||||
|
Make a batch file (SetPolicies.bat) with a line for each target group
|
||||||
|
```
|
||||||
|
gam csv ChromePolicies.csv quotechar "'" gam update chromepolicy "~name" json "~JSON" group group2@domain.com
|
||||||
|
gam csv ChromePolicies.csv quotechar "'" gam update chromepolicy "~name" json "~JSON" group group3@domain.com
|
||||||
|
...
|
||||||
|
```
|
||||||
|
Execute batch
|
||||||
|
```
|
||||||
|
gam redirect stdout ./SetPolicies.log multiprocess redirect stderr stdout tbatch SetPolicies.bat
|
||||||
|
```
|
||||||
|
|
||||||
## Create Chrome network
|
## Create Chrome network
|
||||||
See: [Chrome Policy Schema Table](#chrome-policy-schema-table) for the allowed network settings.
|
See: [Chrome Policy Schema Table](#chrome-policy-schema-table) for the allowed network settings.
|
||||||
* chrome.networks.ethernet.Details: Ethernet network configuration details.
|
* chrome.networks.ethernet.Details: Ethernet network configuration details.
|
||||||
|
|||||||
@@ -10,6 +10,15 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
|
|||||||
|
|
||||||
See [Downloads-Installs](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads-Installs) for Windows or other options, including manual installation
|
See [Downloads-Installs](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads-Installs) for Windows or other options, including manual installation
|
||||||
|
|
||||||
|
### 7.00.01
|
||||||
|
|
||||||
|
Added option `shownames` to `gam <UserTypeEntity> print|show sheet` that causes GAM
|
||||||
|
to make an additional API call to get and display the sheet file name that is not supplied by the Sheets API.
|
||||||
|
|
||||||
|
### 7.00.00
|
||||||
|
|
||||||
|
Merged GAM-Team version
|
||||||
|
|
||||||
### 6.81.02
|
### 6.81.02
|
||||||
|
|
||||||
Updated `gam update group postmaster@domain.com` to handle the error that is generated.
|
Updated `gam update group postmaster@domain.com` to handle the error that is generated.
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ writes the credentials into the file oauth2.txt.
|
|||||||
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
||||||
admin@server:/Users/admin$ gam version
|
admin@server:/Users/admin$ 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.81.02 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 7.00.01 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.5 64-bit final
|
Python 3.12.5 64-bit final
|
||||||
MacOS Sonoma 14.5 x86_64
|
MacOS Sonoma 14.5 x86_64
|
||||||
@@ -923,7 +923,7 @@ writes the credentials into the file oauth2.txt.
|
|||||||
C:\>del C:\GAMConfig\oauth2.txt
|
C:\>del C:\GAMConfig\oauth2.txt
|
||||||
C:\>gam version
|
C:\>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.81.02 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 7.00.01 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.5 64-bit final
|
Python 3.12.5 64-bit final
|
||||||
Windows-10-10.0.17134 AMD64
|
Windows-10-10.0.17134 AMD64
|
||||||
|
|||||||
@@ -231,18 +231,24 @@ gam user testuser@domain.com update sheet <DriveFileItem> json file Sheet.json
|
|||||||
gam <UserTypeEntity> info|show sheet <DriveFileEntity>
|
gam <UserTypeEntity> info|show sheet <DriveFileEntity>
|
||||||
[fields <SpreadsheetFieldList>] [sheetsfields <SpreadsheetSheetsFieldList>]
|
[fields <SpreadsheetFieldList>] [sheetsfields <SpreadsheetSheetsFieldList>]
|
||||||
(range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
|
(range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
|
||||||
[includegriddata [<Boolean>]]
|
[includegriddata [<Boolean>]] [shownames]
|
||||||
[formatjson]
|
[formatjson]
|
||||||
```
|
```
|
||||||
|
By default, the Sheets API does not return the sheet file name, use the `shownames` option to have GAM
|
||||||
|
make an additional API call to get and display the sheet file name.
|
||||||
|
|
||||||
The output is formatted for human readability. Use the following option to produce JSON output for program parsing.
|
The output is formatted for human readability. Use the following option to produce JSON output for program parsing.
|
||||||
* `formatjson` - Display output in JSON format.
|
* `formatjson` - Display output in JSON format.
|
||||||
```
|
```
|
||||||
gam <UserTypeEntity> print sheet <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
gam <UserTypeEntity> print sheet <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||||
[fields <SpreadsheetFieldList>] [sheetsfields <SpreadsheetSheetsFieldList>]
|
[fields <SpreadsheetFieldList>] [sheetsfields <SpreadsheetSheetsFieldList>]
|
||||||
(range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
|
(range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
|
||||||
[includegriddata [<Boolean>]]
|
[includegriddata [<Boolean>]] [shownames]
|
||||||
[formatjson [quotechar <Character>]]
|
[formatjson [quotechar <Character>]]
|
||||||
```
|
```
|
||||||
|
By default, the Sheets API does not return the sheet file name, use the `shownames` option to have GAM
|
||||||
|
make an additional API call to get and display the sheet file name.
|
||||||
|
|
||||||
By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
|
By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
|
||||||
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.
|
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.
|
||||||
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
|
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
|
||||||
|
|||||||
@@ -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.81.02 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 7.00.01 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.5 64-bit final
|
Python 3.12.5 64-bit final
|
||||||
MacOS Sonoma 14.5 x86_64
|
MacOS Sonoma 14.5 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.81.02 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 7.00.01 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.5 64-bit final
|
Python 3.12.5 64-bit final
|
||||||
MacOS Sonoma 14.5 x86_64
|
MacOS Sonoma 14.5 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.81.02 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 7.00.01 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.5 64-bit final
|
Python 3.12.5 64-bit final
|
||||||
MacOS Sonoma 14.5 x86_64
|
MacOS Sonoma 14.5 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.81.02
|
Latest: 7.00.01
|
||||||
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.81.02
|
7.00.01
|
||||||
```
|
```
|
||||||
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.81.02 - https://github.com/taers232c/GAMADV-XTD3
|
GAM 7.00.01 - https://github.com/taers232c/GAMADV-XTD3
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.12.5 64-bit final
|
Python 3.12.5 64-bit final
|
||||||
MacOS Sonoma 14.5 x86_64
|
MacOS Sonoma 14.5 x86_64
|
||||||
|
|||||||
@@ -3541,11 +3541,11 @@ gam [<UserTypeEntity>] show drivelabels
|
|||||||
[formatjson] [adminaccess|asadmin]
|
[formatjson] [adminaccess|asadmin]
|
||||||
`
|
`
|
||||||
gam [<UserTypeEntity>] create drivelabelpermission <DriveLabelNameEntity>
|
gam [<UserTypeEntity>] create drivelabelpermission <DriveLabelNameEntity>
|
||||||
(user <UserItem>) | (group <GroupItem) | (audience <String>)
|
(user <UserItem>) | (group <GroupItem>) | (audience <String>)
|
||||||
role applier|editor|organizer|reader
|
role applier|editor|organizer|reader
|
||||||
[formatjson] [adminaccess|asadmin]
|
[formatjson] [adminaccess|asadmin]
|
||||||
gam [<UserTypeEntity>] delete drivelabelpermission <DriveLabelNameEntity>
|
gam [<UserTypeEntity>] delete drivelabelpermission <DriveLabelNameEntity>
|
||||||
(user <UserItem>) | (group <GroupItem) | (audience <String>)
|
(user <UserItem>) | (group <GroupItem>) | (audience <String>)
|
||||||
[adminaccess|asadmin]
|
[adminaccess|asadmin]
|
||||||
gam [<UserTypeEntity>] remove drivelabelpermission <DriveLabelPermissionNameEntity>
|
gam [<UserTypeEntity>] remove drivelabelpermission <DriveLabelPermissionNameEntity>
|
||||||
[adminaccess|asadmin]
|
[adminaccess|asadmin]
|
||||||
@@ -7052,7 +7052,7 @@ gam <UserTypeEntity> show filecounts
|
|||||||
[corpora <CorporaAttribute>]
|
[corpora <CorporaAttribute>]
|
||||||
[select <SharedDriveEntity>]
|
[select <SharedDriveEntity>]
|
||||||
[anyowner|(showownedby any|me|others)]
|
[anyowner|(showownedby any|me|others)]
|
||||||
[showmimetype [not] <MimeTypeList>] [`<showmimetype category <MimeTypeNameList>]
|
[showmimetype [not] <MimeTypeList>] [showmimetype category <MimeTypeNameList>]
|
||||||
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
|
[sizefield quotabytesused|size] [minimumfilesize <Integer>] [maximumfilesize <Integer>]
|
||||||
[filenamematchpattern <RegularExpression>]
|
[filenamematchpattern <RegularExpression>]
|
||||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||||
@@ -8244,12 +8244,12 @@ gam <UserTypeEntity> update sheet <DriveFileEntity>
|
|||||||
gam <UserTypeEntity> info|show sheet <DriveFileEntity>
|
gam <UserTypeEntity> info|show sheet <DriveFileEntity>
|
||||||
[fields <SpreadsheetFieldList>] [sheetsfields <SpreadsheetSheetsFieldList>]
|
[fields <SpreadsheetFieldList>] [sheetsfields <SpreadsheetSheetsFieldList>]
|
||||||
(range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
|
(range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
|
||||||
[includegriddata [<Boolean>]]
|
[includegriddata [<Boolean>]] [shownames]
|
||||||
[formatjson]
|
[formatjson]
|
||||||
gam <UserTypeEntity> print sheet <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
gam <UserTypeEntity> print sheet <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||||
[fields <SpreadsheetFieldList>] [sheetsfields <SpreadsheetSheetsFieldList>]
|
[fields <SpreadsheetFieldList>] [sheetsfields <SpreadsheetSheetsFieldList>]
|
||||||
(range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
|
(range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
|
||||||
[includegriddata [<Boolean>]]
|
[includegriddata [<Boolean>]] [shownames]
|
||||||
[formatjson [quotechar <Character>]]
|
[formatjson [quotechar <Character>]]
|
||||||
|
|
||||||
See: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values#ValueRange
|
See: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values#ValueRange
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
7.00.01
|
||||||
|
|
||||||
|
Added option `shownames` to `gam <UserTypeEntity> print|show sheet` that causes GAM
|
||||||
|
to make an additional API call to get and display the sheet file name that is not supplied by the Sheets API.
|
||||||
|
|
||||||
|
|
||||||
7.00.00
|
7.00.00
|
||||||
|
|
||||||
Merged GAM-Team version
|
Merged GAM-Team version
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ OPTIONS:
|
|||||||
-u Admin user email address to use with GAM. Default is to prompt.
|
-u Admin user email address to use with GAM. Default is to prompt.
|
||||||
-r Regular user email address. Used to test service account access to user data. Default is to prompt.
|
-r Regular user email address. Used to test service account access to user data. Default is to prompt.
|
||||||
-v Version to install (latest, prerelease, draft, 3.8, etc). Default is latest.
|
-v Version to install (latest, prerelease, draft, 3.8, etc). Default is latest.
|
||||||
-s Strip gam7 component from extracted files, files will be downloaded directly to $target_dir
|
-s Strip gam component from extracted files, files will be downloaded directly to $target_dir
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ upgrade_only=false
|
|||||||
gamversion="latest"
|
gamversion="latest"
|
||||||
adminuser=""
|
adminuser=""
|
||||||
regularuser=""
|
regularuser=""
|
||||||
gam_x86_64_glibc_vers="2.31"
|
gam_x86_64_glibc_vers="2.35 2.31"
|
||||||
gam_arm64_glibc_vers="2.31"
|
gam_arm64_glibc_vers="2.31"
|
||||||
strip_gam="--strip-components 0"
|
strip_gam="--strip-components 0"
|
||||||
|
|
||||||
@@ -141,7 +141,25 @@ case $gamos in
|
|||||||
;;
|
;;
|
||||||
[Mm]ac[Oo][sS]|[Dd]arwin)
|
[Mm]ac[Oo][sS]|[Dd]arwin)
|
||||||
gamos="macos"
|
gamos="macos"
|
||||||
gamfile="macos-universal2.tar.xz"
|
case $gamarch in
|
||||||
|
x86_64)
|
||||||
|
fullversion=$(sw_vers -productVersion)
|
||||||
|
osversion=${fullversion:0:2}
|
||||||
|
case ${osversion:0:2} in
|
||||||
|
11|12|13|14)
|
||||||
|
gamfile="macos-x86_64.tar.xz";;
|
||||||
|
*)
|
||||||
|
echo_red "Sorry, this version ($fullversion) of MacOS is not supported. Exiting."
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
arm|arm64|aarch64)
|
||||||
|
gamfile="macos-aarch64.tar.xz";;
|
||||||
|
*)
|
||||||
|
echo_red "ERROR: this installer currently only supports x86_64 and arm64 MacOS. Looks like you're running on $gamarch. Exiting."
|
||||||
|
exit
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
MINGW64_NT*)
|
MINGW64_NT*)
|
||||||
gamos="windows"
|
gamos="windows"
|
||||||
@@ -154,7 +172,9 @@ case $gamos in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ "$gamversion" == "latest" -o "$gamversion" == "prerelease" -o "$gamversion" == "draft" ]; then
|
if [ "$gamversion" == "latest" ]; then
|
||||||
|
release_url="https://api.github.com/repos/GAM-team/GAM/releases/latest"
|
||||||
|
elif [ "$gamversion" == "prerelease" -o "$gamversion" == "draft" ]; then
|
||||||
release_url="https://api.github.com/repos/GAM-team/GAM/releases"
|
release_url="https://api.github.com/repos/GAM-team/GAM/releases"
|
||||||
else
|
else
|
||||||
release_url="https://api.github.com/repos/GAM-team/GAM/releases/tags/v$gamversion"
|
release_url="https://api.github.com/repos/GAM-team/GAM/releases/tags/v$gamversion"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
||||||
__version__ = '7.00.00'
|
__version__ = '7.00.01'
|
||||||
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||||
|
|
||||||
#pylint: disable=wrong-import-position
|
#pylint: disable=wrong-import-position
|
||||||
@@ -66995,14 +66995,14 @@ SPREADSHEET_SHEETS_SUBFIELDS_CHOICE_MAP = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# gam <UserTypeEntity> info|show sheet <DriveFileEntity>
|
# gam <UserTypeEntity> info|show sheet <DriveFileEntity>
|
||||||
# [fields <SpreadsheetFieldList>]
|
# [fields <SpreadsheetFieldList>] [sheetsfields <SpreadsheetSheetsFieldList>]
|
||||||
# (range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
|
# (range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
|
||||||
# [includegriddata [<Boolean>]]
|
# [includegriddata [<Boolean>]] [shownames]
|
||||||
# [formatjson]
|
# [formatjson]
|
||||||
# gam <UserTypeEntity> print sheet <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
# gam <UserTypeEntity> print sheet <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||||
# [fields <SpreadsheetFieldList>]
|
# [fields <SpreadsheetFieldList>] [sheetsfields <SpreadsheetSheetsFieldList>]
|
||||||
# (range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
|
# (range <SpreadsheetRange>)* (rangelist <SpreadsheetRangeList>)*
|
||||||
# [includegriddata [<Boolean>]]
|
# [includegriddata [<Boolean>]] [shownames]
|
||||||
# [formatjson [quotechar <Character>]]
|
# [formatjson [quotechar <Character>]]
|
||||||
def infoPrintShowSheets(users):
|
def infoPrintShowSheets(users):
|
||||||
csvPF = CSVPrintFile(['User', 'spreadsheetId'], 'sortall') if Act.csvFormat() else None
|
csvPF = CSVPrintFile(['User', 'spreadsheetId'], 'sortall') if Act.csvFormat() else None
|
||||||
@@ -67010,7 +67010,7 @@ def infoPrintShowSheets(users):
|
|||||||
spreadsheetIdEntity = getDriveFileEntity()
|
spreadsheetIdEntity = getDriveFileEntity()
|
||||||
fieldsList = []
|
fieldsList = []
|
||||||
ranges = []
|
ranges = []
|
||||||
includeGridData = False
|
includeGridData = showSheetNames = False
|
||||||
while Cmd.ArgumentsRemaining():
|
while Cmd.ArgumentsRemaining():
|
||||||
myarg = getArgument()
|
myarg = getArgument()
|
||||||
if csvPF and myarg == 'todrive':
|
if csvPF and myarg == 'todrive':
|
||||||
@@ -67029,8 +67029,16 @@ def infoPrintShowSheets(users):
|
|||||||
fieldsList.append(SPREADSHEET_SHEETS_SUBFIELDS_CHOICE_MAP[field])
|
fieldsList.append(SPREADSHEET_SHEETS_SUBFIELDS_CHOICE_MAP[field])
|
||||||
else:
|
else:
|
||||||
invalidChoiceExit(field, SPREADSHEET_SHEETS_SUBFIELDS_CHOICE_MAP, True)
|
invalidChoiceExit(field, SPREADSHEET_SHEETS_SUBFIELDS_CHOICE_MAP, True)
|
||||||
|
elif myarg == 'shownames':
|
||||||
|
showSheetNames = True
|
||||||
else:
|
else:
|
||||||
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
||||||
|
if csvPF and showSheetNames:
|
||||||
|
csvPF.AddTitles('spreadsheetName')
|
||||||
|
csvPF.SetSortAllTitles()
|
||||||
|
if FJQC.formatJSON:
|
||||||
|
csvPF.AddJSONTitles('spreadsheetName')
|
||||||
|
csvPF.MoveJSONTitlesToEnd(['JSON'])
|
||||||
if includeGridData and fieldsList:
|
if includeGridData and fieldsList:
|
||||||
fieldsList.append(SPREADSHEET_SHEETS_SUBFIELDS_CHOICE_MAP['data'])
|
fieldsList.append(SPREADSHEET_SHEETS_SUBFIELDS_CHOICE_MAP['data'])
|
||||||
fields = getFieldsFromFieldsList(fieldsList)
|
fields = getFieldsFromFieldsList(fieldsList)
|
||||||
@@ -67040,6 +67048,10 @@ def infoPrintShowSheets(users):
|
|||||||
user, sheet, jcount = _validateUserGetSpreadsheetIDs(user, i, count, spreadsheetIdEntity, not FJQC.formatJSON)
|
user, sheet, jcount = _validateUserGetSpreadsheetIDs(user, i, count, spreadsheetIdEntity, not FJQC.formatJSON)
|
||||||
if jcount == 0:
|
if jcount == 0:
|
||||||
continue
|
continue
|
||||||
|
if showSheetNames:
|
||||||
|
_, drive = buildGAPIServiceObject(API.DRIVE3, user, i, count)
|
||||||
|
if not drive:
|
||||||
|
continue
|
||||||
Ind.Increment()
|
Ind.Increment()
|
||||||
j = 0
|
j = 0
|
||||||
for spreadsheetId in spreadsheetIdEntity['list']:
|
for spreadsheetId in spreadsheetIdEntity['list']:
|
||||||
@@ -67051,10 +67063,24 @@ def infoPrintShowSheets(users):
|
|||||||
if not includeGridData and 'sheets' in result:
|
if not includeGridData and 'sheets' in result:
|
||||||
for usheet in result['sheets']:
|
for usheet in result['sheets']:
|
||||||
usheet.pop('data', None)
|
usheet.pop('data', None)
|
||||||
|
if showSheetNames:
|
||||||
|
try:
|
||||||
|
spreadsheetName = callGAPI(drive.files(), 'get',
|
||||||
|
throwReasons=GAPI.DRIVE_GET_THROW_REASONS,
|
||||||
|
fileId=spreadsheetId, fields='name', supportsAllDrives=True)['name']
|
||||||
|
except (GAPI.fileNotFound, GAPI.serviceNotAvailable, GAPI.authError, GAPI.domainPolicy):
|
||||||
|
spreadsheetName = spreadsheetId
|
||||||
if not csvPF:
|
if not csvPF:
|
||||||
if FJQC.formatJSON:
|
if FJQC.formatJSON:
|
||||||
printLine('{'+f'"User": "{user}", "spreadsheetId": "{spreadsheetId}", "JSON": {json.dumps(result, ensure_ascii=False, sort_keys=False)}'+'}')
|
baserow = {'User': user, 'spreadsheetId': spreadsheetId}
|
||||||
|
if showSheetNames:
|
||||||
|
baserow['spreadsheetName'] = spreadsheetName
|
||||||
|
baserow['JSON'] = result
|
||||||
|
printLine(json.dumps(baserow, ensure_ascii=False, sort_keys=False)+'\n')
|
||||||
continue
|
continue
|
||||||
|
if showSheetNames:
|
||||||
|
printEntity([Ent.SPREADSHEET, f'{spreadsheetName}({spreadsheetId})'], j, jcount)
|
||||||
|
else:
|
||||||
printEntity([Ent.SPREADSHEET, spreadsheetId], j, jcount)
|
printEntity([Ent.SPREADSHEET, spreadsheetId], j, jcount)
|
||||||
Ind.Increment()
|
Ind.Increment()
|
||||||
if 'spreadsheetUrl' in result:
|
if 'spreadsheetUrl' in result:
|
||||||
@@ -67074,12 +67100,15 @@ def infoPrintShowSheets(users):
|
|||||||
Ind.Decrement()
|
Ind.Decrement()
|
||||||
Ind.Decrement()
|
Ind.Decrement()
|
||||||
else:
|
else:
|
||||||
row = flattenJSON(result, flattened={'User': user, 'spreadsheetId': spreadsheetId})
|
baserow = {'User': user, 'spreadsheetId': spreadsheetId}
|
||||||
|
if showSheetNames:
|
||||||
|
baserow['spreadsheetName'] = spreadsheetName
|
||||||
|
row = flattenJSON(result, flattened=baserow.copy())
|
||||||
if not FJQC.formatJSON:
|
if not FJQC.formatJSON:
|
||||||
csvPF.WriteRowTitles(row)
|
csvPF.WriteRowTitles(row)
|
||||||
elif csvPF.CheckRowTitles(row):
|
elif csvPF.CheckRowTitles(row):
|
||||||
csvPF.WriteRowNoFilter({'User': user, 'spreadsheetId': spreadsheetId,
|
baserow['JSON'] = json.dumps(cleanJSON(result), ensure_ascii=False, sort_keys=False)
|
||||||
'JSON': json.dumps(result, ensure_ascii=False, sort_keys=False)})
|
csvPF.WriteRowNoFilter(baserow)
|
||||||
except (GAPI.notFound, GAPI.forbidden, GAPI.permissionDenied,
|
except (GAPI.notFound, GAPI.forbidden, GAPI.permissionDenied,
|
||||||
GAPI.internalError, GAPI.insufficientFilePermissions, GAPI.badRequest,
|
GAPI.internalError, GAPI.insufficientFilePermissions, GAPI.badRequest,
|
||||||
GAPI.invalid, GAPI.invalidArgument, GAPI.failedPrecondition) as e:
|
GAPI.invalid, GAPI.invalidArgument, GAPI.failedPrecondition) as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user