gam7 7.23.2__py3-none-any.whl → 7.23.4__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 +91 -51
- {gam7-7.23.2.dist-info → gam7-7.23.4.dist-info}/METADATA +1 -1
- {gam7-7.23.2.dist-info → gam7-7.23.4.dist-info}/RECORD +6 -6
- {gam7-7.23.2.dist-info → gam7-7.23.4.dist-info}/WHEEL +0 -0
- {gam7-7.23.2.dist-info → gam7-7.23.4.dist-info}/entry_points.txt +0 -0
- {gam7-7.23.2.dist-info → gam7-7.23.4.dist-info}/licenses/LICENSE +0 -0
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.
|
|
28
|
+
__version__ = '7.23.04'
|
|
29
29
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
|
30
30
|
|
|
31
31
|
#pylint: disable=wrong-import-position
|
|
@@ -7868,6 +7868,13 @@ class CSVPrintFile():
|
|
|
7868
7868
|
if title not in self.titlesSet:
|
|
7869
7869
|
self.AddTitle(title)
|
|
7870
7870
|
|
|
7871
|
+
def InsertTitles(self, position, titles):
|
|
7872
|
+
for title in titles if isinstance(titles, list) else [titles]:
|
|
7873
|
+
if title not in self.titlesSet:
|
|
7874
|
+
self.titlesSet.add(title)
|
|
7875
|
+
self.titlesList.insert(position, title)
|
|
7876
|
+
position += 1
|
|
7877
|
+
|
|
7871
7878
|
def SetTitles(self, titles):
|
|
7872
7879
|
self.titlesSet = set()
|
|
7873
7880
|
self.titlesList = []
|
|
@@ -22429,12 +22436,12 @@ def infoUserPeopleContacts(users):
|
|
|
22429
22436
|
|
|
22430
22437
|
# gam <UserTypeEntity> print contacts [todrive <ToDriveAttribute>*] <PeoplePrintShowUserContactSelection>
|
|
22431
22438
|
# [showgroups|showgroupnameslist] [orderby firstname|lastname|(lastmodified ascending)|(lastnodified descending)
|
|
22432
|
-
# [
|
|
22433
|
-
# [formatjson [quotechar <Character>]]
|
|
22439
|
+
# [allfields|fields <PeopleFieldNameList>] [showmetadata]
|
|
22440
|
+
# [countsonly|(formatjson [quotechar <Character>])]
|
|
22434
22441
|
# gam <UserTypeEntity> show contacts <PeoplePrintShowUserContactSelection>
|
|
22435
22442
|
# [showgroups] [orderby firstname|lastname|(lastmodified ascending)|(lastnodified descending)
|
|
22436
|
-
# [
|
|
22437
|
-
# [formatjson]
|
|
22443
|
+
# [allfields|(fields <PeopleFieldNameList>)] [showmetadata]
|
|
22444
|
+
# [countsonly|formatjson]
|
|
22438
22445
|
def printShowUserPeopleContacts(users):
|
|
22439
22446
|
entityType = Ent.USER
|
|
22440
22447
|
entityTypeName = Ent.Singular(entityType)
|
|
@@ -22473,6 +22480,8 @@ def printShowUserPeopleContacts(users):
|
|
|
22473
22480
|
else:
|
|
22474
22481
|
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
|
22475
22482
|
if countsOnly:
|
|
22483
|
+
if csvPF:
|
|
22484
|
+
csvPF.SetFormatJSON(False)
|
|
22476
22485
|
fieldsList = ['emailAddresses']
|
|
22477
22486
|
if contactQuery['mainContacts']:
|
|
22478
22487
|
fields = _getPersonFields(PEOPLE_FIELDS_CHOICE_MAP, PEOPLE_CONTACTS_DEFAULT_FIELDS, fieldsList, parameters)
|
|
@@ -22710,11 +22719,11 @@ def processUserPeopleOtherContacts(users):
|
|
|
22710
22719
|
Ind.Decrement()
|
|
22711
22720
|
|
|
22712
22721
|
# gam <UserTypeEntity> print othercontacts [todrive <ToDriveAttribute>*] <OtherContactSelection>
|
|
22713
|
-
# [
|
|
22714
|
-
# [formatjson [quotechar <Character>]]
|
|
22722
|
+
# [allfields|(fields <OtherContactFieldNameList>)] [showmetadata]
|
|
22723
|
+
# [countsonly|(formatjson [quotechar <Character>])]
|
|
22715
22724
|
# gam <UserTypeEntity> show othercontacts <OtherContactSelection>
|
|
22716
|
-
# [
|
|
22717
|
-
# [formatjson]
|
|
22725
|
+
# [allfields|(fields <OtherContactFieldNameList>)] [showmetadata]
|
|
22726
|
+
# [countsonly|formatjson]
|
|
22718
22727
|
def printShowUserPeopleOtherContacts(users):
|
|
22719
22728
|
entityType = Ent.USER
|
|
22720
22729
|
entityTypeName = Ent.Singular(entityType)
|
|
@@ -22744,6 +22753,8 @@ def printShowUserPeopleOtherContacts(users):
|
|
|
22744
22753
|
else:
|
|
22745
22754
|
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
|
22746
22755
|
if countsOnly:
|
|
22756
|
+
if csvPF:
|
|
22757
|
+
csvPF.SetFormatJSON(False)
|
|
22747
22758
|
fieldsList = ['emailAddresses']
|
|
22748
22759
|
fields = _getPersonFields(PEOPLE_OTHER_CONTACTS_FIELDS_CHOICE_MAP, PEOPLE_CONTACTS_DEFAULT_FIELDS, fieldsList, parameters)
|
|
22749
22760
|
i, count, users = getEntityArgument(users)
|
|
@@ -22813,6 +22824,8 @@ def _printShowPeople(source):
|
|
|
22813
22824
|
function = 'searchDirectoryPeople'
|
|
22814
22825
|
else:
|
|
22815
22826
|
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
|
22827
|
+
if countsOnly and csvPF:
|
|
22828
|
+
csvPF.SetFormatJSON(False)
|
|
22816
22829
|
fields = _getPersonFields(PEOPLE_FIELDS_CHOICE_MAP, PEOPLE_CONTACTS_DEFAULT_FIELDS, fieldsList, parameters)
|
|
22817
22830
|
printGettingAllEntityItemsForWhom(peopleEntityType, GC.Values[GC.DOMAIN], query=kwargs.get('query'))
|
|
22818
22831
|
try:
|
|
@@ -22850,29 +22863,24 @@ def doInfoDomainPeopleContacts():
|
|
|
22850
22863
|
# gam print people|peopleprofile [todrive <ToDriveAttribute>*]
|
|
22851
22864
|
# [query <String>]
|
|
22852
22865
|
# [mergesources <PeopleMergeSourceName>]
|
|
22853
|
-
# [countsonly]
|
|
22854
22866
|
# [allfields|(fields <PeopleFieldNameList>)] [showmetadata]
|
|
22855
|
-
# [formatjson [quotechar <Character>]]
|
|
22867
|
+
# [countsonly|(formatjson [quotechar <Character>])]
|
|
22856
22868
|
# gam show people|peopleprofile
|
|
22857
22869
|
# [query <String>]
|
|
22858
22870
|
# [mergesources <PeopleMergeSourceName>]
|
|
22859
|
-
# [countsonly]
|
|
22860
22871
|
# [allfields|(fields <PeopleFieldNameList>)] [showmetadata]
|
|
22861
|
-
# [
|
|
22872
|
+
# [countsonlyformatjson]
|
|
22862
22873
|
# gam print domaincontacts|peoplecontacts [todrive <ToDriveAttribute>*]
|
|
22863
22874
|
# [sources <PeopleSourceName>]
|
|
22864
22875
|
# [query <String>]
|
|
22865
22876
|
# [mergesources <PeopleMergeSourceName>]
|
|
22866
|
-
# [countsonly]
|
|
22867
22877
|
# [allfields|(fields <PeopleFieldNameList>)] [showmetadata]
|
|
22868
|
-
# [formatjson [quotechar <Character>]]
|
|
22878
|
+
# [countsonly|(formatjson [quotechar <Character>])]
|
|
22869
22879
|
# gam show domaincontacts|peoplecontacts
|
|
22870
22880
|
# [sources <PeopleSourceName>]
|
|
22871
22881
|
# [query <String>]
|
|
22872
22882
|
# [mergesources <PeopleMergeSourceName>]
|
|
22873
|
-
# [
|
|
22874
|
-
# [allfields|(fields <PeopleFieldNameList>)] [showmetadata]
|
|
22875
|
-
# [formatjson]
|
|
22883
|
+
# [countsonlyformatjson]
|
|
22876
22884
|
def doPrintShowDomainPeopleProfiles():
|
|
22877
22885
|
_printShowPeople('profile')
|
|
22878
22886
|
|
|
@@ -27237,7 +27245,7 @@ def createChatMember(users):
|
|
|
27237
27245
|
throwReasons=[GAPI.ALREADY_EXISTS, GAPI.NOT_FOUND, GAPI.INVALID, GAPI.INVALID_ARGUMENT,
|
|
27238
27246
|
GAPI.INTERNAL_ERROR, GAPI.PERMISSION_DENIED, GAPI.FAILED_PRECONDITION],
|
|
27239
27247
|
parent=parent, body=body, **kwargsUAA)
|
|
27240
|
-
if role != 'ROLE_MEMBER' and entityType
|
|
27248
|
+
if role != 'ROLE_MEMBER' and entityType in (Ent.CHAT_MANAGER_USER, Ent.CHAT_OWNER_USER):
|
|
27241
27249
|
member = callGAPI(chat.spaces().members(), 'patch',
|
|
27242
27250
|
bailOnInternalError=True,
|
|
27243
27251
|
throwReasons=[GAPI.NOT_FOUND, GAPI.INVALID_ARGUMENT, GAPI.INTERNAL_ERROR,
|
|
@@ -40125,7 +40133,7 @@ def _createCalendarEvents(user, origCal, function, calIds, count, body, paramete
|
|
|
40125
40133
|
else:
|
|
40126
40134
|
if parameters['showDayOfWeek']:
|
|
40127
40135
|
_getEventDaysOfWeek(event)
|
|
40128
|
-
_printCalendarEvent(user, calId, event, parameters['csvPF'], parameters['FJQC'])
|
|
40136
|
+
_printCalendarEvent(user, calId, event, parameters['csvPF'], parameters['FJQC'], {})
|
|
40129
40137
|
except (GAPI.invalid, GAPI.required, GAPI.timeRangeEmpty, GAPI.eventDurationExceedsLimit,
|
|
40130
40138
|
GAPI.requiredAccessLevel, GAPI.participantIsNeitherOrganizerNorAttendee,
|
|
40131
40139
|
GAPI.malformedWorkingLocationEvent, GAPI.badRequest) as e:
|
|
@@ -40229,7 +40237,7 @@ def _updateCalendarEvents(origUser, user, origCal, calIds, count, calendarEventE
|
|
|
40229
40237
|
else:
|
|
40230
40238
|
if parameters['showDayOfWeek']:
|
|
40231
40239
|
_getEventDaysOfWeek(event)
|
|
40232
|
-
_printCalendarEvent(user, calId, event, parameters['csvPF'], parameters['FJQC'])
|
|
40240
|
+
_printCalendarEvent(user, calId, event, parameters['csvPF'], parameters['FJQC'], {})
|
|
40233
40241
|
except (GAPI.notFound, GAPI.deleted) as e:
|
|
40234
40242
|
if not checkCalendarExists(cal, calId, j, jcount):
|
|
40235
40243
|
entityUnknownWarning(Ent.CALENDAR, calId, j, jcount)
|
|
@@ -40526,10 +40534,12 @@ def _showCalendarEvent(primaryEmail, calId, eventEntityType, event, k, kcount, F
|
|
|
40526
40534
|
showJSON(None, event, skipObjects)
|
|
40527
40535
|
Ind.Decrement()
|
|
40528
40536
|
|
|
40529
|
-
def _printCalendarEvent(user, calId, event, csvPF, FJQC):
|
|
40537
|
+
def _printCalendarEvent(user, calId, event, csvPF, FJQC, addCSVData):
|
|
40530
40538
|
row = {'calendarId': calId, 'id': event['id']}
|
|
40531
40539
|
if user:
|
|
40532
40540
|
row['primaryEmail'] = user
|
|
40541
|
+
if addCSVData:
|
|
40542
|
+
row.update(addCSVData)
|
|
40533
40543
|
flattenJSON(event, flattened=row, timeObjects=EVENT_TIME_OBJECTS)
|
|
40534
40544
|
if not FJQC.formatJSON:
|
|
40535
40545
|
csvPF.WriteRowTitles(row)
|
|
@@ -40542,7 +40552,7 @@ def _printCalendarEvent(user, calId, event, csvPF, FJQC):
|
|
|
40542
40552
|
csvPF.WriteRowNoFilter(row)
|
|
40543
40553
|
|
|
40544
40554
|
def _printShowCalendarEvents(origUser, user, origCal, calIds, count, calendarEventEntity,
|
|
40545
|
-
csvPF, FJQC, fieldsList):
|
|
40555
|
+
csvPF, FJQC, fieldsList, addCSVData):
|
|
40546
40556
|
i = 0
|
|
40547
40557
|
for calId in calIds:
|
|
40548
40558
|
i += 1
|
|
@@ -40568,7 +40578,7 @@ def _printShowCalendarEvents(origUser, user, origCal, calIds, count, calendarEve
|
|
|
40568
40578
|
for event in events:
|
|
40569
40579
|
if calendarEventEntity['showDayOfWeek']:
|
|
40570
40580
|
_getEventDaysOfWeek(event)
|
|
40571
|
-
_printCalendarEvent(user, calId, event, csvPF, FJQC)
|
|
40581
|
+
_printCalendarEvent(user, calId, event, csvPF, FJQC, addCSVData)
|
|
40572
40582
|
elif GC.Values[GC.CSV_OUTPUT_USERS_AUDIT] and user:
|
|
40573
40583
|
csvPF.WriteRowNoFilter({'calendarId': calId, 'primaryEmail': user, 'id': ''})
|
|
40574
40584
|
else:
|
|
@@ -40586,6 +40596,8 @@ def _printShowCalendarEvents(origUser, user, origCal, calIds, count, calendarEve
|
|
|
40586
40596
|
row = {'calendarId': calId}
|
|
40587
40597
|
if user:
|
|
40588
40598
|
row['primaryEmail'] = user
|
|
40599
|
+
if addCSVData:
|
|
40600
|
+
row.update(addCSVData)
|
|
40589
40601
|
row['events'] = jcount
|
|
40590
40602
|
if not calendarEventEntity['eventRowFilter']:
|
|
40591
40603
|
csvPF.WriteRow(row)
|
|
@@ -40816,6 +40828,8 @@ def _getCalendarPrintShowEventOptions(calendarEventEntity, entityType):
|
|
|
40816
40828
|
csvPF = CSVPrintFile(['primaryEmail', 'calendarId', 'id'] if entityType == Ent.USER else ['calendarId', 'id'], 'sortall', indexedTitles=EVENT_INDEXED_TITLES) if Act.csvFormat() else None
|
|
40817
40829
|
FJQC = FormatJSONQuoteChar(csvPF)
|
|
40818
40830
|
fieldsList = []
|
|
40831
|
+
addCSVData = {}
|
|
40832
|
+
addCSVDataLoc = 2 if entityType == Ent.USER else 1
|
|
40819
40833
|
while Cmd.ArgumentsRemaining():
|
|
40820
40834
|
myarg = getArgument()
|
|
40821
40835
|
if csvPF and myarg == 'todrive':
|
|
@@ -40824,6 +40838,9 @@ def _getCalendarPrintShowEventOptions(calendarEventEntity, entityType):
|
|
|
40824
40838
|
pass
|
|
40825
40839
|
elif myarg == 'fields':
|
|
40826
40840
|
_getEventFields(fieldsList)
|
|
40841
|
+
elif csvPF and myarg == 'addcsvdata':
|
|
40842
|
+
k = getString(Cmd.OB_STRING)
|
|
40843
|
+
addCSVData[k] = getString(Cmd.OB_STRING, minLen=0)
|
|
40827
40844
|
elif myarg == 'countsonly':
|
|
40828
40845
|
calendarEventEntity['countsOnly'] = True
|
|
40829
40846
|
elif myarg == 'showdayofweek':
|
|
@@ -40836,27 +40853,35 @@ def _getCalendarPrintShowEventOptions(calendarEventEntity, entityType):
|
|
|
40836
40853
|
fieldsList = ['id']
|
|
40837
40854
|
if csvPF:
|
|
40838
40855
|
if calendarEventEntity['countsOnly']:
|
|
40856
|
+
csvPF.SetFormatJSON(False)
|
|
40839
40857
|
csvPF.RemoveTitles(['id'])
|
|
40858
|
+
if addCSVData:
|
|
40859
|
+
csvPF.InsertTitles(addCSVDataLoc, sorted(addCSVData.keys()))
|
|
40840
40860
|
csvPF.AddTitles(['events'])
|
|
40861
|
+
csvPF.SetSortAllTitles()
|
|
40841
40862
|
calendarEventEntity['countsOnlyTitles'] = csvPF.titlesList[:]
|
|
40842
|
-
|
|
40843
|
-
|
|
40863
|
+
else:
|
|
40864
|
+
if addCSVData:
|
|
40865
|
+
csvPF.InsertTitles(addCSVDataLoc, sorted(addCSVData.keys()))
|
|
40866
|
+
if not FJQC.formatJSON and not fieldsList:
|
|
40867
|
+
csvPF.AddTitles(EVENT_PRINT_ORDER)
|
|
40868
|
+
csvPF.SetSortAllTitles()
|
|
40844
40869
|
_addEventEntitySelectFields(calendarEventEntity, fieldsList)
|
|
40845
|
-
return (csvPF, FJQC, fieldsList)
|
|
40870
|
+
return (csvPF, FJQC, fieldsList, addCSVData)
|
|
40846
40871
|
|
|
40847
40872
|
# gam calendars <CalendarEntity> print events <EventEntity> <EventDisplayProperties>*
|
|
40848
40873
|
# [fields <EventFieldNameList>] [showdayofweek]
|
|
40849
|
-
#
|
|
40850
|
-
# [
|
|
40874
|
+
# (addcsvdata <FieldName> <String>)*
|
|
40875
|
+
# [eventrowfilter]
|
|
40876
|
+
# [countsonly|(formatjson [quotechar <Character>])] [todrive <ToDriveAttribute>*]
|
|
40851
40877
|
# gam calendars <CalendarEntity> show events <EventEntity> <EventDisplayProperties>*
|
|
40852
40878
|
# [fields <EventFieldNameList>] [showdayofweek]
|
|
40853
|
-
# [countsonly]
|
|
40854
|
-
# [formatjson]
|
|
40879
|
+
# [countsonly|formatjson]
|
|
40855
40880
|
def doCalendarsPrintShowEvents(calIds):
|
|
40856
40881
|
calendarEventEntity = getCalendarEventEntity()
|
|
40857
|
-
csvPF, FJQC, fieldsList = _getCalendarPrintShowEventOptions(calendarEventEntity, Ent.CALENDAR)
|
|
40882
|
+
csvPF, FJQC, fieldsList, addCSVData = _getCalendarPrintShowEventOptions(calendarEventEntity, Ent.CALENDAR)
|
|
40858
40883
|
_printShowCalendarEvents(None, None, None, calIds, len(calIds), calendarEventEntity,
|
|
40859
|
-
csvPF, FJQC, fieldsList)
|
|
40884
|
+
csvPF, FJQC, fieldsList, addCSVData)
|
|
40860
40885
|
if csvPF:
|
|
40861
40886
|
if calendarEventEntity['countsOnly'] and calendarEventEntity['eventRowFilter']:
|
|
40862
40887
|
csvPF.SetTitles(calendarEventEntity['countsOnlyTitles'])
|
|
@@ -48863,13 +48888,15 @@ def _doInfoCourses(courseIdList):
|
|
|
48863
48888
|
|
|
48864
48889
|
# gam info courses <CourseEntity> [owneraccess]
|
|
48865
48890
|
# [owneremail] [alias|aliases] [show none|all|students|teachers] [countsonly]
|
|
48866
|
-
# [fields <CourseFieldNameList>] [skipfields <CourseFieldNameList>]
|
|
48891
|
+
# [fields <CourseFieldNameList>] [skipfields <CourseFieldNameList>]
|
|
48892
|
+
# [formatjson]
|
|
48867
48893
|
def doInfoCourses():
|
|
48868
48894
|
_doInfoCourses(getEntityList(Cmd.OB_COURSE_ENTITY, shlexSplit=True))
|
|
48869
48895
|
|
|
48870
48896
|
# gam info course <CourseID> [owneraccess]
|
|
48871
48897
|
# [owneremail] [alias|aliases] [show none|all|students|teachers] [countsonly]
|
|
48872
|
-
# [fields <CourseFieldNameList>] [skipfields <CourseFieldNameList>]
|
|
48898
|
+
# [fields <CourseFieldNameList>] [skipfields <CourseFieldNameList>]
|
|
48899
|
+
# [formatjson]
|
|
48873
48900
|
def doInfoCourse():
|
|
48874
48901
|
_doInfoCourses(getStringReturnInList(Cmd.OB_COURSE_ID))
|
|
48875
48902
|
|
|
@@ -49187,7 +49214,7 @@ COURSE_ANNOUNCEMENTS_INDEXED_TITLES = ['materials']
|
|
|
49187
49214
|
# (orderby <CourseAnnouncementOrderByFieldName> [ascending|descending])*)
|
|
49188
49215
|
# [showcreatoremails|creatoremail] [fields <CourseAnnouncementFieldNameList>]
|
|
49189
49216
|
# [timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
|
49190
|
-
# [countsonly
|
|
49217
|
+
# [countsonly|(formatjson [quotechar <Character>])]
|
|
49191
49218
|
def doPrintCourseAnnouncements():
|
|
49192
49219
|
def _printCourseAnnouncement(course, courseAnnouncement, i, count):
|
|
49193
49220
|
if applyCourseItemFilter and not _courseItemPassesFilter(courseAnnouncement, courseItemFilter):
|
|
@@ -49243,6 +49270,8 @@ def doPrintCourseAnnouncements():
|
|
|
49243
49270
|
coursesInfo = _getCoursesInfo(croom, courseSelectionParameters, courseShowProperties)
|
|
49244
49271
|
if coursesInfo is None:
|
|
49245
49272
|
return
|
|
49273
|
+
if countsOnly:
|
|
49274
|
+
csvPF.SetFormatJSON(False)
|
|
49246
49275
|
applyCourseItemFilter = _setApplyCourseItemFilter(courseItemFilter, fieldsList)
|
|
49247
49276
|
if showCreatorEmail and fieldsList:
|
|
49248
49277
|
fieldsList.append('creatorUserId')
|
|
@@ -49299,7 +49328,7 @@ COURSE_TOPICS_SORT_TITLES = ['courseId', 'courseName', 'topicId', 'name', 'updat
|
|
|
49299
49328
|
# (course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] states <CourseStateList>])
|
|
49300
49329
|
# [topicids <CourseTopicIDEntity>]
|
|
49301
49330
|
# [timefilter updatetime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
|
49302
|
-
# [countsonly
|
|
49331
|
+
# [countsonly|(formatjson [quotechar <Character>])]
|
|
49303
49332
|
def doPrintCourseTopics():
|
|
49304
49333
|
def _printCourseTopic(course, courseTopic):
|
|
49305
49334
|
if applyCourseItemFilter and not _courseItemPassesFilter(courseTopic, courseItemFilter):
|
|
@@ -49340,6 +49369,8 @@ def doPrintCourseTopics():
|
|
|
49340
49369
|
coursesInfo = _getCoursesInfo(croom, courseSelectionParameters, courseShowProperties)
|
|
49341
49370
|
if coursesInfo is None:
|
|
49342
49371
|
return
|
|
49372
|
+
if countsOnly:
|
|
49373
|
+
csvPF.SetFormatJSON(False)
|
|
49343
49374
|
applyCourseItemFilter = _setApplyCourseItemFilter(courseItemFilter, fieldsList)
|
|
49344
49375
|
courseTopicIdsLists = courseTopicIds if isinstance(courseTopicIds, dict) else None
|
|
49345
49376
|
i = 0
|
|
@@ -49584,6 +49615,8 @@ def doPrintCourseWM(entityIDType, entityStateType):
|
|
|
49584
49615
|
coursesInfo = _getCoursesInfo(croom, courseSelectionParameters, courseShowProperties)
|
|
49585
49616
|
if coursesInfo is None:
|
|
49586
49617
|
return
|
|
49618
|
+
if countsOnly:
|
|
49619
|
+
csvPF.SetFormatJSON(False)
|
|
49587
49620
|
applyCourseItemFilter = _setApplyCourseItemFilter(courseItemFilter, fieldsList)
|
|
49588
49621
|
courseWMIds = courseWMSelectionParameters['courseWMIds']
|
|
49589
49622
|
courseWMIdsLists = courseWMIds if isinstance(courseWMIds, dict) else {}
|
|
@@ -49639,7 +49672,7 @@ def doPrintCourseWM(entityIDType, entityStateType):
|
|
|
49639
49672
|
# [showcreatoremails|creatoremail] [showtopicnames] [fields <CourseMaterialFieldNameList>]
|
|
49640
49673
|
# [timefilter creationtime|updatetime|scheduledtime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
|
49641
49674
|
# [oneitemperrow]
|
|
49642
|
-
# [countsonly
|
|
49675
|
+
# [countsonly|(formatjson [quotechar <Character>])]
|
|
49643
49676
|
def doPrintCourseMaterials():
|
|
49644
49677
|
doPrintCourseWM(Ent.COURSE_MATERIAL_ID, Ent.COURSE_MATERIAL_STATE)
|
|
49645
49678
|
|
|
@@ -49651,7 +49684,7 @@ def doPrintCourseMaterials():
|
|
|
49651
49684
|
# [showstudentsaslist [<Boolean>]] [delimiter <Character>]
|
|
49652
49685
|
# [timefilter creationtime|updatetime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
|
49653
49686
|
# [oneitemperrow]
|
|
49654
|
-
# [countsonly
|
|
49687
|
+
# [countsonly|(formatjson [quotechar <Character>])]
|
|
49655
49688
|
def doPrintCourseWork():
|
|
49656
49689
|
doPrintCourseWM(Ent.COURSE_WORK_ID, Ent.COURSE_WORK_STATE)
|
|
49657
49690
|
|
|
@@ -49695,7 +49728,7 @@ def _gettingCourseSubmissionQuery(courseSubmissionStates, late, userId):
|
|
|
49695
49728
|
# (submissionids <CourseSubmissionIDEntity>)|((submissionstates <CourseSubmissionStateList>)*) [late|notlate]
|
|
49696
49729
|
# [fields <CourseSubmissionFieldNameList>] [showuserprofile]
|
|
49697
49730
|
# [timefilter creationtime|updatetime] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
|
|
49698
|
-
# [countsonly
|
|
49731
|
+
# [countsonly|(formatjson [quotechar <Character>])]
|
|
49699
49732
|
def doPrintCourseSubmissions():
|
|
49700
49733
|
def _printCourseSubmission(course, courseSubmission):
|
|
49701
49734
|
if applyCourseItemFilter and not _courseItemPassesFilter(courseSubmission, courseItemFilter):
|
|
@@ -49777,6 +49810,8 @@ def doPrintCourseSubmissions():
|
|
|
49777
49810
|
coursesInfo = _getCoursesInfo(croom, courseSelectionParameters, courseShowProperties, getOwnerId=True)
|
|
49778
49811
|
if coursesInfo is None:
|
|
49779
49812
|
return
|
|
49813
|
+
if countsOnly:
|
|
49814
|
+
csvPF.SetFormatJSON(False)
|
|
49780
49815
|
applyCourseItemFilter = _setApplyCourseItemFilter(courseItemFilter, fieldsList)
|
|
49781
49816
|
courseWorkIds = courseWMSelectionParameters['courseWMIds']
|
|
49782
49817
|
courseWorkIdsLists = courseWorkIds if isinstance(courseWorkIds, dict) else {}
|
|
@@ -53523,16 +53558,16 @@ def infoCalendarEvents(users):
|
|
|
53523
53558
|
|
|
53524
53559
|
# gam <UserTypeEntity> print events <UserCalendarEntity> <EventEntity> <EventDisplayProperties>*
|
|
53525
53560
|
# [fields <EventFieldNameList>] [showdayofweek]
|
|
53526
|
-
#
|
|
53527
|
-
# [
|
|
53561
|
+
# (addcsvdata <FieldName> <String>)*
|
|
53562
|
+
# [eventrowfilter]
|
|
53563
|
+
# [countsonly|(formatjson [quotechar <Character>])] [todrive <ToDriveAttribute>*]
|
|
53528
53564
|
# gam <UserTypeEntity> show events <UserCalendarEntity> <EventEntity> <EventDisplayProperties>*
|
|
53529
53565
|
# [fields <EventFieldNameList>] [showdayofweek]
|
|
53530
|
-
# [countsonly]
|
|
53531
|
-
# [formatjson]
|
|
53566
|
+
# ~[countsonly|formatjson]
|
|
53532
53567
|
def printShowCalendarEvents(users):
|
|
53533
53568
|
calendarEntity = getUserCalendarEntity()
|
|
53534
53569
|
calendarEventEntity = getCalendarEventEntity()
|
|
53535
|
-
csvPF, FJQC, fieldsList = _getCalendarPrintShowEventOptions(calendarEventEntity, Ent.USER)
|
|
53570
|
+
csvPF, FJQC, fieldsList, addCSVData = _getCalendarPrintShowEventOptions(calendarEventEntity, Ent.USER)
|
|
53536
53571
|
i, count, users = getEntityArgument(users)
|
|
53537
53572
|
for user in users:
|
|
53538
53573
|
i += 1
|
|
@@ -53543,7 +53578,7 @@ def printShowCalendarEvents(users):
|
|
|
53543
53578
|
continue
|
|
53544
53579
|
Ind.Increment()
|
|
53545
53580
|
_printShowCalendarEvents(origUser, user, cal, calIds, jcount, calendarEventEntity,
|
|
53546
|
-
csvPF, FJQC, fieldsList)
|
|
53581
|
+
csvPF, FJQC, fieldsList, addCSVData)
|
|
53547
53582
|
Ind.Decrement()
|
|
53548
53583
|
if csvPF:
|
|
53549
53584
|
if calendarEventEntity['countsOnly'] and calendarEventEntity['eventRowFilter']:
|
|
@@ -53987,7 +54022,7 @@ def printShowStatusEvent(users, eventType):
|
|
|
53987
54022
|
for event in events:
|
|
53988
54023
|
if showDayOfWeek:
|
|
53989
54024
|
_getEventDaysOfWeek(event)
|
|
53990
|
-
_printCalendarEvent(user, calId, event, csvPF, FJQC)
|
|
54025
|
+
_printCalendarEvent(user, calId, event, csvPF, FJQC, {})
|
|
53991
54026
|
if 'pdelta' in wlDate:
|
|
53992
54027
|
first = first.shift(**wlDate['pdelta'])
|
|
53993
54028
|
last = last.shift(**wlDate['pdelta'])
|
|
@@ -77238,7 +77273,7 @@ TASK_QUERY_STATE_MAP = {
|
|
|
77238
77273
|
# [updatedmin <Time>]
|
|
77239
77274
|
# [showcompleted [<Boolean>]] [showdeleted [<Boolean>]] [showhidden [<Boolean>]] [showall]
|
|
77240
77275
|
# [orderby completed|due|updated]
|
|
77241
|
-
# [countsonly
|
|
77276
|
+
# [countsonly|(formatjson [quotechar <Character>])]
|
|
77242
77277
|
def printShowTasks(users):
|
|
77243
77278
|
def _showTaskAndChildren(tasklist, taskId, k, compact):
|
|
77244
77279
|
if taskId in taskParentsProcessed:
|
|
@@ -77305,8 +77340,11 @@ def printShowTasks(users):
|
|
|
77305
77340
|
csvPF.SetTitles(['User', CSVTitle])
|
|
77306
77341
|
else:
|
|
77307
77342
|
FJQC.GetFormatJSONQuoteChar(myarg, False)
|
|
77308
|
-
if csvPF
|
|
77309
|
-
|
|
77343
|
+
if csvPF:
|
|
77344
|
+
if countsOnly:
|
|
77345
|
+
csvPF.SetFormatJSON(False)
|
|
77346
|
+
elif FJQC.formatJSON:
|
|
77347
|
+
csvPF.SetJSONTitles(['User', 'tasklistId', 'id', 'taskId', 'title', 'JSON'])
|
|
77310
77348
|
i, count, users = getEntityArgument(users)
|
|
77311
77349
|
for user in users:
|
|
77312
77350
|
i += 1
|
|
@@ -77505,7 +77543,7 @@ def processTasklists(users):
|
|
|
77505
77543
|
# gam <UserTypeEntity> show tasklists
|
|
77506
77544
|
# [countsonly|formatjson]
|
|
77507
77545
|
# gam <UserTypeEntity> print tasklists [todrive <ToDriveAttribute>*]
|
|
77508
|
-
# [countsonly
|
|
77546
|
+
# [countsonly|(formatjson [quotechar <Character>])]
|
|
77509
77547
|
def printShowTasklists(users):
|
|
77510
77548
|
csvPF = CSVPrintFile(['User', 'id', 'title']) if Act.csvFormat() else None
|
|
77511
77549
|
if csvPF:
|
|
@@ -77523,6 +77561,8 @@ def printShowTasklists(users):
|
|
|
77523
77561
|
csvPF.SetTitles(['User', CSVTitle])
|
|
77524
77562
|
else:
|
|
77525
77563
|
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
|
77564
|
+
if countsOnly and csvPF:
|
|
77565
|
+
csvPF.SetFormatJSON(False)
|
|
77526
77566
|
i, count, users = getEntityArgument(users)
|
|
77527
77567
|
for user in users:
|
|
77528
77568
|
i += 1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gam/__init__.py,sha256=
|
|
1
|
+
gam/__init__.py,sha256=oaItKwe2zhuAvz_2tmyBdOqI2-14mxIw3k-enrfqfsY,3620631
|
|
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.
|
|
51
|
-
gam7-7.23.
|
|
52
|
-
gam7-7.23.
|
|
53
|
-
gam7-7.23.
|
|
54
|
-
gam7-7.23.
|
|
50
|
+
gam7-7.23.4.dist-info/METADATA,sha256=wFTkVmPc7GaFtbv--X570TPEmzhxGdoGtHojWs-OSJg,3092
|
|
51
|
+
gam7-7.23.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
52
|
+
gam7-7.23.4.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
|
|
53
|
+
gam7-7.23.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
54
|
+
gam7-7.23.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|