diff --git a/docs/Basic-Items.md b/docs/Basic-Items.md index 5bc1d74b..4ed4cb72 100644 --- a/docs/Basic-Items.md +++ b/docs/Basic-Items.md @@ -211,6 +211,7 @@ gfolder|gdirectory| gform| gfusion| + gjam| gmap| gpresentation| gscript| diff --git a/docs/Drive-File-Selection.md b/docs/Drive-File-Selection.md index d0bbe8e4..4e6d0b99 100644 --- a/docs/Drive-File-Selection.md +++ b/docs/Drive-File-Selection.md @@ -200,6 +200,7 @@ By default, all types of files and folders are displayed; you can specify a list gfolder|gdirectory| gform| gfusion| + gjam| gmap| gpresentation| gscript| @@ -218,6 +219,7 @@ This is the mapping from `` to MIME type. * `gfolder|gdirectory` - application/vnd.google-apps.folder * `gform` - application/vnd.google-apps.form * `gfusion|gfusiontable` - application/vnd.google-apps.fusiontable +* `gjam` - application/vnd.google-apps.jam * `gmap` - application/vnd.google-apps.map * `gpresentation` - application/vnd.google-apps.presentation * `gscript` - application/vnd.google-apps.script diff --git a/docs/GamUpdates.md b/docs/GamUpdates.md index d45ba86b..0dd8945f 100644 --- a/docs/GamUpdates.md +++ b/docs/GamUpdates.md @@ -10,6 +10,17 @@ Add the `-s` option to the end of the above commands to suppress creating the `g See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation. +### 6.64.03 + +Updated `gam get drivefile` to allow downloading Jamboard files; they must be downloaded with `format pdf`. + +### 6.64.02 + +Updated `gam transfer drive` to handle the following error: +``` +ERROR: 400: Bad Request. User message: "The action cannot be performed on an item of mime-type: application/vnd.google-apps.shortcut" - invalidSharingRequest +``` + ### 6.64.01 Updated `gam print|show youtubechannels` to handle the following error: diff --git a/docs/How-to-Upgrade-from-Standard-GAM.md b/docs/How-to-Upgrade-from-Standard-GAM.md index 30153273..8ab38fbe 100644 --- a/docs/How-to-Upgrade-from-Standard-GAM.md +++ b/docs/How-to-Upgrade-from-Standard-GAM.md @@ -334,7 +334,7 @@ writes the credentials into the file oauth2.txt. admin@server:/Users/admin/bin/gamadv-xtd3$ rm -f /Users/admin/GAMConfig/oauth2.txt admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam version WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found -GAMADV-XTD3 6.64.01 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.64.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.10.8 64-bit final MacOS High Sierra 10.13.6 x86_64 @@ -984,7 +984,7 @@ writes the credentials into the file oauth2.txt. C:\GAMADV-XTD3>del C:\GAMConfig\oauth2.txt C:\GAMADV-XTD3>gam version WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found -GAMADV-XTD3 6.64.01 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.64.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.11.5 64-bit final Windows-10-10.0.17134 AMD64 diff --git a/docs/Users-Drive-Files-Display.md b/docs/Users-Drive-Files-Display.md index f1a3691e..1ff44ed0 100644 --- a/docs/Users-Drive-Files-Display.md +++ b/docs/Users-Drive-Files-Display.md @@ -59,6 +59,7 @@ gfolder|gdirectory| gform| gfusion| + gjam| gmap| gpresentation| gscript| diff --git a/docs/Users-Drive-Files-Manage.md b/docs/Users-Drive-Files-Manage.md index 63c7e37b..4e71f01c 100644 --- a/docs/Users-Drive-Files-Manage.md +++ b/docs/Users-Drive-Files-Manage.md @@ -93,6 +93,7 @@ gfolder|gdirectory| gform| gfusion| + gjam| gmap| gpresentation| gscript| diff --git a/docs/Version-and-Help.md b/docs/Version-and-Help.md index ef669370..fda916fb 100644 --- a/docs/Version-and-Help.md +++ b/docs/Version-and-Help.md @@ -3,7 +3,7 @@ Print the current version of Gam with details ``` gam version -GAMADV-XTD3 6.64.01 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.64.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.11.5 64-bit final MacOS Monterey 12.6.6 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 ``` gam version timeoffset -GAMADV-XTD3 6.64.01 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.64.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.11.5 64-bit final MacOS Monterey 12.6.6 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 ``` gam version extended -GAMADV-XTD3 6.64.01 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.64.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.11.5 64-bit final MacOS Monterey 12.6.6 x86_64 @@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64 Path: /Users/Admin/bin/gamadv-xtd3 Version Check: Current: 5.35.08 - Latest: 6.64.01 + Latest: 6.64.03 echo $? 1 ``` @@ -72,7 +72,7 @@ echo $? Print the current version number without details ``` gam version simple -6.64.01 +6.64.03 ``` In Linux/MacOS you can do: ``` @@ -82,7 +82,7 @@ echo $VER Print the current version of Gam and address of this Wiki ``` gam help -GAM 6.64.01 - https://github.com/taers232c/GAMADV-XTD3 +GAM 6.64.03 - https://github.com/taers232c/GAMADV-XTD3 Ross Scroggs Python 3.11.5 64-bit final MacOS Monterey 12.6.6 x86_64 diff --git a/src/GamCommands.txt b/src/GamCommands.txt index ee325980..2dbfb7ed 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -217,6 +217,7 @@ If an item contains spaces, it should be surrounded by ". gfolder|gdirectory| gform| gfusion| + gjam| gmap| gpresentation| gscript| diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 2a02cdae..9ceac30d 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -2,6 +2,17 @@ Merged GAM-Team version +6.64.03 + +Updated `gam get drivefile` to allow downloading Jamboard files; they must be downloaded with `format pdf`. + +6.64.02 + +Updated `gam transfer drive` to handle the following error: +``` +ERROR: 400: Bad Request. User message: "The action cannot be performed on an item of mime-type: application/vnd.google-apps.shortcut" - invalidSharingRequest +``` + 6.64.01 Updated `gam print|show youtubechannels` to handle the following error: diff --git a/src/gam/__init__.py b/src/gam/__init__.py index b1fc0c7e..44ea9bd6 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -255,6 +255,7 @@ MIMETYPE_GA_FILE = f'{APPLICATION_VND_GOOGLE_APPS}file' MIMETYPE_GA_FOLDER = f'{APPLICATION_VND_GOOGLE_APPS}folder' MIMETYPE_GA_FORM = f'{APPLICATION_VND_GOOGLE_APPS}form' MIMETYPE_GA_FUSIONTABLE = f'{APPLICATION_VND_GOOGLE_APPS}fusiontable' +MIMETYPE_GA_JAM = f'{APPLICATION_VND_GOOGLE_APPS}jam' MIMETYPE_GA_MAP = f'{APPLICATION_VND_GOOGLE_APPS}map' MIMETYPE_GA_PRESENTATION = f'{APPLICATION_VND_GOOGLE_APPS}presentation' MIMETYPE_GA_SCRIPT = f'{APPLICATION_VND_GOOGLE_APPS}script' @@ -49266,6 +49267,7 @@ MIMETYPE_CHOICE_MAP = { 'gform': MIMETYPE_GA_FORM, 'gfusion': MIMETYPE_GA_FUSIONTABLE, 'gfusiontable': MIMETYPE_GA_FUSIONTABLE, + 'gjam': MIMETYPE_GA_JAM, 'gmap': MIMETYPE_GA_MAP, 'gpresentation': MIMETYPE_GA_PRESENTATION, 'gscript': MIMETYPE_GA_SCRIPT, @@ -56457,6 +56459,7 @@ NON_DOWNLOADABLE_MIMETYPES = [MIMETYPE_GA_FORM, MIMETYPE_GA_FUSIONTABLE, MIMETYP GOOGLEDOC_VALID_EXTENSIONS_MAP = { MIMETYPE_GA_DRAWING: ['.jpeg', '.jpg', '.pdf', '.png', '.svg'], MIMETYPE_GA_DOCUMENT: ['.docx', '.epub', '.html', '.odt', '.pdf', '.rtf', '.txt', '.zip'], + MIMETYPE_GA_JAM: ['.pdf'], MIMETYPE_GA_PRESENTATION: ['.pdf', '.pptx', '.odp', '.txt'], MIMETYPE_GA_SPREADSHEET: ['.csv', '.ods', '.pdf', '.tsv', '.xlsx', '.zip'], } @@ -57164,17 +57167,18 @@ def transferDrive(users): removeTargetParents.add(targetRootId) try: actionUser = sourceUser - if not updateTargetPermission: - op = 'Create Source ACL' - callGAPI(sourceDrive.permissions(), 'create', - throwReasons=GAPI.DRIVE_ACCESS_THROW_REASONS+[GAPI.BAD_REQUEST, GAPI.INVALID_SHARING_REQUEST, GAPI.SHARING_RATE_LIMIT_EXCEEDED], - fileId=childFileId, sendNotificationEmail=False, body=targetWriterPermissionsBody, fields='') - op = 'Update Source ACL' - callGAPI(sourceDrive.permissions(), 'update', - throwReasons=GAPI.DRIVE_ACCESS_THROW_REASONS+[GAPI.BAD_REQUEST, GAPI.INVALID_OWNERSHIP_TRANSFER, - GAPI.PERMISSION_NOT_FOUND, GAPI.SHARING_RATE_LIMIT_EXCEEDED], - fileId=childFileId, permissionId=targetPermissionId, - transferOwnership=True, body={'role': 'owner'}, fields='') + if childEntryInfo['mimeType'] != MIMETYPE_GA_SHORTCUT: + if not updateTargetPermission: + op = 'Create Source ACL' + callGAPI(sourceDrive.permissions(), 'create', + throwReasons=GAPI.DRIVE_ACCESS_THROW_REASONS+[GAPI.BAD_REQUEST, GAPI.INVALID_SHARING_REQUEST, GAPI.SHARING_RATE_LIMIT_EXCEEDED], + fileId=childFileId, sendNotificationEmail=False, body=targetWriterPermissionsBody, fields='') + op = 'Update Source ACL' + callGAPI(sourceDrive.permissions(), 'update', + throwReasons=GAPI.DRIVE_ACCESS_THROW_REASONS+[GAPI.BAD_REQUEST, GAPI.INVALID_OWNERSHIP_TRANSFER, + GAPI.PERMISSION_NOT_FOUND, GAPI.SHARING_RATE_LIMIT_EXCEEDED], + fileId=childFileId, permissionId=targetPermissionId, + transferOwnership=True, body={'role': 'owner'}, fields='') if removeSourceParents: op = 'Remove Source Parents' callGAPI(sourceDrive.files(), 'update',