Added option oneitemperrow to 'gam print course-materials|course-work`

This commit is contained in:
Ross Scroggs
2025-09-29 19:18:57 -07:00
parent 0c5f747c36
commit 33b60c4b14
4 changed files with 20 additions and 4 deletions

View File

@@ -570,6 +570,7 @@ gam print course-materials [todrive <ToDriveAttribute>*]
(orderby <CourseMaterialOrderByFieldName> [ascending|descending])*) (orderby <CourseMaterialOrderByFieldName> [ascending|descending])*)
[showcreatoremails|creatoremail] [showtopicnames] [fields <CourseMaterialFieldNameList>] [showcreatoremails|creatoremail] [showtopicnames] [fields <CourseMaterialFieldNameList>]
[timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>] [timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
[oneitemperrow]
[countsonly] [formatjson [quotechar <Character>]] [countsonly] [formatjson [quotechar <Character>]]
``` ```
By default, the `print course-materials` command displays course materials information for all courses. By default, the `print course-materials` command displays course materials information for all courses.
@@ -600,6 +601,10 @@ By default, all course materials fields are displayed; use the following options
* `showtopicnames` - Display topic names; requires and additional API call per course. * `showtopicnames` - Display topic names; requires and additional API call per course.
* `fields <CourseMaterialsFieldNameList>` - Select specific fields to display. * `fields <CourseMaterialsFieldNameList>` - Select specific fields to display.
With `print course-materials`, the materials selected for display are all output on one row/line as a repeating item with the other course fields.
When `oneitemperrow` is specified, each material is output on a separate row/line with the other course fields.
This simplifies processing the materials in the CSV file with subsequent Gam commands.
Use the `countsonly` option to display the number of course materials in a course but not their details. Use the `countsonly` option to display the number of course materials in a course but not their details.
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,
@@ -662,6 +667,7 @@ gam print course-work [todrive <ToDriveAttribute>*]
[showcreatoremails] [showtopicnames] [fields <CourseWorkFieldNameList>] [showcreatoremails] [showtopicnames] [fields <CourseWorkFieldNameList>]
[showstudentsaslist [<Boolean>]] [delimiter <Character>] [showstudentsaslist [<Boolean>]] [delimiter <Character>]
[timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>] [timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
[oneitemperrow]
[countsonly] [formatjson [quotechar <Character>]] [countsonly] [formatjson [quotechar <Character>]]
``` ```
By default, the `print course-work` command displays course work information for all courses. By default, the `print course-work` command displays course work information for all courses.
@@ -695,6 +701,10 @@ By default, all course work fields are displayed; use the following options to m
By default, when course work is assigned to individual students, the student IDs are displayed in multiple indexed columns. By default, when course work is assigned to individual students, the student IDs are displayed in multiple indexed columns.
Use options `showstudentsaslist [<Boolean>]` and `delimiter <Character>` to display the student IDs is a single column as a delimited list. Use options `showstudentsaslist [<Boolean>]` and `delimiter <Character>` to display the student IDs is a single column as a delimited list.
With `print course-work`, any materials are all output on one row/line as a repeating item with the other course fields.
When `oneitemperrow` is specified, each material is output on a separate row/line with the other course fields.
This simplifies processing the materials in the CSV file with subsequent Gam commands.
Use the `countsonly` option to display the number of course works in a course but not their details. Use the `countsonly` option to display the number of course works in a course but not their details.
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,

View File

@@ -10,6 +10,12 @@ 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 See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation
### 7.23.01
Added option `oneitemperrow` to 'gam print course-materials|course-work` to have each of a
course's materials displayed on a separate row with all of the other course fields.
This produces a CSV file that can be used in subsequent commands to process the materials without further script processing.
### 7.23.00 ### 7.23.00
Added `chat_max_results` variable to `gam.cfg`. Added `chat_max_results` variable to `gam.cfg`.

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$ 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
GAM 7.23.00 - https://github.com/GAM-team/GAM - pyinstaller GAM 7.23.01 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com> GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.7 64-bit final Python 3.13.7 64-bit final
MacOS Sequoia 15.6.1 x86_64 MacOS Sequoia 15.6.1 x86_64

View File

@@ -3,7 +3,7 @@
Print the current version of Gam with details Print the current version of Gam with details
``` ```
gam version gam version
GAM 7.23.00 - https://github.com/GAM-team/GAM - pyinstaller GAM 7.23.01 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com> GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.7 64-bit final Python 3.13.7 64-bit final
macOS Sequoia 15.7 x86_64 macOS Sequoia 15.7 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
GAM 7.23.00 - https://github.com/GAM-team/GAM - pyinstaller GAM 7.23.01 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com> GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.7 64-bit final Python 3.13.7 64-bit final
macOS Sequoia 15.7 x86_64 macOS Sequoia 15.7 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
GAM 7.23.00 - https://github.com/GAM-team/GAM - pyinstaller GAM 7.23.01 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com> GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.7 64-bit final Python 3.13.7 64-bit final
macOS Sequoia 15.7 x86_64 macOS Sequoia 15.7 x86_64