gam7 7.23.0__py3-none-any.whl → 7.23.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gam7 might be problematic. Click here for more details.

gam/__init__.py CHANGED
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
25
25
  """
26
26
 
27
27
  __author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
28
- __version__ = '7.23.00'
28
+ __version__ = '7.23.03'
29
29
  __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
30
30
 
31
31
  #pylint: disable=wrong-import-position
@@ -27237,7 +27237,7 @@ def createChatMember(users):
27237
27237
  throwReasons=[GAPI.ALREADY_EXISTS, GAPI.NOT_FOUND, GAPI.INVALID, GAPI.INVALID_ARGUMENT,
27238
27238
  GAPI.INTERNAL_ERROR, GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
27239
27239
  parent=parent, body=body, **kwargsUAA)
27240
- if role != 'ROLE_MEMBER' and entityType == Ent.CHAT_MANAGER_USER:
27240
+ if role != 'ROLE_MEMBER' and entityType in (Ent.CHAT_MANAGER_USER, Ent.CHAT_OWNER_USER):
27241
27241
  member = callGAPI(chat.spaces().members(), 'patch',
27242
27242
  bailOnInternalError=True,
27243
27243
  throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR,
@@ -49473,6 +49473,16 @@ def doPrintCourseWM(entityIDType, entityStateType):
49473
49473
  pass
49474
49474
  return topicNames
49475
49475
 
49476
+ def _printCourseWMrow(course, courseWM):
49477
+ row = flattenJSON(courseWM, flattened={'courseId': course['id'], 'courseName': course['name']}, timeObjects=TimeObjects,
49478
+ simpleLists=['studentIds'] if showStudentsAsList else None, delimiter=delimiter)
49479
+ if not FJQC.formatJSON:
49480
+ csvPF.WriteRowTitles(row)
49481
+ elif csvPF.CheckRowTitles(row):
49482
+ csvPF.WriteRowNoFilter({'courseId': course['id'], 'courseName': course['name'],
49483
+ 'JSON': json.dumps(cleanJSON(courseWM, timeObjects=TimeObjects),
49484
+ ensure_ascii=False, sort_keys=True)})
49485
+
49476
49486
  def _printCourseWM(course, courseWM, i, count):
49477
49487
  if applyCourseItemFilter and not _courseItemPassesFilter(courseWM, courseItemFilter):
49478
49488
  return
@@ -49484,14 +49494,13 @@ def doPrintCourseWM(entityIDType, entityStateType):
49484
49494
  topicId = courseWM.get('topicId')
49485
49495
  if topicId:
49486
49496
  courseWM['topicName'] = topicNames.get(topicId, topicId)
49487
- row = flattenJSON(courseWM, flattened={'courseId': course['id'], 'courseName': course['name']}, timeObjects=TimeObjects,
49488
- simpleLists=['studentIds'] if showStudentsAsList else None, delimiter=delimiter)
49489
- if not FJQC.formatJSON:
49490
- csvPF.WriteRowTitles(row)
49491
- elif csvPF.CheckRowTitles(row):
49492
- csvPF.WriteRowNoFilter({'courseId': course['id'], 'courseName': course['name'],
49493
- 'JSON': json.dumps(cleanJSON(courseWM, timeObjects=TimeObjects),
49494
- ensure_ascii=False, sort_keys=True)})
49497
+ if not oneItemPerRow or not courseWM.get('materials', []):
49498
+ _printCourseWMrow(course, courseWM)
49499
+ else:
49500
+ courseMaterials = courseWM.pop('materials')
49501
+ for courseMaterial in courseMaterials:
49502
+ courseWM['materials'] = courseMaterial
49503
+ _printCourseWMrow(course, courseWM)
49495
49504
 
49496
49505
  croom = buildGAPIObject(API.CLASSROOM)
49497
49506
  if entityIDType == Ent.COURSE_WORK_ID:
@@ -49529,7 +49538,7 @@ def doPrintCourseWM(entityIDType, entityStateType):
49529
49538
  courseShowProperties = _initCourseShowProperties(['name'])
49530
49539
  OBY = OrderBy(OrderbyChoiceMap)
49531
49540
  creatorEmails = {}
49532
- showCreatorEmail = showTopicNames = False
49541
+ oneItemPerRow = showCreatorEmail = showTopicNames = False
49533
49542
  delimiter = GC.Values[GC.CSV_OUTPUT_FIELD_DELIMITER]
49534
49543
  countsOnly = showStudentsAsList = False
49535
49544
  while Cmd.ArgumentsRemaining():
@@ -49546,6 +49555,9 @@ def doPrintCourseWM(entityIDType, entityStateType):
49546
49555
  pass
49547
49556
  elif myarg == 'orderby':
49548
49557
  OBY.GetChoice()
49558
+ elif myarg == 'oneitemperrow':
49559
+ oneItemPerRow = True
49560
+ csvPF.RemoveIndexedTitles('materials')
49549
49561
  elif myarg in {'showcreatoremails', 'creatoremail'}:
49550
49562
  showCreatorEmail = True
49551
49563
  elif myarg == 'showtopicnames':
@@ -49626,6 +49638,7 @@ def doPrintCourseWM(entityIDType, entityStateType):
49626
49638
  # (orderby <CourseMaterialsOrderByFieldName> [ascending|descending])*)
49627
49639
  # [showcreatoremails|creatoremail] [showtopicnames] [fields <CourseMaterialFieldNameList>]
49628
49640
  # [timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
49641
+ # [oneitemperrow]
49629
49642
  # [countsonly] [formatjson [quotechar <Character>]]
49630
49643
  def doPrintCourseMaterials():
49631
49644
  doPrintCourseWM(Ent.COURSE_MATERIAL_ID, Ent.COURSE_MATERIAL_STATE)
@@ -49637,6 +49650,7 @@ def doPrintCourseMaterials():
49637
49650
  # [showcreatoremails|creatoremail] [showtopicnames] [fields <CourseWorkFieldNameList>]
49638
49651
  # [showstudentsaslist [<Boolean>]] [delimiter <Character>]
49639
49652
  # [timefilter creationtime|updatetime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
49653
+ # [oneitemperrow]
49640
49654
  # [countsonly] [formatjson [quotechar <Character>]]
49641
49655
  def doPrintCourseWork():
49642
49656
  doPrintCourseWM(Ent.COURSE_WORK_ID, Ent.COURSE_WORK_STATE)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gam7
3
- Version: 7.23.0
3
+ Version: 7.23.3
4
4
  Summary: CLI tool to manage Google Workspace
5
5
  Project-URL: Homepage, https://github.com/GAM-team/GAM
6
6
  Project-URL: Issues, https://github.com/GAM-team/GAM/issues
@@ -1,4 +1,4 @@
1
- gam/__init__.py,sha256=B15MBh8MjHLx7wUI6Mu-cjocTqeiWBLc0Eszj9RcLKk,3618696
1
+ gam/__init__.py,sha256=dsuX4wazwrCSeB0f4J_CsvPREAC7MCb42Q7raQSmcKE,3619223
2
2
  gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
3
3
  gam/cacerts.pem,sha256=DUsVo2XlFYwfkhe3gnxa-Km4Z4noz74hSApXwTT-nQE,44344
4
4
  gam/cbcm-v1.1beta1.json,sha256=xO5XloCQQULmPbFBx5bckdqmbLFQ7sJ2TImhE1ysDIY,19439
@@ -47,8 +47,8 @@ gam/gdata/apps/audit/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrK
47
47
  gam/gdata/apps/audit/service.py,sha256=Z1eueThcNeVUMWP1DRWc_DGHrJCiJI8W_xj6L-cqu-Q,9658
48
48
  gam/gdata/apps/contacts/__init__.py,sha256=Um6zgIkiahZns7yAEuC3pxHSMD8iciZ_EoynSLoYPfU,30463
49
49
  gam/gdata/apps/contacts/service.py,sha256=5lNb-Ii1Gyek6ePFji3kyoYtCBc8CuJTwagx2BL2o14,15684
50
- gam7-7.23.0.dist-info/METADATA,sha256=6bM_Q9wj9LkT4QtgN-MnPfL6gwaWjLf-c6qSDtSW5dM,3092
51
- gam7-7.23.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
52
- gam7-7.23.0.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
53
- gam7-7.23.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
54
- gam7-7.23.0.dist-info/RECORD,,
50
+ gam7-7.23.3.dist-info/METADATA,sha256=wRQiwmYiklHDgb-mai-U8MVEtymKJrjK18xpCV12Ong,3092
51
+ gam7-7.23.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
52
+ gam7-7.23.3.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
53
+ gam7-7.23.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
54
+ gam7-7.23.3.dist-info/RECORD,,
File without changes