gam7 7.7.4__py3-none-any.whl → 7.7.6__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.07.04'
28
+ __version__ = '7.07.06'
29
29
  __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
30
30
 
31
31
  #pylint: disable=wrong-import-position
@@ -38592,7 +38592,8 @@ def _getCalendarListEventsDisplayProperty(myarg, calendarEventEntity):
38592
38592
 
38593
38593
  def initCalendarEventEntity():
38594
38594
  return {'list': [], 'queries': [], 'kwargs': {}, 'dict': None,
38595
- 'matches': [], 'maxinstances': -1, 'countsOnly': False, 'showDayOfWeek': False}
38595
+ 'matches': [], 'maxinstances': -1, 'showDayOfWeek': False,
38596
+ 'countsOnly': False, 'eventRowFilter': False, 'countsOnlyTitles': []}
38596
38597
 
38597
38598
  def getCalendarEventEntity():
38598
38599
  calendarEventEntity = initCalendarEventEntity()
@@ -39637,11 +39638,25 @@ def _printShowCalendarEvents(origUser, user, origCal, calIds, count, calendarEve
39637
39638
  elif GC.Values[GC.CSV_OUTPUT_USERS_AUDIT] and user:
39638
39639
  csvPF.WriteRowNoFilter({'calendarId': calId, 'primaryEmail': user, 'id': ''})
39639
39640
  else:
39641
+ if calendarEventEntity['eventRowFilter']:
39642
+ jcount = 0
39643
+ for event in events:
39644
+ if calendarEventEntity['showDayOfWeek']:
39645
+ _getEventDaysOfWeek(event)
39646
+ row = {'calendarId': calId, 'id': event['id']}
39647
+ if user:
39648
+ row['primaryEmail'] = user
39649
+ flattenJSON(event, flattened=row, timeObjects=EVENT_TIME_OBJECTS)
39650
+ if csvPF.CheckRowTitles(row):
39651
+ jcount += 1
39640
39652
  row = {'calendarId': calId}
39641
39653
  if user:
39642
39654
  row['primaryEmail'] = user
39643
39655
  row['events'] = jcount
39644
- csvPF.WriteRow(row)
39656
+ if not calendarEventEntity['eventRowFilter']:
39657
+ csvPF.WriteRow(row)
39658
+ else:
39659
+ csvPF.WriteRowNoFilter(row)
39645
39660
 
39646
39661
  EVENT_FIELDS_CHOICE_MAP = {
39647
39662
  'anyonecanaddself': 'anyoneCanAddSelf',
@@ -39879,13 +39894,17 @@ def _getCalendarPrintShowEventOptions(calendarEventEntity, entityType):
39879
39894
  calendarEventEntity['countsOnly'] = True
39880
39895
  elif myarg == 'showdayofweek':
39881
39896
  calendarEventEntity['showDayOfWeek'] = True
39897
+ elif myarg == 'eventrowfilter':
39898
+ calendarEventEntity['eventRowFilter'] = True
39882
39899
  else:
39883
39900
  FJQC.GetFormatJSONQuoteChar(myarg, True)
39884
- if calendarEventEntity['countsOnly']:
39901
+ if calendarEventEntity['countsOnly'] and not calendarEventEntity['eventRowFilter']:
39885
39902
  fieldsList = ['id']
39886
39903
  if csvPF:
39887
39904
  if calendarEventEntity['countsOnly']:
39905
+ csvPF.RemoveTitles(['id'])
39888
39906
  csvPF.AddTitles(['events'])
39907
+ calendarEventEntity['countsOnlyTitles'] = csvPF.titlesList[:]
39889
39908
  elif not FJQC.formatJSON and not fieldsList:
39890
39909
  csvPF.AddSortTitles(EVENT_PRINT_ORDER)
39891
39910
  _addEventEntitySelectFields(calendarEventEntity, fieldsList)
@@ -39893,16 +39912,21 @@ def _getCalendarPrintShowEventOptions(calendarEventEntity, entityType):
39893
39912
 
39894
39913
  # gam calendars <CalendarEntity> print events <EventEntity> <EventDisplayProperties>*
39895
39914
  # [fields <EventFieldNameList>] [showdayofweek]
39896
- # [countsonly] [formatjson [quotechar <Character>]] [todrive <ToDriveAttribute>*]
39915
+ # [countsonly [eventrowfilter]]
39916
+ # [formatjson [quotechar <Character>]] [todrive <ToDriveAttribute>*]
39897
39917
  # gam calendars <CalendarEntity> show events <EventEntity> <EventDisplayProperties>*
39898
39918
  # [fields <EventFieldNameList>] [showdayofweek]
39899
- # [countsonly] [formatjson]
39919
+ # [countsonly]
39920
+ # [formatjson]
39900
39921
  def doCalendarsPrintShowEvents(calIds):
39901
39922
  calendarEventEntity = getCalendarEventEntity()
39902
39923
  csvPF, FJQC, fieldsList = _getCalendarPrintShowEventOptions(calendarEventEntity, Ent.CALENDAR)
39903
39924
  _printShowCalendarEvents(None, None, None, calIds, len(calIds), calendarEventEntity,
39904
39925
  csvPF, FJQC, fieldsList)
39905
39926
  if csvPF:
39927
+ if calendarEventEntity['countsOnly'] and calendarEventEntity['eventRowFilter']:
39928
+ csvPF.SetRowFilter([], GC.Values[GC.CSV_OUTPUT_ROW_FILTER_MODE])
39929
+ csvPF.SetTitles(calendarEventEntity['countsOnlyTitles'])
39906
39930
  csvPF.writeCSVfile('Calendar Events')
39907
39931
 
39908
39932
  # <CalendarSettings> ::==
@@ -51371,10 +51395,12 @@ def infoCalendarEvents(users):
51371
51395
 
51372
51396
  # gam <UserTypeEntity> print events <UserCalendarEntity> <EventEntity> <EventDisplayProperties>*
51373
51397
  # [fields <EventFieldNameList>] [showdayofweek]
51374
- # [countsonly] [formatjson [quotechar <Character>]] [todrive <ToDriveAttribute>*]
51398
+ # [countsonly [eventrowfilter]]
51399
+ # [formatjson [quotechar <Character>]] [todrive <ToDriveAttribute>*]
51375
51400
  # gam <UserTypeEntity> show events <UserCalendarEntity> <EventEntity> <EventDisplayProperties>*
51376
51401
  # [fields <EventFieldNameList>] [showdayofweek]
51377
- # [countsonly] [formatjson]
51402
+ # [countsonly]]
51403
+ # [formatjson]
51378
51404
  def printShowCalendarEvents(users):
51379
51405
  calendarEntity = getUserCalendarEntity()
51380
51406
  calendarEventEntity = getCalendarEventEntity()
@@ -51392,6 +51418,9 @@ def printShowCalendarEvents(users):
51392
51418
  csvPF, FJQC, fieldsList)
51393
51419
  Ind.Decrement()
51394
51420
  if csvPF:
51421
+ if calendarEventEntity['countsOnly'] and calendarEventEntity['eventRowFilter']:
51422
+ csvPF.SetRowFilter([], GC.Values[GC.CSV_OUTPUT_ROW_FILTER_MODE])
51423
+ csvPF.SetTitles(calendarEventEntity['countsOnlyTitles'])
51395
51424
  csvPF.writeCSVfile('Calendar Events')
51396
51425
 
51397
51426
  def getStatusEventDateTime(dateType, dateList):
@@ -60383,7 +60412,7 @@ def moveDriveFile(users):
60383
60412
  GAPI.INVALID, GAPI.BAD_REQUEST, GAPI.FILE_NOT_FOUND, GAPI.UNKNOWN_ERROR,
60384
60413
  GAPI.STORAGE_QUOTA_EXCEEDED, GAPI.TEAMDRIVES_SHARING_RESTRICTION_NOT_ALLOWED,
60385
60414
  GAPI.TEAMDRIVE_FILE_LIMIT_EXCEEDED, GAPI.TEAMDRIVE_HIERARCHY_TOO_DEEP, GAPI.SHORTCUT_TARGET_INVALID,
60386
- GAPI.TARGET_USER_ROLE_LIMITED_BY_LICENSE_RESTRICTION],
60415
+ GAPI.TARGET_USER_ROLE_LIMITED_BY_LICENSE_RESTRICTION, GAPI.SHARE_OUT_WARNING],
60387
60416
  body=body, fields='id', supportsAllDrives=True)
