Unescape \r and \n in chatmessage text so multiline messages can be created from command line (#1387)

* Unescape \r and \n in chatmessage text so multiline messages can be created

* Bring gam report activity list up to date
This commit is contained in:
Ross Scroggs
2021-06-10 06:33:51 -07:00
committed by GitHub
parent 2d7bc2f34a
commit f540fa2a38
2 changed files with 16 additions and 12 deletions

View File

@ -896,23 +896,27 @@ gam delete resoldsubscription <CustomerID> <SKUID> cancel|downgrade|transfer_to_
gam info resoldsubscriptions <CustomerID> [customer_auth_token <String>] gam info resoldsubscriptions <CustomerID> [customer_auth_token <String>]
<ActivityApplicationName> ::= <ActivityApplicationName> ::=
access|accesstransparency| access_transparency|
admin| admin|
calendar|calendars| calendar|
chat| chat|
drive|doc|docs| chrome|
enterprisegroups|groupsenterprise| context_aware_access|
data_studio|
drive|
gcp| gcp|
google+|gplus| gplus|
group|groups| groups|
hangoutsmeet|meet| groups_enterprise|
jamboard| jamboard|
login|logins| keep|
login|
meet|
mobile| mobile|
oauthtoken|token|tokens|
rules| rules|
saml| saml|
useraccounts token|
user_accounts
<ReportsApp> ::= <ReportsApp> ::=
accounts| accounts|

View File

@ -102,7 +102,7 @@ def create_message():
while i < len(sys.argv): while i < len(sys.argv):
myarg = sys.argv[i].lower() myarg = sys.argv[i].lower()
if myarg == 'text': if myarg == 'text':
body['text'] = sys.argv[i+1] body['text'] = sys.argv[i+1].replace('\\r', '\r').replace('\\n', '\n')
i += 2 i += 2
elif myarg == 'textfile': elif myarg == 'textfile':
filename = sys.argv[i + 1] filename = sys.argv[i + 1]
@ -172,7 +172,7 @@ def update_message():
while i < len(sys.argv): while i < len(sys.argv):
myarg = sys.argv[i].lower() myarg = sys.argv[i].lower()
if myarg == 'text': if myarg == 'text':
body['text'] = sys.argv[i+1] body['text'] = sys.argv[i+1].replace('\\r', '\r').replace('\\n', '\n')
i += 2 i += 2
elif myarg == 'textfile': elif myarg == 'textfile':
filename = sys.argv[i + 1] filename = sys.argv[i + 1]