gam7 7.5.14__py3-none-any.whl → 7.5.16__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 +28 -4
- gam/gamlib/glglobals.py +3 -0
- {gam7-7.5.14.dist-info → gam7-7.5.16.dist-info}/METADATA +1 -1
- {gam7-7.5.14.dist-info → gam7-7.5.16.dist-info}/RECORD +7 -7
- {gam7-7.5.14.dist-info → gam7-7.5.16.dist-info}/WHEEL +0 -0
- {gam7-7.5.14.dist-info → gam7-7.5.16.dist-info}/entry_points.txt +0 -0
- {gam7-7.5.14.dist-info → gam7-7.5.16.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.05.
|
|
28
|
+
__version__ = '7.05.16'
|
|
29
29
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
|
30
30
|
|
|
31
31
|
#pylint: disable=wrong-import-position
|
|
@@ -262,6 +262,7 @@ MIMETYPE_GA_JAM = f'{APPLICATION_VND_GOOGLE_APPS}jam'
|
|
|
262
262
|
MIMETYPE_GA_MAP = f'{APPLICATION_VND_GOOGLE_APPS}map'
|
|
263
263
|
MIMETYPE_GA_PRESENTATION = f'{APPLICATION_VND_GOOGLE_APPS}presentation'
|
|
264
264
|
MIMETYPE_GA_SCRIPT = f'{APPLICATION_VND_GOOGLE_APPS}script'
|
|
265
|
+
MIMETYPE_GA_SCRIPT_JSON = f'{APPLICATION_VND_GOOGLE_APPS}script+json'
|
|
265
266
|
MIMETYPE_GA_SHORTCUT = f'{APPLICATION_VND_GOOGLE_APPS}shortcut'
|
|
266
267
|
MIMETYPE_GA_3P_SHORTCUT = f'{APPLICATION_VND_GOOGLE_APPS}drive-sdk'
|
|
267
268
|
MIMETYPE_GA_SITE = f'{APPLICATION_VND_GOOGLE_APPS}site'
|
|
@@ -4112,8 +4113,8 @@ def SetGlobalVariables():
|
|
|
4112
4113
|
if checkArgumentPresent(Cmd.MULTIPROCESSEXIT_CMD):
|
|
4113
4114
|
_setMultiprocessExit()
|
|
4114
4115
|
# redirect csv <FileName> [multiprocess] [append] [noheader] [charset <CharSet>]
|
|
4115
|
-
# [columndelimiter <Character>] [noescapechar <Boolean>] [quotechar <Character>]]
|
|
4116
|
-
# [sortheaders <StringList>] [timestampcolumn <String>]
|
|
4116
|
+
# [columndelimiter <Character>] [noescapechar [<Boolean>]] [quotechar <Character>]]
|
|
4117
|
+
# [sortheaders <StringList>] [timestampcolumn <String>] [transpose [<Boolean>]]
|
|
4117
4118
|
# [todrive <ToDriveAttribute>*]
|
|
4118
4119
|
# redirect stdout <FileName> [multiprocess] [append]
|
|
4119
4120
|
# redirect stdout null
|
|
@@ -4138,6 +4139,8 @@ def SetGlobalVariables():
|
|
|
4138
4139
|
GM.Globals[GM.CSV_OUTPUT_SORT_HEADERS] = GC.Values[GC.CSV_OUTPUT_SORT_HEADERS] = getString(Cmd.OB_STRING_LIST, minLen=0).replace(',', ' ').split()
|
|
4139
4140
|
if checkArgumentPresent('timestampcolumn'):
|
|
4140
4141
|
GM.Globals[GM.CSV_OUTPUT_TIMESTAMP_COLUMN] = GC.Values[GC.CSV_OUTPUT_TIMESTAMP_COLUMN] = getString(Cmd.OB_STRING, minLen=0)
|
|
4142
|
+
if checkArgumentPresent('transpose'):
|
|
4143
|
+
GM.Globals[GM.CSV_OUTPUT_TRANSPOSE] = getBoolean()
|
|
4141
4144
|
_setCSVFile(filename, mode, encoding, writeHeader, multi)
|
|
4142
4145
|
GM.Globals[GM.CSVFILE][GM.REDIRECT_QUEUE_CSVPF] = CSVPrintFile()
|
|
4143
4146
|
if checkArgumentPresent('todrive'):
|
|
@@ -4446,7 +4449,7 @@ def handleOAuthTokenError(e, softErrors, displayError=False, i=0, count=0):
|
|
|
4446
4449
|
if not GM.Globals[GM.CURRENT_SVCACCT_USER]:
|
|
4447
4450
|
ClientAPIAccessDeniedExit()
|
|
4448
4451
|
if softErrors:
|
|
4449
|
-
|
|
4452
|
+
entityActionFailedWarning([Ent.USER, GM.Globals[GM.CURRENT_SVCACCT_USER], Ent.USER, None], errMsg, i, count)
|
|
4450
4453
|
return None
|
|
4451
4454
|
systemErrorExit(SERVICE_NOT_APPLICABLE_RC, Msg.SERVICE_NOT_APPLICABLE_THIS_ADDRESS.format(GM.Globals[GM.CURRENT_SVCACCT_USER]))
|
|
4452
4455
|
if errMsg in API.OAUTH2_UNAUTHORIZED_ERRORS:
|
|
@@ -7793,6 +7796,7 @@ class CSVPrintFile():
|
|
|
7793
7796
|
def __init__(self, titles=None, sortTitles=None, indexedTitles=None):
|
|
7794
7797
|
self.rows = []
|
|
7795
7798
|
self.rowCount = 0
|
|
7799
|
+
self.outputTranspose = GM.Globals[GM.CSV_OUTPUT_TRANSPOSE]
|
|
7796
7800
|
self.todrive = GM.Globals[GM.CSV_TODRIVE]
|
|
7797
7801
|
self.titlesSet = set()
|
|
7798
7802
|
self.titlesList = []
|
|
@@ -8992,6 +8996,22 @@ class CSVPrintFile():
|
|
|
8992
8996
|
self.JSONtitlesList = self.orderHeaders(self.JSONtitlesList)
|
|
8993
8997
|
titlesList = self.JSONtitlesList
|
|
8994
8998
|
normalizeSortHeaders()
|
|
8999
|
+
if self.outputTranspose:
|
|
9000
|
+
newRows = []
|
|
9001
|
+
pivotKey = titlesList[0]
|
|
9002
|
+
newTitlesList = [pivotKey]
|
|
9003
|
+
newTitlesSet = set(newTitlesList)
|
|
9004
|
+
for title in titlesList[1:]:
|
|
9005
|
+
newRow = {pivotKey: title}
|
|
9006
|
+
for row in self.rows:
|
|
9007
|
+
pivotValue = row[pivotKey]
|
|
9008
|
+
if pivotValue not in newTitlesSet:
|
|
9009
|
+
newTitlesSet.add(pivotValue)
|
|
9010
|
+
newTitlesList.append(pivotValue)
|
|
9011
|
+
newRow[pivotValue] = row.get(title)
|
|
9012
|
+
newRows.append(newRow)
|
|
9013
|
+
titlesList = newTitlesList
|
|
9014
|
+
self.rows = newRows
|
|
8995
9015
|
if (not self.todrive) or self.todrive['localcopy']:
|
|
8996
9016
|
if GM.Globals[GM.CSVFILE][GM.REDIRECT_NAME] == '-':
|
|
8997
9017
|
if GM.Globals[GM.STDOUT][GM.REDIRECT_MULTI_FD]:
|
|
@@ -57402,6 +57422,8 @@ def createDriveFile(users):
|
|
|
57402
57422
|
if parameters[DFA_LOCALFILEPATH]:
|
|
57403
57423
|
if parameters[DFA_LOCALFILEPATH] != '-' and parameters[DFA_PRESERVE_FILE_TIMES]:
|
|
57404
57424
|
setPreservedFileTimes(body, parameters, False)
|
|
57425
|
+
if body.get('mimeType') == MIMETYPE_GA_SCRIPT_JSON:
|
|
57426
|
+
parameters[DFA_LOCALMIMETYPE] = body['mimeType']
|
|
57405
57427
|
media_body = getMediaBody(parameters)
|
|
57406
57428
|
elif parameters[DFA_URL]:
|
|
57407
57429
|
media_body = getMediaBody(parameters)
|
|
@@ -60439,6 +60461,7 @@ GOOGLEDOC_VALID_EXTENSIONS_MAP = {
|
|
|
60439
60461
|
MIMETYPE_GA_DOCUMENT: ['.docx', '.epub', '.html', '.odt', '.pdf', '.rtf', '.txt', '.zip'],
|
|
60440
60462
|
MIMETYPE_GA_JAM: ['.pdf'],
|
|
60441
60463
|
MIMETYPE_GA_PRESENTATION: ['.pdf', '.pptx', '.odp', '.txt'],
|
|
60464
|
+
MIMETYPE_GA_SCRIPT: ['.json'],
|
|
60442
60465
|
MIMETYPE_GA_SPREADSHEET: ['.csv', '.ods', '.pdf', '.tsv', '.xlsx', '.zip'],
|
|
60443
60466
|
}
|
|
60444
60467
|
|
|
@@ -60474,6 +60497,7 @@ DOCUMENT_FORMATS_MAP = {
|
|
|
60474
60497
|
'html': [{'mime': 'text/html', 'ext': '.html'}],
|
|
60475
60498
|
'jpeg': [{'mime': 'image/jpeg', 'ext': '.jpeg'}],
|
|
60476
60499
|
'jpg': [{'mime': 'image/jpeg', 'ext': '.jpg'}],
|
|
60500
|
+
'json': [{'mime': MIMETYPE_GA_SCRIPT_JSON, 'ext': '.json'}],
|
|
60477
60501
|
'mht': [{'mime': 'message/rfc822', 'ext': 'mht'}],
|
|
60478
60502
|
'odp': [{'mime': 'application/vnd.oasis.opendocument.presentation', 'ext': '.odp'}],
|
|
60479
60503
|
'ods': [{'mime': 'application/x-vnd.oasis.opendocument.spreadsheet', 'ext': '.ods'},
|
gam/gamlib/glglobals.py
CHANGED
|
@@ -85,6 +85,8 @@ CSV_OUTPUT_ROW_FILTER_MODE = 'corm'
|
|
|
85
85
|
CSV_OUTPUT_ROW_LIMIT = 'corl'
|
|
86
86
|
# Add timestamp column to CSV output file
|
|
87
87
|
CSV_OUTPUT_TIMESTAMP_COLUMN = 'cotc'
|
|
88
|
+
# Transpose output rows/columns
|
|
89
|
+
CSV_OUTPUT_TRANSPOSE = 'cotr'
|
|
88
90
|
# Output sort headers
|
|
89
91
|
CSV_OUTPUT_SORT_HEADERS = 'cosh'
|
|
90
92
|
# CSV todrive options
|
|
@@ -250,6 +252,7 @@ Globals = {
|
|
|
250
252
|
CSV_OUTPUT_ROW_LIMIT: 0,
|
|
251
253
|
CSV_OUTPUT_SORT_HEADERS: [],
|
|
252
254
|
CSV_OUTPUT_TIMESTAMP_COLUMN: None,
|
|
255
|
+
CSV_OUTPUT_TRANSPOSE: False,
|
|
253
256
|
CSV_TODRIVE: {},
|
|
254
257
|
CURRENT_API_SERVICES: {},
|
|
255
258
|
CURRENT_CLIENT_API: None,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gam/__init__.py,sha256=
|
|
1
|
+
gam/__init__.py,sha256=1AuCuBhgmNZZtKL4FiX3u_Kg7g8v6vufVIs4ABjhLvc,3482916
|
|
2
2
|
gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
|
|
3
3
|
gam/cacerts.pem,sha256=nJuWha0xm5dHw_5ptGphwRoO-r36Ccpqiww9pCEDbSc,67484
|
|
4
4
|
gam/cbcm-v1.1beta1.json,sha256=xO5XloCQQULmPbFBx5bckdqmbLFQ7sJ2TImhE1ysDIY,19439
|
|
@@ -29,7 +29,7 @@ gam/gamlib/glclargs.py,sha256=ptSTGELZHQS6SfvGGJ3NrXRoHAToO108NTYsFQE-C4c,42200
|
|
|
29
29
|
gam/gamlib/glentity.py,sha256=ZLbyMl9NhN-MBf9Rxmho2dBYeS4SNLMctpeaKFZSbQ4,33801
|
|
30
30
|
gam/gamlib/glgapi.py,sha256=TYPc91Ab-tNr-_nRArhPdRaB_6FbCZjBBNpEmRJuXrw,38295
|
|
31
31
|
gam/gamlib/glgdata.py,sha256=weRppttWm6uRyqtBoGPKoHiNZ2h28nhfUV4J_mbCszY,2707
|
|
32
|
-
gam/gamlib/glglobals.py,sha256=
|
|
32
|
+
gam/gamlib/glglobals.py,sha256=Y73xM1RNhIbtcqnMv1gcZF3wDWOeLWW-7SvoQyWw6tA,9659
|
|
33
33
|
gam/gamlib/glindent.py,sha256=RfBa2LDfLIqPLL5vMfC689TCVmqn8xf-qulSzkiatrc,1228
|
|
34
34
|
gam/gamlib/glmsgs.py,sha256=fUEwnzJsyThJDgrqslhXFLp7Ah_5e3VuyGNWAJKRi5o,33260
|
|
35
35
|
gam/gamlib/glskus.py,sha256=Gi0jjrSGwhCD4SvtqQfuAXwtEiL2zU4c8qXdxO1yY9k,15058
|
|
@@ -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.5.
|
|
69
|
-
gam7-7.5.
|
|
70
|
-
gam7-7.5.
|
|
71
|
-
gam7-7.5.
|
|
72
|
-
gam7-7.5.
|
|
68
|
+
gam7-7.5.16.dist-info/METADATA,sha256=zRrCQz1Mq69cv0LqKCLtiLt40Wn1JtiXsR8EAMejCFs,2889
|
|
69
|
+
gam7-7.5.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
70
|
+
gam7-7.5.16.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
|
|
71
|
+
gam7-7.5.16.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
72
|
+
gam7-7.5.16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|