60388
60417
  Act.Set(Act.CREATE_SHORTCUT)
60389
60418
  entityModifierItemValueListActionPerformed(kvList, Act.MODIFIER_IN,
@@ -60395,7 +60424,7 @@ def moveDriveFile(users):
60395
60424
  GAPI.invalid, GAPI.badRequest, GAPI.fileNotFound, GAPI.unknownError,
60396
60425
  GAPI.storageQuotaExceeded, GAPI.teamDrivesSharingRestrictionNotAllowed,
60397
60426
  GAPI.teamDriveFileLimitExceeded, GAPI.teamDriveHierarchyTooDeep, GAPI.shortcutTargetInvalid,
60398
- GAPI.targetUserRoleLimitedByLicenseRestriction) as e:
60427
+ GAPI.targetUserRoleLimitedByLicenseRestriction, GAPI.shareOutWarning) as e:
60399
60428
  entityActionFailedWarning(kvList+[Ent.DRIVE_FILE_SHORTCUT, childName], str(e), k, kcount)
60400
60429
  _incrStatistic(statistics, STAT_FILE_FAILED)
60401
60430
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gam7
3
- Version: 7.7.4
3
+ Version: 7.7.6
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=DB7CleQZBOgnuEsOYNTZJooYPZJcSJI3l7QBKGHwcJE,3499515
1
+ gam/__init__.py,sha256=lXlPUFsBse9plp-in-RO0z2ZSR5d87QbReY_c_dg-fM,3500904
2
2
  gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
