mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-29 18:31:38 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
537a926618 | ||
|
|
f791a59b1d | ||
|
|
0b8e41f993 | ||
|
|
f540fa2a38 | ||
|
|
2d7bc2f34a | ||
|
|
c2dea0a4d7 | ||
|
|
42cbfbf8ed | ||
|
|
137e79b012 | ||
|
|
5849ed3ecc | ||
|
|
d3dc1e1197 |
7
.github/actions/macos-install.sh
vendored
7
.github/actions/macos-install.sh
vendored
@@ -7,12 +7,7 @@ export distpath="dist/"
|
|||||||
export gampath="${distpath}gam"
|
export gampath="${distpath}gam"
|
||||||
rm -rf $gampath
|
rm -rf $gampath
|
||||||
export specfile="gam.spec"
|
export specfile="gam.spec"
|
||||||
if [ "$macver" == "10.15.7" ]; then
|
$python -OO -m PyInstaller --clean --noupx --strip --distpath "${gampath}" --target-architecture $PLATFORM "${specfile}"
|
||||||
youtoo=""
|
|
||||||
else
|
|
||||||
youtoo=""
|
|
||||||
fi
|
|
||||||
$python -OO -m PyInstaller --clean --noupx --strip --distpath "${gampath}" $youtoo "${specfile}"
|
|
||||||
export gam="${gampath}/gam"
|
export gam="${gampath}/gam"
|
||||||
$gam version extended
|
$gam version extended
|
||||||
export GAMVERSION=`$gam version simple`
|
export GAMVERSION=`$gam version simple`
|
||||||
|
|||||||
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -18,7 +18,7 @@ env:
|
|||||||
MIN_OPENSSL_VERSION: "1.1.1k"
|
MIN_OPENSSL_VERSION: "1.1.1k"
|
||||||
PATCHELF_VERSION: "0.12"
|
PATCHELF_VERSION: "0.12"
|
||||||
# PYINSTALLER_VERSION can be full commit hash or version like v4.20
|
# PYINSTALLER_VERSION can be full commit hash or version like v4.20
|
||||||
PYINSTALLER_VERSION: "416f42b548b513fc29219eb7b4210751938b8603"
|
PYINSTALLER_VERSION: "e5dbb051bd3d53d6c2c70cbd87270eec1765da2e"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -104,7 +104,7 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
~/python
|
~/python
|
||||||
~/ssl
|
~/ssl
|
||||||
key: ${{ matrix.os }}-${{ matrix.jid }}-20210511
|
key: ${{ matrix.os }}-${{ matrix.jid }}-20210611
|
||||||
|
|
||||||
- name: Set env variables
|
- name: Set env variables
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ If an item contains spaces, it should be surrounded by ".
|
|||||||
<CalendarColorIndex> ::= <Number in range 1-24>
|
<CalendarColorIndex> ::= <Number in range 1-24>
|
||||||
<CalendarItem> ::= <EmailAddress>|<String>
|
<CalendarItem> ::= <EmailAddress>|<String>
|
||||||
<ChatRoom> ::= <String>
|
<ChatRoom> ::= <String>
|
||||||
|
<ChatSpace> ::= <String>
|
||||||
<ClientID> ::= <String>
|
<ClientID> ::= <String>
|
||||||
<ColorValue> ::= <ColorName>|<ColorHex>
|
<ColorValue> ::= <ColorName>|<ColorHex>
|
||||||
<CollaboratorItem> ::= <EmailAddress>|<UniqueID>|<String>
|
<CollaboratorItem> ::= <EmailAddress>|<UniqueID>|<String>
|
||||||
@@ -895,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|
|
||||||
@@ -1167,6 +1172,14 @@ gam print browsertokens [todrive]
|
|||||||
[fields <BrowserTokenFieldNameList>]
|
[fields <BrowserTokenFieldNameList>]
|
||||||
[sortheaders]
|
[sortheaders]
|
||||||
|
|
||||||
|
gam print chatspaces [todrive]
|
||||||
|
gam print chatmembers space <ChatSpace> [todrive]
|
||||||
|
gam create chatmessage space <ChatSpace> [thread <String>]
|
||||||
|
(text <String>)|(textfile <FileName> [charset <CharSet>])
|
||||||
|
gam delete chatmessage name <String>
|
||||||
|
gam update chatmessage name <String>
|
||||||
|
(text <String>)|(textfile <FileName> [charset <CharSet>])
|
||||||
|
|
||||||
<CrOSAction> ::=
|
<CrOSAction> ::=
|
||||||
deprovision_same_model_replace|
|
deprovision_same_model_replace|
|
||||||
deprovision_different_model_replace|
|
deprovision_different_model_replace|
|
||||||
|
|||||||
@@ -797,7 +797,7 @@ def doGAMVersion(checkForArgs=True):
|
|||||||
'passlib',
|
'passlib',
|
||||||
'python-dateutil',
|
'python-dateutil',
|
||||||
'yubikey-manager',
|
'yubikey-manager',
|
||||||
'yomama']
|
]
|
||||||
for lib in libs:
|
for lib in libs:
|
||||||
try:
|
try:
|
||||||
print(f'{lib} {lib_version(lib)}')
|
print(f'{lib} {lib_version(lib)}')
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ def print_spaces():
|
|||||||
try:
|
try:
|
||||||
spaces = gapi.get_all_pages(chat.spaces(), 'list', 'spaces', throw_reasons=THROW_REASONS)
|
spaces = gapi.get_all_pages(chat.spaces(), 'list', 'spaces', throw_reasons=THROW_REASONS)
|
||||||
except googleapiclient.errors.HttpError as err:
|
except googleapiclient.errors.HttpError as err:
|
||||||
_chat_error_handler(chat, err)
|
_chat_error_handler(chat, err)
|
||||||
if not spaces:
|
if not spaces:
|
||||||
print('Bot not added to any Chat rooms or users yet.')
|
print('Bot not added to any Chat rooms or users yet.')
|
||||||
else:
|
else:
|
||||||
@@ -77,6 +77,9 @@ def print_members():
|
|||||||
i += 1
|
i += 1
|
||||||
else:
|
else:
|
||||||
controlflow.invalid_argument_exit(myarg, "gam print chatmembers")
|
controlflow.invalid_argument_exit(myarg, "gam print chatmembers")
|
||||||
|
if not space:
|
||||||
|
controlflow.system_error_exit(2,
|
||||||
|
'space <ChatSpace> is required.')
|
||||||
try:
|
try:
|
||||||
results = gapi.get_all_pages(chat.spaces().members(), 'list', 'memberships', parent=space)
|
results = gapi.get_all_pages(chat.spaces().members(), 'list', 'memberships', parent=space)
|
||||||
except googleapiclient.errors.HttpError as err:
|
except googleapiclient.errors.HttpError as err:
|
||||||
@@ -99,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]
|
||||||
@@ -115,6 +118,12 @@ def create_message():
|
|||||||
i += 2
|
i += 2
|
||||||
else:
|
else:
|
||||||
controlflow.invalid_argument_exit(myarg, "gam create chat")
|
controlflow.invalid_argument_exit(myarg, "gam create chat")
|
||||||
|
if not space:
|
||||||
|
controlflow.system_error_exit(2,
|
||||||
|
'space <ChatSpace> is required.')
|
||||||
|
if 'text' not in body:
|
||||||
|
controlflow.system_error_exit(2,
|
||||||
|
'text <String> or textfile <FileName> is required.')
|
||||||
if len(body['text']) > 4096:
|
if len(body['text']) > 4096:
|
||||||
body['text'] = body['text'][:4095]
|
body['text'] = body['text'][:4095]
|
||||||
print('WARNING: trimmed message longer than 4k to be 4k in length.')
|
print('WARNING: trimmed message longer than 4k to be 4k in length.')
|
||||||
@@ -143,6 +152,9 @@ def delete_message():
|
|||||||
i += 2
|
i += 2
|
||||||
else:
|
else:
|
||||||
controlflow.invalid_argument_exit(myarg, "gam delete chat")
|
controlflow.invalid_argument_exit(myarg, "gam delete chat")
|
||||||
|
if not name:
|
||||||
|
controlflow.system_error_exit(2,
|
||||||
|
'name <String> is required.')
|
||||||
try:
|
try:
|
||||||
gapi.call(chat.spaces().messages(),
|
gapi.call(chat.spaces().messages(),
|
||||||
'delete',
|
'delete',
|
||||||
@@ -160,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]
|
||||||
@@ -171,6 +183,12 @@ def update_message():
|
|||||||
i += 2
|
i += 2
|
||||||
else:
|
else:
|
||||||
controlflow.invalid_argument_exit(myarg, "gam update chat")
|
controlflow.invalid_argument_exit(myarg, "gam update chat")
|
||||||
|
if not name:
|
||||||
|
controlflow.system_error_exit(2,
|
||||||
|
'name <String> is required.')
|
||||||
|
if 'text' not in body:
|
||||||
|
controlflow.system_error_exit(2,
|
||||||
|
'text <String> or textfile <FileName> is required.')
|
||||||
if len(body['text']) > 4096:
|
if len(body['text']) > 4096:
|
||||||
body['text'] = body['text'][:4095]
|
body['text'] = body['text'][:4095]
|
||||||
print('WARNING: trimmed message longer than 4k to be 4k in length.')
|
print('WARNING: trimmed message longer than 4k to be 4k in length.')
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import platform
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
GAM_AUTHOR = 'Jay Lee <jay0lee@gmail.com>'
|
GAM_AUTHOR = 'Jay Lee <jay0lee@gmail.com>'
|
||||||
GAM_VERSION = '6.04'
|
GAM_VERSION = '6.05'
|
||||||
GAM_LICENSE = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
GAM_LICENSE = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||||
|
|
||||||
GAM_URL = 'https://git.io/gam'
|
GAM_URL = 'https://git.io/gam'
|
||||||
@@ -1520,7 +1520,7 @@ USER_EXTERNALID_TYPES = [
|
|||||||
]
|
]
|
||||||
USER_GENDER_TYPES = ['female', 'male', 'unknown']
|
USER_GENDER_TYPES = ['female', 'male', 'unknown']
|
||||||
USER_IM_TYPES = ['home', 'work', 'other']
|
USER_IM_TYPES = ['home', 'work', 'other']
|
||||||
USER_KEYWORD_TYPES = ['occupation', 'outlook']
|
USER_KEYWORD_TYPES = ['occupation', 'outlook', 'mission']
|
||||||
USER_LOCATION_TYPES = ['default', 'desk']
|
USER_LOCATION_TYPES = ['default', 'desk']
|
||||||
USER_ORGANIZATION_TYPES = ['domain_only', 'school', 'unknown', 'work']
|
USER_ORGANIZATION_TYPES = ['domain_only', 'school', 'unknown', 'work']
|
||||||
USER_PHONE_TYPES = [
|
USER_PHONE_TYPES = [
|
||||||
@@ -1535,7 +1535,7 @@ USER_RELATION_TYPES = [
|
|||||||
]
|
]
|
||||||
USER_WEBSITE_TYPES = [
|
USER_WEBSITE_TYPES = [
|
||||||
'app_install_page', 'blog', 'ftp', 'home', 'home_page', 'other', 'profile',
|
'app_install_page', 'blog', 'ftp', 'home', 'home_page', 'other', 'profile',
|
||||||
'reservations', 'work'
|
'reservations', 'resume', 'work'
|
||||||
]
|
]
|
||||||
|
|
||||||
WEBCOLOR_MAP = {
|
WEBCOLOR_MAP = {
|
||||||
|
|||||||
Reference in New Issue
Block a user