Compare commits

...

5 Commits

Author SHA1 Message Date
Ross Scroggs
944e2ed5f4 Fixed bug in gam print cigroups ... descriptionmatchpattern [not] <REMatchPattern> 2025-11-19 09:24:45 -08:00
Ross Scroggs
0e7c3bee6a Update Classroom-Membership.md 2025-11-19 08:41:25 -08:00
Ross Scroggs
86e827ee66 Update Classroom-Membership.md 2025-11-19 08:13:49 -08:00
Ross Scroggs
3491267f9d Update Reports.md 2025-11-19 07:29:28 -08:00
Ross Scroggs
4b97accc21 Updated gam <UserTypeEntity> print|show chatmessages to improve performance
Some checks failed
Push wiki / pushwiki (push) Has been cancelled
Build and test GAM / build (false, build, 1, Build Intel Ubuntu Jammy, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (false, build, 10, Build x86_64 macOS 15, macos-15-intel) (push) Has been cancelled
Build and test GAM / build (false, build, 11, Build Arm MacOS 26, macos-26) (push) Has been cancelled
Build and test GAM / build (false, build, 12, Build Intel Windows, windows-2025) (push) Has been cancelled
Build and test GAM / build (false, build, 13, Build Arm Windows, windows-11-arm) (push) Has been cancelled
Build and test GAM / build (false, build, 2, Build Intel Ubuntu Noble, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (false, build, 3, Build Arm Ubuntu Noble, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (false, build, 4, Build Arm Ubuntu Jammy, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (false, build, 5, Build Intel StaticX Legacy, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (false, build, 6, Build Arm StaticX Legacy, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (false, build, 8, Build Arm MacOS 14, macos-14) (push) Has been cancelled
Build and test GAM / build (false, build, 9, Build Arm MacOS 15, macos-15) (push) Has been cancelled
Build and test GAM / build (false, test, 14, Test Python 3.10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (false, test, 15, Test Python 3.11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (false, test, 16, Test Python 3.12, ubuntu-24.04, 3.12) (push) Has been cancelled
Build and test GAM / build (false, test, 17, Test Python 3.15-dev, ubuntu-24.04, 3.15-dev) (push) Has been cancelled
Build and test GAM / build (true, test, 18, Test Python 3.14 freethread, ubuntu-24.04, 3.14) (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
2025-11-18 13:59:41 -08:00
7 changed files with 45 additions and 13 deletions

View File

@@ -1,3 +1,7 @@
7.28.09
Fixed bug in `gam print cigroups ... descriptionmatchpattern [not] <REMatchPattern>` that caused a trap.
7.28.08
Updated `gam <UserTypeEntity> print|show chatmessages` to cache the sender UID to email address
@@ -17320,7 +17324,7 @@ Current version of Gam with drive_v3_name_names = false
Owner,title,parents,parents.0.id,parents.1.id
testuser@domain.com,TestFile,2,PPPP1111,PPPP2222
Current version of Gam with drive_v3_name_names = true
Current version of Gam with drive_v3_name_names = true
Owner,name,parents
testuser@domain.com,TestFile,PPPP1111 PPPP2222

View File

@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
"""
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
__version__ = '7.28.08'
__version__ = '7.28.09'
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
#pylint: disable=wrong-import-position
@@ -34700,10 +34700,10 @@ def checkGroupMatchPatterns(groupEmail, group, matchPatterns):
return False
else: # field in {'name', 'displayName', 'description'}:
if not matchp['not']:
if not matchp['pattern'].match(group[field]):
if not matchp['pattern'].match(group.get(field, '')):
return False
else:
if matchp['pattern'].match(group[field]):
if matchp['pattern'].match(group.get(field, '')):
return False
return True

View File

@@ -7,6 +7,7 @@
- [Bulk membership changes](#bulk-membership-changes)
- [Display course membership](#display-course-membership)
- [Display course membership counts](#display-course-membership-counts)
- [Display course counts for teachers-students](#display-course-counts-for-teachers-students)
## API documentation
* [Google Classroom API](https://developers.google.com/classroom/reference/rest)
@@ -167,3 +168,24 @@ $count = & gam print course-participants teacher asmith states active show stude
Windows Command Prompt
for /f "delims=" %a in ('gam print course-participants teacher asmith states active show students showitemcountonly') do set count=%a
```
## Display course counts for teachers-students
You can get a count of the number of courses in which a teacher or student is a participant.
```
gam config csv_output_header_filter profile.emailAddress redirect csv ./Teachers.csv print course-participants states active show teachers
gam config csv_output_header_filter profile.emailAddress redirect csv ./Students.csv print course-participants states active show students
```
Download the following script: https://github.com/taers232c/GAM-Scripts3/blob/master/CountKeyValues.py
Edit the script.
```
KEY_FIELD = 'profile.emailAddress' # Set to a column header in KeyValues.csv
MIN_KEY_COUNT = 0 # 0 - Show all counts; N - Show counts >= N
```
Run the script.
```
python ./CountKeyValues.py Teachers.csv TeacherCounts.csv
python ./CountKeyValues.py Students.csv StudentCounts.csv
```

View File

@@ -10,6 +10,11 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation
### 7.28.08
Updated `gam <UserTypeEntity> print|show chatmessages` to cache the sender UID to email address
map so that each sender UID only has to be looked up once; this improves performance.
### 7.28.07
Fixed bug in `gam report users ... aggregatebydate|aggregatebyuser` where `accounts:used_quota_in_percentage` was incorrectly displayed.

View File

@@ -252,7 +252,7 @@ writes the credentials into the file oauth2.txt.
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
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
GAM 7.28.07 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.28.08 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final
macOS Tahoe 26.1 x86_64
@@ -990,7 +990,7 @@ writes the credentials into the file oauth2.txt.
C:\>del C:\GAMConfig\oauth2.txt
C:\>gam version
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
GAM 7.28.07 - https://github.com/GAM-team/GAM - pythonsource
GAM 7.28.08 - https://github.com/GAM-team/GAM - pythonsource
GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final
Windows 11 10.0.26200 AMD64

View File

@@ -52,11 +52,12 @@ config csv_output_row_filter "'\"accounts:used_quota_in_mb\":count>15000'"
chrome|
classroom|
contextawareaccess|
gplus|currents|google+|
datastudio|
drive|doc|docs|
gcp|cloud|
geminiinworkspaceapps|gemini|geminiforworkspace|
gmail|
gplus|currents|google+|
groups|group|
groupsenterprise|enterprisegroups|
jamboard|

View File

@@ -3,7 +3,7 @@
Print the current version of Gam with details
```
gam version
GAM 7.28.07 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.28.08 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final
macOS Tahoe 26.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
GAM 7.28.07 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.28.08 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final
macOS Tahoe 26.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
GAM 7.28.07 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.28.08 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final
macOS Tahoe 26.1 x86_64
@@ -68,7 +68,7 @@ MacOS High Sierra 10.13.6 x86_64
Path: /Users/Admin/bin/gam7
Version Check:
Current: 5.35.08
Latest: 7.28.07
Latest: 7.28.08
echo $?
1
```
@@ -76,7 +76,7 @@ echo $?
Print the current version number without details
```
gam version simple
7.28.07
7.28.08
```
In Linux/MacOS you can do:
```
@@ -86,7 +86,7 @@ echo $VER
Print the current version of Gam and address of this Wiki
```
gam help
GAM 7.28.07 - https://github.com/GAM-team/GAM
GAM 7.28.08 - https://github.com/GAM-team/GAM
GAM Team <google-apps-manager@googlegroups.com>
Python 3.14.0 64-bit final
macOS Tahoe 26.1 x86_64