3
3
  gam/cacerts.pem,sha256=82Ak7btW_2XvocLUvAwPmpx8Chi0oqtZUG1gseLK_t4,50235
4
4
  gam/cbcm-v1.1beta1.json,sha256=xO5XloCQQULmPbFBx5bckdqmbLFQ7sJ2TImhE1ysDIY,19439
@@ -65,8 +65,8 @@ gam/googleapiclient/discovery_cache/base.py,sha256=yCDPtxnbNN-p5_9fzBacC6P3wcUPl
65
65
  gam/googleapiclient/discovery_cache/file_cache.py,sha256=sim3Mg4HgRYo3vX75jvcKy_aV568EvIrtBfvfbw-044,4774
66
66
  gam/iso8601/__init__.py,sha256=Z2PsYbXgAH5a5xzUvgczCboPzqWpm65kRcIngCnhViU,1218
67
67
  gam/iso8601/iso8601.py,sha256=Li2FHZ4sBTWuthuQhyCvmvj0j6At8JbGzkSv2fc2RHU,4384
68
- gam7-7.7.4.dist-info/METADATA,sha256=Qx-EDdtjdG7IyZEhNtUUL3wCQ2Zpqoid0wyJz9iLU0c,2969
69
- gam7-7.7.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
70
- gam7-7.7.4.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
71
- gam7-7.7.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
72
- gam7-7.7.4.dist-info/RECORD,,
68
+ gam7-7.7.6.dist-info/METADATA,sha256=rvJw6IcY_HzppXk6KXHLEUr-aC9oudkV_F7UPn7NPbI,2969
69
+ gam7-7.7.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
70
+ gam7-7.7.6.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
71
+ gam7-7.7.6.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
72
+ gam7-7.7.6.dist-info/RECORD,,
File without changes