diff --git a/docs/GamUpdates.md b/docs/GamUpdates.md index b4139018..df9a26cb 100644 --- a/docs/GamUpdates.md +++ b/docs/GamUpdates.md @@ -10,6 +10,14 @@ 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.66.05 + +Added column `space.name` to `gam print chatmembers`. + +### 6.66.04 + +Updated Chat info|show|print commands to display all time fields in local time if specified in `gam.cfg`. + ### 6.66.03 Fixed bug in `gam print filelist select ` where `stripcrsfromname` was not being diff --git a/docs/How-to-Upgrade-from-Standard-GAM.md b/docs/How-to-Upgrade-from-Standard-GAM.md index 8f44abf8..7351658f 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.66.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.66.05 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.10.8 64-bit final MacOS High Sierra 10.13.6 x86_64 @@ -1002,7 +1002,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.66.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.66.05 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.0 64-bit final Windows-10-10.0.17134 AMD64 diff --git a/docs/Version-and-Help.md b/docs/Version-and-Help.md index aaee9021..e779268c 100644 --- a/docs/Version-and-Help.md +++ b/docs/Version-and-Help.md @@ -4,7 +4,7 @@ Print the current version of Gam with details ``` gam version -GAMADV-XTD3 6.66.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.66.05 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.0 64-bit final MacOS Monterey 12.7 x86_64 @@ -16,7 +16,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.66.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.66.05 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.0 64-bit final MacOS Monterey 12.7 x86_64 @@ -28,7 +28,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.66.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.66.05 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.0 64-bit final MacOS Monterey 12.7 x86_64 @@ -65,7 +65,7 @@ MacOS High Sierra 10.13.6 x86_64 Path: /Users/Admin/bin/gamadv-xtd3 Version Check: Current: 5.35.08 - Latest: 6.66.03 + Latest: 6.66.05 echo $? 1 ``` @@ -73,7 +73,7 @@ echo $? Print the current version number without details ``` gam version simple -6.66.03 +6.66.05 ``` In Linux/MacOS you can do: ``` @@ -83,7 +83,7 @@ echo $VER Print the current version of Gam and address of this Wiki ``` gam help -GAM 6.66.03 - https://github.com/taers232c/GAMADV-XTD3 +GAM 6.66.05 - https://github.com/taers232c/GAMADV-XTD3 Ross Scroggs Python 3.12.0 64-bit final MacOS Monterey 12.7 x86_64 diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index d65617fb..5363f11d 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -2,6 +2,14 @@ Merged GAM-Team version +6.66.05 + +Added column `space.name` to `gam print chatmembers`. + +6.66.04 + +Updated Chat info|show|print commands to display all time fields in local time if specified in `gam.cfg`. + 6.66.03 Fixed bug in `gam print filelist select ` where `stripcrsfromname` was not being diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 89a3fe9e..7e5552ad 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -24578,6 +24578,8 @@ def doPrintShowBrowsers(): csvPF.SetSortTitles(['deviceId']) csvPF.writeCSVfile('Browsers') +BROWSER_TOKEN_TIME_OBJECTS = {'createTime', 'expireTime', 'revokeTime'} + def _showBrowserToken(browser, FJQC, i=0, count=0): if FJQC.formatJSON: printLine(json.dumps(cleanJSON(browser), ensure_ascii=False, sort_keys=True)) @@ -24633,8 +24635,6 @@ def doRevokeBrowserToken(): except GAPI.forbidden: accessErrorExit(None) -BROWSER_TOKEN_TIME_OBJECTS = {'createTime', 'expireTime', 'revokeTime'} - BROWSER_TOKEN_FIELDS_CHOICE_MAP = { 'createtime': 'createTime', 'creatorid': 'creatorId', @@ -24788,14 +24788,17 @@ def _cleanChatSpace(space): space.pop('type', None) space.pop('threaded', None) +CHAT_SPACE_TIME_OBJECTS = {'createTime'} + def _showChatSpace(space, FJQC, i=0, count=0): _cleanChatSpace(space) if FJQC.formatJSON: - printLine(json.dumps(cleanJSON(space), ensure_ascii=False, sort_keys=True)) + printLine(json.dumps(cleanJSON(space, timeObjects=CHAT_SPACE_TIME_OBJECTS), + ensure_ascii=False, sort_keys=True)) return printEntity([Ent.CHAT_SPACE, space['name']], i, count) Ind.Increment() - showJSON(None, space) + showJSON(None, space, timeObjects=CHAT_SPACE_TIME_OBJECTS) Ind.Decrement() def getChatSpaceParameters(myarg, body, typeChoicesMap): @@ -25059,7 +25062,7 @@ CHAT_PAGE_SIZE = 1000 def printShowChatSpaces(users): def _printChatSpace(user, space): _cleanChatSpace(space) - row = flattenJSON(space) + row = flattenJSON(space, timeObjects=CHAT_SPACE_TIME_OBJECTS) if user is not None: row['User'] = user if not FJQC.formatJSON: @@ -25067,7 +25070,7 @@ def printShowChatSpaces(users): elif csvPF.CheckRowTitles(row): row = {'User': user} if user is not None else {} row.update({'name': space['name'], - 'JSON': json.dumps(cleanJSON(space), + 'JSON': json.dumps(cleanJSON(space, timeObjects=CHAT_SPACE_TIME_OBJECTS), ensure_ascii=False, sort_keys=True)}) csvPF.WriteRowNoFilter(row) @@ -25554,17 +25557,18 @@ def printShowChatMembers(users): row = flattenJSON(member, timeObjects=CHAT_MEMBER_TIME_OBJECTS) if user is not None: row['User'] = user + row['space.name'] = parent if not FJQC.formatJSON: csvPF.WriteRowTitles(row) elif csvPF.CheckRowTitles(row): - row = {'User': user} if user is not None else {} + row = {'User': user, 'space.name': parent} if user is not None else {'space.name': parent} row.update({'name': member['name'], 'JSON': json.dumps(cleanJSON(member, timeObjects=CHAT_MEMBER_TIME_OBJECTS), ensure_ascii=False, sort_keys=True)}) csvPF.WriteRowNoFilter(row) cd = buildGAPIObject(API.DIRECTORY) - csvPF = CSVPrintFile(['User', 'name'] if not isinstance(users, list) else ['name']) if Act.csvFormat() else None + csvPF = CSVPrintFile(['User', 'space.name', 'name'] if not isinstance(users, list) else ['space.name', 'name']) if Act.csvFormat() else None FJQC = FormatJSONQuoteChar(csvPF) kwargs = {} parent = None @@ -25773,7 +25777,7 @@ def doDeleteChatMessage(): def _cleanChatMessage(message): message.pop('cards', None) -CHAT_MESSAGE_TIME_OBJECTS = {'createTime'} +CHAT_MESSAGE_TIME_OBJECTS = {'createTime', 'deleteTime', 'lastUpdateTime'} def _showChatMessage(message, FJQC, i=0, count=0): _cleanChatMessage(message) @@ -25844,7 +25848,7 @@ def printShowChatMessages(users): csvPF.WriteRowNoFilter(row) cd = buildGAPIObject(API.DIRECTORY) - csvPF = CSVPrintFile(['User', 'name'] if not isinstance(users, list) else ['name']) if Act.csvFormat() else None + csvPF = CSVPrintFile(['User', 'space.name', 'name'] if not isinstance(users, list) else ['space.name', 'name']) if Act.csvFormat() else None FJQC = FormatJSONQuoteChar(csvPF) parent = pfilter = None showDeleted = False