Compare commits

..

11 Commits

Author SHA1 Message Date
Ross Scroggs
cd0d82e994 Updated gam report <ActivityApplicationName> 2025-06-22 12:31:13 -07:00
Ross Scroggs
f29f27577c Update Users-Gmail-Send-As-Signature-Vacation.md
Some checks failed
Push wiki / pushwiki (push) Has been cancelled
2025-06-22 06:41:43 -07:00
Ross Scroggs
cb5e5d1943 Update Users-Gmail-Send-As-Signature-Vacation.md 2025-06-22 06:34:31 -07:00
Ross Scroggs
88bdfd2883 _finalizeMessageSelectParameter
Some checks failed
Push wiki / pushwiki (push) Has been cancelled
2025-06-21 06:32:12 -07:00
Ross Scroggs
e875acf428 Fixed labelids <LabelIdList> bug
Some checks failed
Build and test GAM / build (build, 1, Build Intel Ubuntu Jammy, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (build, 10, Build Intel Windows, windows-2022) (push) Has been cancelled
Build and test GAM / build (build, 11, Build Arm Windows, windows-11-arm) (push) Has been cancelled
Build and test GAM / build (build, 2, Build Intel Ubuntu Noble, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (build, 3, Build Arm Ubuntu Noble, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 4, Build Arm Ubuntu Jammy, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 5, Build Intel StaticX Legacy, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (build, 6, Build Arm StaticX Legacy, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (build, 7, Build Intel MacOS, macos-13) (push) Has been cancelled
Build and test GAM / build (build, 8, Build Arm MacOS 14, macos-14) (push) Has been cancelled
Build and test GAM / build (build, 9, Build Arm MacOS 15, macos-15) (push) Has been cancelled
Build and test GAM / build (test, 12, Test Python 3.10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (test, 13, Test Python 3.11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (test, 14, Test Python 3.12, ubuntu-24.04, 3.12) (push) Has been cancelled
Build and test GAM / build (test, 15, Test Python 3.14-dev, ubuntu-24.04, 3.14-dev) (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
2025-06-21 06:31:58 -07:00
Ross Scroggs
5d213e9951 Added option labelids <LabelIdList> to all commands that process messages
Some checks failed
Build and test GAM / build (build, 1, Build Intel Ubuntu Jammy, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (build, 10, Build Intel Windows, windows-2022) (push) Has been cancelled
Build and test GAM / build (build, 11, Build Arm Windows, windows-11-arm) (push) Has been cancelled
Build and test GAM / build (build, 2, Build Intel Ubuntu Noble, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (build, 3, Build Arm Ubuntu Noble, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 4, Build Arm Ubuntu Jammy, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 5, Build Intel StaticX Legacy, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (build, 6, Build Arm StaticX Legacy, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (build, 7, Build Intel MacOS, macos-13) (push) Has been cancelled
Build and test GAM / build (build, 8, Build Arm MacOS 14, macos-14) (push) Has been cancelled
Build and test GAM / build (build, 9, Build Arm MacOS 15, macos-15) (push) Has been cancelled
Build and test GAM / build (test, 12, Test Python 3.10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (test, 13, Test Python 3.11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (test, 14, Test Python 3.12, ubuntu-24.04, 3.12) (push) Has been cancelled
Build and test GAM / build (test, 15, Test Python 3.14-dev, ubuntu-24.04, 3.14-dev) (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
Push wiki / pushwiki (push) Has been cancelled
2025-06-20 10:22:05 -07:00
Ross Scroggs
35d61da0a0 Added option labelids <LabelIdList> to all commands that process messages 2025-06-20 10:21:32 -07:00
Ross Scroggs
da04ead86d Updated gam <UserTypeEntity> print|show forms 2025-06-20 07:40:36 -07:00
Ross Scroggs
5526c987ea Updated gam <UserTypeEntity> print|show forms 2025-06-20 07:40:22 -07:00
Ross Scroggs
d9795b3f83 Update Users-Forms.md 2025-06-20 06:34:41 -07:00
Ross Scroggs
39a17bacb1 Added ispublished and isacceptingresponses to create|update form
Some checks failed
Build and test GAM / build (build, 1, Build Intel Ubuntu Jammy, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (build, 10, Build Intel Windows, windows-2022) (push) Has been cancelled
Build and test GAM / build (build, 11, Build Arm Windows, windows-11-arm) (push) Has been cancelled
Build and test GAM / build (build, 2, Build Intel Ubuntu Noble, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (build, 3, Build Arm Ubuntu Noble, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 4, Build Arm Ubuntu Jammy, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 5, Build Intel StaticX Legacy, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (build, 6, Build Arm StaticX Legacy, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (build, 7, Build Intel MacOS, macos-13) (push) Has been cancelled
Build and test GAM / build (build, 8, Build Arm MacOS 14, macos-14) (push) Has been cancelled
Build and test GAM / build (build, 9, Build Arm MacOS 15, macos-15) (push) Has been cancelled
Build and test GAM / build (test, 12, Test Python 3.10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (test, 13, Test Python 3.11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (test, 14, Test Python 3.12, ubuntu-24.04, 3.12) (push) Has been cancelled
Build and test GAM / build (test, 15, Test Python 3.14-dev, ubuntu-24.04, 3.14-dev) (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
Push wiki / pushwiki (push) Has been cancelled
2025-06-19 09:00:41 -07:00
10 changed files with 194 additions and 60 deletions

View File

@@ -4435,20 +4435,18 @@ gam report usage customer [todrive <ToDriveAttribute>*]
[convertmbtogb] [convertmbtogb]
<ActivityApplicationName> ::= <ActivityApplicationName> ::=
access|accesstransparency| accesstransparency|access|
admin| admin|
calendar|calendars| calendar|calendars|
chat| chat|
chrome| chrome|
classroom| classroom|
contextawareaccess| contextawareaccess|
currents|gplus|google+| gplus|currents|google+|
datastudio| datastudio|
devices|mobile|
domain|
drive|doc|docs| drive|doc|docs|
gcp|cloud| gcp|cloud|
gemini|geminiforworkspace| geminiinworkspaceapps|gemini|geminiforworkspace|
groups|group| groups|group|
groupsenterprise|enterprisegroups| groupsenterprise|enterprisegroups|
jamboard| jamboard|
@@ -4466,7 +4464,7 @@ gam report <ActivityApplicationName> [todrive <ToDriveAttribute>*]
[(user all|<UserItem>)|(orgunit|org|ou <OrgUnitPath> [showorgunit])|(select <UserTypeEntity>)] [(user all|<UserItem>)|(orgunit|org|ou <OrgUnitPath> [showorgunit])|(select <UserTypeEntity>)]
[([start <Time>] [end <Time>])|(range <Time> <Time>)| [([start <Time>] [end <Time>])|(range <Time> <Time>)|
yesterday|today|thismonth|(previousmonths <Integer>)] yesterday|today|thismonth|(previousmonths <Integer>)]
[filtertime.String> <Time>] [filter|filters <String>] [filtertime.<String> <Time>] [filter|filters <String>]
[event|events <EventNameList>] [ip <String>] [event|events <EventNameList>] [ip <String>]
[groupidfilter <String>] [groupidfilter <String>]
[maxactivities <Number>] [maxevents <Number>] [maxresults <Number>] [maxactivities <Number>] [maxevents <Number>] [maxresults <Number>]
@@ -7615,48 +7613,61 @@ gam <UserTypeEntity> insert message
gam <UserTypeEntity> archive messages <GroupItem> gam <UserTypeEntity> archive messages <GroupItem>
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_archive <Number>])|(ids <MessageIDEntity>) [quick|notquick] [doit] [max_to_archive <Number>])|(ids <MessageIDEntity>)
[csv [todrive <ToDriveAttribute>*]] [csv [todrive <ToDriveAttribute>*]]
gam <UserTypeEntity> delete messages|threads gam <UserTypeEntity> delete messages|threads
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_delete <Number>])|(ids <MessageIDEntity>) [quick|notquick] [doit] [max_to_delete <Number>])|(ids <MessageIDEntity>)
[csv [todrive <ToDriveAttribute>*]] [csv [todrive <ToDriveAttribute>*]]
gam <UserTypeEntity> modify messages|threads gam <UserTypeEntity> modify messages|threads
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_modify <Number>])|(ids <MessageIDEntity>) [quick|notquick] [doit] [max_to_modify <Number>])|(ids <MessageIDEntity>)
((addlabel <LabelName>)|(removelabel <LabelName>))+ ((addlabel <LabelName>)|(removelabel <LabelName>))+
[csv [todrive <ToDriveAttribute>*]] [csv [todrive <ToDriveAttribute>*]]
gam <UserTypeEntity> spam messages|threads gam <UserTypeEntity> spam messages|threads
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_spam <Number>])|(ids <MessageIDEntity>) [quick|notquick] [doit] [max_to_spam <Number>])|(ids <MessageIDEntity>)
[csv [todrive <ToDriveAttribute>*]] [csv [todrive <ToDriveAttribute>*]]
gam <UserTypeEntity> trash messages|threads gam <UserTypeEntity> trash messages|threads
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_trash <Number>])|(ids <MessageIDEntity>) [quick|notquick] [doit] [max_to_trash <Number>])|(ids <MessageIDEntity>)
[csv [todrive <ToDriveAttribute>*]] [csv [todrive <ToDriveAttribute>*]]
gam <UserTypeEntity> untrash messages|threads gam <UserTypeEntity> untrash messages|threads
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_untrash <Number>])|(ids <MessageIDEntity>) [quick|notquick] [doit] [max_to_untrash <Number>])|(ids <MessageIDEntity>)
[csv [todrive <ToDriveAttribute>*]] [csv [todrive <ToDriveAttribute>*]]
gam <UserTypeEntity> export message|messages gam <UserTypeEntity> export message|messages
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ [quick|notquick] [doit] [max_to_export <Number>])|(ids <MessageIDEntity>) (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_export <Number>])|(ids <MessageIDEntity>)
[targetfolder <FilePath>] [targetname <FileName>] [overwrite [<Boolean>]] [targetfolder <FilePath>] [targetname <FileName>] [overwrite [<Boolean>]]
gam <UserTypeEntity> export thread|threads gam <UserTypeEntity> export thread|threads
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ [quick|notquick] [doit] [max_to_export <Number>])|(ids <ThreadIDEntity>) (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_export <Number>])|(ids <ThreadIDEntity>)
[targetfolder <FilePath>] [targetname <FileName>] [overwrite [<Boolean>]] [targetfolder <FilePath>] [targetname <FileName>] [overwrite [<Boolean>]]
gam <UserTypeEntity> forward message|messages recipient|to <RecipientEntity> gam <UserTypeEntity> forward message|messages recipient|to <RecipientEntity>
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_forward <Number>])|(ids <MessageIDEntity>) [quick|notquick] [doit] [max_to_forward <Number>])|(ids <MessageIDEntity>)
[subject <String>] [addorigfieldstosubject [<Boolean>]] [altcharset <String>] [subject <String>] [addorigfieldstosubject [<Boolean>]] [altcharset <String>]
gam <UserTypeEntity> forward thread|thtreads recipient|to <RecipientEntity> gam <UserTypeEntity> forward thread|thtreads recipient|to <RecipientEntity>
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
quick|notquick] [doit] [max_to_forward <Number>])|(ids <ThreadIDEntity>) quick|notquick] [doit] [max_to_forward <Number>])|(ids <ThreadIDEntity>)
[subject <String>] [addorigfieldstosubject [<Boolean>]] [altcharset <String>] [subject <String>] [addorigfieldstosubject [<Boolean>]] [altcharset <String>]
gam <UserTypeEntity> show messages|threads gam <UserTypeEntity> show messages|threads
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])* (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])*
[labelids <LabelIDList>]
[quick|notquick] [max_to_show <Number>] [includespamtrash])|(ids <MessageIDEntity>) [quick|notquick] [max_to_show <Number>] [includespamtrash])|(ids <MessageIDEntity>)
[labelmatchpattern <REMatchPattern>] [sendermatchpattern <REMatchPattern>] [labelmatchpattern <REMatchPattern>] [sendermatchpattern <REMatchPattern>]
[countsonly|positivecountsonly] [useronly] [countsonly|positivecountsonly] [useronly]
@@ -7669,6 +7680,7 @@ gam <UserTypeEntity> show messages|threads
[uploadattachments [<DriveFileParentAttribute>]]] [uploadattachments [<DriveFileParentAttribute>]]]
gam <UserTypeEntity> print messages|threads [todrive <ToDriveAttribute>*] gam <UserTypeEntity> print messages|threads [todrive <ToDriveAttribute>*]
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])* (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])*
[labelids <LabelIDList>]
[quick|notquick] [max_to_print <Number>] [includespamtrash])|(ids <MessageIDEntity>) [quick|notquick] [max_to_print <Number>] [includespamtrash])|(ids <MessageIDEntity>)
[labelmatchpattern <REMatchPattern>] [sendermatchpattern <REMatchPattern>] [labelmatchpattern <REMatchPattern>] [sendermatchpattern <REMatchPattern>]
[countsonly|positivecountsonly] [useronly] [countsonly|positivecountsonly] [useronly]

View File

@@ -1,3 +1,25 @@
7.10.04
Updated `gam report <ActivityApplicationName>` to accept accept application names as defined
in the Reports API discovery document; this means that GAM does not have to be updated when
Google defines a new application name.
`gemini_in_workspace_apps` is now available in `gam report`.
7.10.03
Fixed bug in commands that modify messages where the `labelids <LabelIdList>` option
was not being applied.
7.10.02
Added option `labelids <LabelIdList>` to all commands that process messages;
this option causes GAM to only return messages with labels that match all of the specified label IDs.
Updated `gam <UserTypeEntity> print|show forms` to always display `isPublished` and
`isAcceptingResponses` in `publishSettings/publishState` regardless of their value;
the API doesn't return these values when they are False.
7.10.01 7.10.01
Added options `ispublished [<Boolean>]` and `isacceptingresponses [<Boolean>]` to Added options `ispublished [<Boolean>]` and `isacceptingresponses [<Boolean>]` to

View File

@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
""" """
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>' __author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
__version__ = '7.10.01' __version__ = '7.10.04'
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
#pylint: disable=wrong-import-position #pylint: disable=wrong-import-position
@@ -13548,52 +13548,55 @@ def doReportUsage():
NL_SPACES_PATTERN = re.compile(r'\n +') NL_SPACES_PATTERN = re.compile(r'\n +')
DISABLED_REASON_TIME_PATTERN = re.compile(r'.*(\d{4}/\d{2}/\d{2}-\d{2}:\d{2}:\d{2})') DISABLED_REASON_TIME_PATTERN = re.compile(r'.*(\d{4}/\d{2}/\d{2}-\d{2}:\d{2}:\d{2})')
REPORT_CHOICE_MAP = { REPORT_ALIASES_CHOICE_MAP = {
'access': 'access_transparency', 'access': 'accesstransparency',
'accesstransparency': 'access_transparency',
'admin': 'admin',
'calendar': 'calendar',
'calendars': 'calendar', 'calendars': 'calendar',
'chat': 'chat',
'chrome': 'chrome',
'classroom': 'classroom',
'cloud': 'gcp', 'cloud': 'gcp',
'contextawareaccess': 'context_aware_access',
'currents': 'gplus', 'currents': 'gplus',
'customer': 'customer',
'customers': 'customer', 'customers': 'customer',
'datastudio': 'data_studio', 'domain': 'customer',
'devices': 'mobile', 'devices': 'mobile',
'doc': 'drive', 'doc': 'drive',
'docs': 'drive', 'docs': 'drive',
'domain': 'customer', 'enterprisegroups': 'groupsenterprise',
'drive': 'drive', 'gemini': 'geminiinworkspaceapps',
'enterprisegroups': 'groups_enterprise', 'geminiforworkspace': 'geminiinworkspaceapps',
'gcp': 'gcp',
'gemini': 'gemini_for_workspace',
'geminiforworkspace': 'gemini_for_workspace',
'gplus': 'gplus',
'google+': 'gplus',
'group': 'groups', 'group': 'groups',
'google+': 'gplus',
'hangoutsmeet': 'meet',
'logins': 'login',
'lookerstudio': 'datastudio',
'oauthtoken': 'token',
'tokens': 'token',
'users': 'user',
}
REPORT_CHOICE_MAP = {
'accesstransparency': 'access_transparency',
'admin': 'admin',
'calendar': 'calendar',
'chat': 'chat',
'chrome': 'chrome',
'contextawareaccess': 'context_aware_access',
'customer': 'customer',
'datastudio': 'data_studio',
'drive': 'drive',
'gcp': 'gcp',
'geminiinworkspaceapps': 'gemini_in_workspace_apps',
'gplus': 'gplus',
'groups': 'groups', 'groups': 'groups',
'groupsenterprise': 'groups_enterprise', 'groupsenterprise': 'groups_enterprise',
'hangoutsmeet': 'meet',
'jamboard': 'jamboard', 'jamboard': 'jamboard',
'keep': 'keep', 'keep': 'keep',
'login': 'login', 'login': 'login',
'logins': 'login',
'lookerstudio': 'data_studio',
'meet': 'meet', 'meet': 'meet',
'mobile': 'mobile', 'mobile': 'mobile',
'oauthtoken': 'token',
'rules': 'rules', 'rules': 'rules',
'saml': 'saml', 'saml': 'saml',
'token': 'token', 'token': 'token',
'tokens': 'token',
'usage': 'usage', 'usage': 'usage',
'usageparameters': 'usageparameters', 'usageparameters': 'usageparameters',
'user': 'user', 'user': 'user',
'users': 'user',
'useraccounts': 'user_accounts', 'useraccounts': 'user_accounts',
'vault': 'vault', 'vault': 'vault',
} }
@@ -13883,7 +13886,7 @@ def doReport():
if dyn_choice.replace('_', '') not in REPORT_CHOICE_MAP and \ if dyn_choice.replace('_', '') not in REPORT_CHOICE_MAP and \
dyn_choice not in REPORT_CHOICE_MAP.values(): dyn_choice not in REPORT_CHOICE_MAP.values():
REPORT_CHOICE_MAP[dyn_choice.replace('_', '')] = dyn_choice REPORT_CHOICE_MAP[dyn_choice.replace('_', '')] = dyn_choice
report = getChoice(REPORT_CHOICE_MAP, mapChoice=True) report = getChoice(REPORT_CHOICE_MAP, choiceAliases=REPORT_ALIASES_CHOICE_MAP, mapChoice=True)
if report == 'usage': if report == 'usage':
doReportUsage() doReportUsage()
return return
@@ -70133,6 +70136,7 @@ def _initMessageThreadParameters(entityType, doIt, maxToProcess):
'query': '', 'queryTimes': {}, 'query': '', 'queryTimes': {},
'entityType': entityType, 'messageEntity': None, 'doIt': doIt, 'quick': True, 'entityType': entityType, 'messageEntity': None, 'doIt': doIt, 'quick': True,
'labelMatchPattern': None, 'senderMatchPattern': None, 'labelMatchPattern': None, 'senderMatchPattern': None,
'labelIds': [],
'maxToProcess': maxToProcess, 'maxItems': 0, 'maxMessagesPerThread': 0, 'maxToProcess': maxToProcess, 'maxItems': 0, 'maxMessagesPerThread': 0,
'maxToKeywords': [MESSAGES_MAX_TO_KEYWORDS[Act.Get()], 'maxtoprocess'], 'maxToKeywords': [MESSAGES_MAX_TO_KEYWORDS[Act.Get()], 'maxtoprocess'],
'listType': listType, 'fields': f'nextPageToken,{listType}(id)'} 'listType': listType, 'fields': f'nextPageToken,{listType}(id)'}
@@ -70165,6 +70169,8 @@ def _getMessageSelectParameters(myarg, parameters):
parameters['labelMatchPattern'] = getREPattern(re.IGNORECASE) parameters['labelMatchPattern'] = getREPattern(re.IGNORECASE)
elif myarg == 'sendermatchpattern': elif myarg == 'sendermatchpattern':
parameters['senderMatchPattern'] = getREPattern(re.IGNORECASE) parameters['senderMatchPattern'] = getREPattern(re.IGNORECASE)
elif myarg == 'labelids':
parameters['labelIds'].extend(getEntityList(Cmd.OB_LABEL_ID_LIST))
elif myarg == 'ids': elif myarg == 'ids':
parameters['messageEntity'] = getUserObjectEntity(Cmd.OB_MESSAGE_ID, parameters['entityType']) parameters['messageEntity'] = getUserObjectEntity(Cmd.OB_MESSAGE_ID, parameters['entityType'])
elif myarg == 'quick': elif myarg == 'quick':
@@ -70264,7 +70270,8 @@ def archiveMessages(users):
listResult = callGAPIpages(service, 'list', parameters['listType'], listResult = callGAPIpages(service, 'list', parameters['listType'],
pageMessage=getPageMessageForWhom(), maxItems=parameters['maxItems'], pageMessage=getPageMessageForWhom(), maxItems=parameters['maxItems'],
throwReasons=GAPI.GMAIL_THROW_REASONS+GAPI.GMAIL_LIST_THROW_REASONS, throwReasons=GAPI.GMAIL_THROW_REASONS+GAPI.GMAIL_LIST_THROW_REASONS,
userId='me', q=parameters['query'], fields=parameters['fields'], userId='me', q=parameters['query'], labelIds=parameters['labelIds'],
fields=parameters['fields'],
maxResults=GC.Values[GC.MESSAGE_MAX_RESULTS]) maxResults=GC.Values[GC.MESSAGE_MAX_RESULTS])
messageIds = [message['id'] for message in listResult] messageIds = [message['id'] for message in listResult]
except (GAPI.failedPrecondition, GAPI.permissionDenied, GAPI.invalid, GAPI.invalidArgument) as e: except (GAPI.failedPrecondition, GAPI.permissionDenied, GAPI.invalid, GAPI.invalidArgument) as e:
@@ -70453,7 +70460,8 @@ def _processMessagesThreads(users, entityType):
listResult = callGAPIpages(service, 'list', parameters['listType'], listResult = callGAPIpages(service, 'list', parameters['listType'],
pageMessage=getPageMessageForWhom(), maxItems=parameters['maxItems'], pageMessage=getPageMessageForWhom(), maxItems=parameters['maxItems'],
throwReasons=GAPI.GMAIL_THROW_REASONS+GAPI.GMAIL_LIST_THROW_REASONS, throwReasons=GAPI.GMAIL_THROW_REASONS+GAPI.GMAIL_LIST_THROW_REASONS,
userId='me', q=parameters['query'], fields=parameters['fields'], includeSpamTrash=includeSpamTrash, userId='me', q=parameters['query'], labelIds=parameters['labelIds'],
fields=parameters['fields'], includeSpamTrash=includeSpamTrash,
maxResults=GC.Values[GC.MESSAGE_MAX_RESULTS]) maxResults=GC.Values[GC.MESSAGE_MAX_RESULTS])
messageIds = [message['id'] for message in listResult] messageIds = [message['id'] for message in listResult]
else: else:
@@ -70569,7 +70577,8 @@ def exportMessagesThreads(users, entityType):
listResult = callGAPIpages(service, 'list', parameters['listType'], listResult = callGAPIpages(service, 'list', parameters['listType'],
pageMessage=getPageMessageForWhom(), maxItems=parameters['maxItems'], pageMessage=getPageMessageForWhom(), maxItems=parameters['maxItems'],
throwReasons=GAPI.GMAIL_THROW_REASONS+GAPI.GMAIL_LIST_THROW_REASONS, throwReasons=GAPI.GMAIL_THROW_REASONS+GAPI.GMAIL_LIST_THROW_REASONS,
userId='me', q=parameters['query'], fields=parameters['fields'], includeSpamTrash=includeSpamTrash, userId='me', q=parameters['query'], labelIds=parameters['labelIds'],
fields=parameters['fields'], includeSpamTrash=includeSpamTrash,
maxResults=GC.Values[GC.MESSAGE_MAX_RESULTS]) maxResults=GC.Values[GC.MESSAGE_MAX_RESULTS])
entityIds = [entity['id'] for entity in listResult] entityIds = [entity['id'] for entity in listResult]
except (GAPI.failedPrecondition, GAPI.permissionDenied, GAPI.invalid, GAPI.invalidArgument) as e: except (GAPI.failedPrecondition, GAPI.permissionDenied, GAPI.invalid, GAPI.invalidArgument) as e:
@@ -70704,7 +70713,8 @@ def forwardMessagesThreads(users, entityType):
listResult = callGAPIpages(service, 'list', parameters['listType'], listResult = callGAPIpages(service, 'list', parameters['listType'],
pageMessage=getPageMessageForWhom(), maxItems=parameters['maxItems'], pageMessage=getPageMessageForWhom(), maxItems=parameters['maxItems'],
throwReasons=GAPI.GMAIL_THROW_REASONS+GAPI.GMAIL_LIST_THROW_REASONS, throwReasons=GAPI.GMAIL_THROW_REASONS+GAPI.GMAIL_LIST_THROW_REASONS,
userId='me', q=parameters['query'], fields=parameters['fields'], includeSpamTrash=includeSpamTrash, userId='me', q=parameters['query'], labelIds=parameters['labelIds'],
fields=parameters['fields'], includeSpamTrash=includeSpamTrash,
maxResults=GC.Values[GC.MESSAGE_MAX_RESULTS]) maxResults=GC.Values[GC.MESSAGE_MAX_RESULTS])
entityIds = [entity['id'] for entity in listResult] entityIds = [entity['id'] for entity in listResult]
except (GAPI.failedPrecondition, GAPI.permissionDenied, GAPI.invalid, GAPI.invalidArgument) as e: except (GAPI.failedPrecondition, GAPI.permissionDenied, GAPI.invalid, GAPI.invalidArgument) as e:
@@ -71809,7 +71819,8 @@ def printShowMessagesThreads(users, entityType):
listResult = callGAPIpages(service, 'list', parameters['listType'], listResult = callGAPIpages(service, 'list', parameters['listType'],
pageMessage=getPageMessageForWhom(), maxItems=parameters['maxItems'], pageMessage=getPageMessageForWhom(), maxItems=parameters['maxItems'],
throwReasons=GAPI.GMAIL_THROW_REASONS+GAPI.GMAIL_LIST_THROW_REASONS, throwReasons=GAPI.GMAIL_THROW_REASONS+GAPI.GMAIL_LIST_THROW_REASONS,
userId='me', q=parameters['query'], fields=parameters['fields'], includeSpamTrash=includeSpamTrash, userId='me', q=parameters['query'], labelIds=parameters['labelIds'],
fields=parameters['fields'], includeSpamTrash=includeSpamTrash,
maxResults=GC.Values[GC.MESSAGE_MAX_RESULTS]) maxResults=GC.Values[GC.MESSAGE_MAX_RESULTS])
messageIds = [message['id'] for message in listResult] messageIds = [message['id'] for message in listResult]
else: else:
@@ -72607,14 +72618,19 @@ def updateFormRequestUpdateMasks(ubody):
break break
def _initPublishSettings(): def _initPublishSettings():
return {'publishSettings': {'publishState': {'isPublished': False, 'isAcceptingResponses': False}}, return {'publishSettings': {'publishState': {}}, 'updateMask': ''}
'updateMask': ''}
def _getPublishSettings(myarg, pbody): def _getPublishSettings(myarg, pbody):
if myarg == 'ispublished': if myarg == 'ispublished':
pbody['publishSettings']['publishState']['isPublished'] = getBoolean() bval = getBoolean()
pbody['publishSettings']['publishState']['isPublished'] = bval
if not bval:
pbody['publishSettings']['publishState']['isAcceptingResponses'] = bval
elif myarg == 'isacceptingresponses': elif myarg == 'isacceptingresponses':
pbody['publishSettings']['publishState']['isAcceptingResponses'] = getBoolean() bval = getBoolean()
pbody['publishSettings']['publishState']['isAcceptingResponses'] = bval
if bval:
pbody['publishSettings']['publishState']['isPublished'] = bval
else: else:
return False return False
pbody['updateMask'] = 'publishState' pbody['updateMask'] = 'publishState'
@@ -72808,6 +72824,9 @@ def printShowForms(users):
result = callGAPI(gform.forms(), 'get', result = callGAPI(gform.forms(), 'get',
throwReasons=[GAPI.NOT_FOUND, GAPI.PERMISSION_DENIED], throwReasons=[GAPI.NOT_FOUND, GAPI.PERMISSION_DENIED],
formId=formId) formId=formId)
if 'publishSettings' in result and 'publishState' in result['publishSettings']:
result['publishSettings']['publishState'].setdefault('isPublished', False)
result['publishSettings']['publishState'].setdefault('isAcceptingResponses', False)
if not csvPF: if not csvPF:
if not FJQC.formatJSON: if not FJQC.formatJSON:
printEntity([Ent.FORM, result['formId']], j, jcount) printEntity([Ent.FORM, result['formId']], j, jcount)

View File

@@ -10,6 +10,25 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation
### 7.10.03
Fixed bug in commands that modify messages where the `labelids <LabelIdList>` option
was not being applied.
### 7.10.02
Added option `labelids <LabelIdList>` to all commands that process messages;
this option causes GAM to only return messages with labels that match all of the specified label IDs.
Updated `gam <UserTypeEntity> print|show forms` to always display `isPublished` and
`isAcceptingResponses` in `publishSettings/publishState` regardless of their value;
the API doesn't return these values when they are False.
### 7.10.01
Added options `ispublished [<Boolean>]` and `isacceptingresponses [<Boolean>]` to
`gam <UserTypeEntity> create|update form`.
### 7.10.00 ### 7.10.00
Added commands to manage/display Chat Custom Emojis. Added commands to manage/display Chat Custom Emojis.

View File

@@ -251,7 +251,7 @@ writes the credentials into the file oauth2.txt.
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
admin@server:/Users/admin$ gam version admin@server:/Users/admin$ gam version
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
GAM 7.10.00 - https://github.com/GAM-team/GAM - pyinstaller GAM 7.10.03 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com> GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final Python 3.13.5 64-bit final
MacOS Sequoia 15.5 x86_64 MacOS Sequoia 15.5 x86_64
@@ -989,7 +989,7 @@ writes the credentials into the file oauth2.txt.
C:\>del C:\GAMConfig\oauth2.txt C:\>del C:\GAMConfig\oauth2.txt
C:\>gam version C:\>gam version
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
GAM 7.10.00 - https://github.com/GAM-team/GAM - pythonsource GAM 7.10.03 - https://github.com/GAM-team/GAM - pythonsource
GAM Team <google-apps-manager@googlegroups.com> GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final Python 3.13.5 64-bit final
Windows-10-10.0.17134 AMD64 Windows-10-10.0.17134 AMD64

View File

@@ -44,13 +44,14 @@ config csv_output_row_filter "'\"accounts:used_quota_in_mb\":count>15000'"
calendar|calendars| calendar|calendars|
chat| chat|
chrome| chrome|
classroom|
contextawareaccess| contextawareaccess|
currents|gplus|google+| currents|gplus|google+|
datastudio| datastudio|
devices|mobile| devices|mobile|
domain| domain|
drive|doc|docs| drive|doc|docs|
gcp| gcp|cloud|
gemini|geminiforworkspace| gemini|geminiforworkspace|
groups|group| groups|group|
groupsenterprise|enterprisegroups| groupsenterprise|enterprisegroups|

View File

@@ -49,10 +49,19 @@ gam user user@domain.com update serviceaccount
``` ```
gam <UserTypeEntity> create form gam <UserTypeEntity> create form
title <String> [description <String>] [isquiz [Boolean>]] [<JSONData>] title <String> [description <String>] [isquiz [Boolean>]] [<JSONData>]
[ispublished [<Boolean>] isacceptingresponses [<Boolean>]]
[drivefilename <DriveFileName>] [<DriveFileParentAttribute>] [drivefilename <DriveFileName>] [<DriveFileParentAttribute>]
[(csv [todrive <ToDriveAttribute>*]) | returnidonly] [(csv [todrive <ToDriveAttribute>*]) | returnidonly]
``` ```
The valid combinations of `ispublished` and `isacceptingresponses` are:
* `ispublished true isacceptingresponses true`
* `ispublished true isacceptingresponses false`
* `ispublished false isacceptingresponses false`
* `ispublished false` - Sets `isacceptingresponses false`
* `isacceptingresponses false` - Sets `ispublished false`
* `isacceptingresponses true` - Sets `ispublished true`
`<JSONData>` is a list of form update requests. `<JSONData>` is a list of form update requests.
* See: https://developers.google.com/forms/api/reference/rest/v1/forms/batchUpdate * See: https://developers.google.com/forms/api/reference/rest/v1/forms/batchUpdate
@@ -79,15 +88,24 @@ Select forms with `<DriveFileEntity>`:
``` ```
gam <UserTypeEntity> update form <DriveFileEntity> gam <UserTypeEntity> update form <DriveFileEntity>
[title <String>] [description <String>] [isquiz [Boolean>]] [<JSONData>] [title <String>] [description <String>] [isquiz [Boolean>]] [<JSONData>]
[ispublished [<Boolean>] isacceptingresponses [<Boolean>]]
``` ```
The valid combinations of `ispublished` and `isacceptingresponses` are:
* `ispublished true isacceptingresponses true`
* `ispublished true isacceptingresponses false`
* `ispublished false isacceptingresponses false`
* `ispublished false` - Sets `isacceptingresponses false`
* `isacceptingresponses false` - Sets `ispublished false`
* `isacceptingresponses true` - Sets `ispublished true`
`<JSONData>` is a list of form update requests. `<JSONData>` is a list of form update requests.
* See: https://developers.google.com/forms/api/reference/rest/v1/forms/batchUpdate * See: https://developers.google.com/forms/api/reference/rest/v1/forms/batchUpdate
## Extended Example ## Extended Example
This example illustrates the use of JSN data to create and update forms This example illustrates the use of JSON data to create and update forms
concerning student classtoom attendance. concerning student classtoom attendance.
The form has two items: Absences and Notes. The form has two items: Absences and Notes.
In `Absences`, the teacher can check `All present.` or check individual student absences. In `Absences`, the teacher can check `All present.` or check individual student absences.

View File

@@ -72,6 +72,8 @@ This table and other suggestions came from:
<EmailAddress> ::= <String>@<DomainName> <EmailAddress> ::= <String>@<DomainName>
<UniqueID> ::= id:<String> <UniqueID> ::= id:<String>
<GroupItem> ::= <EmailAddress>|<UniqueID>|<String> <GroupItem> ::= <EmailAddress>|<UniqueID>|<String>
<LabelID> ::= <String>
<LabelIDList> ::= "<LabelID>(,<LabelID)*"
<LabelName> ::= <String> <LabelName> ::= <String>
<QueryGmail> ::= <String> See: https://support.google.com/mail/answer/7190 <QueryGmail> ::= <String> See: https://support.google.com/mail/answer/7190
<Time> ::= <Time> ::=
@@ -389,6 +391,7 @@ Your command line will have: `embedimage file1.jpg image1` embedimage file2.jpg
``` ```
gam <UserTypeEntity> archive messages <GroupItem> gam <UserTypeEntity> archive messages <GroupItem>
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_archive <Number>])|(ids <MessageIDEntity>) [quick|notquick] [doit] [max_to_archive <Number>])|(ids <MessageIDEntity>)
[csv [todrive <ToDriveAttribute>*]] [csv [todrive <ToDriveAttribute>*]]
``` ```
@@ -400,6 +403,7 @@ Messages are archived to the group specified by `<GroupItem>`.
### Archive a selected set of messages ### Archive a selected set of messages
* `((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+` - Criteria to select messages * `((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+` - Criteria to select messages
* `labelids <LabelIDList>` - Select messages with labels that match all of the specified label IDs.
* `max_to_archive` - Limit the number of messages that will be archived; use a value of 0 for no limit * `max_to_archive` - Limit the number of messages that will be archived; use a value of 0 for no limit
* `doit` - No messages are archived unless you specify `doit`. By not specifying `doit`, you can preview the messages selected to verify that the results match your expectations. * `doit` - No messages are archived unless you specify `doit`. By not specifying `doit`, you can preview the messages selected to verify that the results match your expectations.
@@ -432,10 +436,14 @@ See below for message selection.
Export messages in EML format. Export messages in EML format.
``` ```
gam <UserTypeEntity> export message|messages gam <UserTypeEntity> export message|messages
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ [quick|notquick] [max_to_export <Number>])|(ids <MessageIDEntity>) (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [max_to_export <Number>])|(ids <MessageIDEntity>)
[targetfolder <FilePath>] [targetname <FileName>] [overwrite [<Boolean>]] [targetfolder <FilePath>] [targetname <FileName>] [overwrite [<Boolean>]]
gam <UserTypeEntity> export thread|threads gam <UserTypeEntity> export thread|threads
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ [quick|notquick] [max_to_export <Number>])|(ids <ThreadIDEntity>) (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [max_to_export <Number>])|(ids <MessageIDEntity>)
[targetfolder <FilePath>] [targetname <FileName>] [overwrite [<Boolean>]] [targetfolder <FilePath>] [targetname <FileName>] [overwrite [<Boolean>]]
``` ```
@@ -459,10 +467,12 @@ See below for message selection.
``` ```
gam <UserTypeEntity> forward message|messages recipient|to <RecipientEntity> gam <UserTypeEntity> forward message|messages recipient|to <RecipientEntity>
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_forward <Number>])|(ids <MessageIDEntity>) [quick|notquick] [doit] [max_to_forward <Number>])|(ids <MessageIDEntity>)
[subject <String>] [addorigfieldstosubject] [subject <String>] [addorigfieldstosubject]
gam <UserTypeEntity> forward thread|threads recipient|to <RecipientEntity> gam <UserTypeEntity> forward thread|threads recipient|to <RecipientEntity>
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_forward <Number>])|(ids <ThreadIDEntity>) [quick|notquick] [doit] [max_to_forward <Number>])|(ids <ThreadIDEntity>)
[subject <String>] [addorigfieldstosubject] [subject <String>] [addorigfieldstosubject]
``` ```
@@ -482,23 +492,28 @@ See below for message selection.
``` ```
gam <UserTypeEntity> delete messages|threads gam <UserTypeEntity> delete messages|threads
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_delete <Number>])|(ids <MessageIDEntity>) [quick|notquick] [doit] [max_to_delete <Number>])|(ids <MessageIDEntity>)
[csv [todrive <ToDriveAttribute>*]] [csv [todrive <ToDriveAttribute>*]]
gam <UserTypeEntity> modify messages|threads gam <UserTypeEntity> modify messages|threads
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_modify <Number>])|(ids <MessageIDEntity>) [quick|notquick] [doit] [max_to_modify <Number>])|(ids <MessageIDEntity>)
((addlabel <LabelName>)|(removelabel <LabelName>))+ ((addlabel <LabelName>)|(removelabel <LabelName>))+
[csv [todrive <ToDriveAttribute>*]] [csv [todrive <ToDriveAttribute>*]]
gam <UserTypeEntity> spam messages|threads gam <UserTypeEntity> spam messages|threads
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_spam <Number>])|(ids <MessageIDEntity>) [quick|notquick] [doit] [max_to_spam <Number>])|(ids <MessageIDEntity>)
[csv [todrive <ToDriveAttribute>*]] [csv [todrive <ToDriveAttribute>*]]
gam <UserTypeEntity> trash messages|threads gam <UserTypeEntity> trash messages|threads
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_trash <Number>])|(ids <MessageIDEntity>) [quick|notquick] [doit] [max_to_trash <Number>])|(ids <MessageIDEntity>)
[csv [todrive <ToDriveAttribute>*]] [csv [todrive <ToDriveAttribute>*]]
gam <UserTypeEntity> untrash messages|threads gam <UserTypeEntity> untrash messages|threads
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
[labelids <LabelIDList>]
[quick|notquick] [doit] [max_to_untrash <Number>])|(ids <MessageIDEntity>) [quick|notquick] [doit] [max_to_untrash <Number>])|(ids <MessageIDEntity>)
[csv [todrive <ToDriveAttribute>*]] [csv [todrive <ToDriveAttribute>*]]
``` ```
@@ -522,6 +537,7 @@ user@domain.com,18e9fc58c5491f4c,Deleted,
### Manage a selected set of messages ### Manage a selected set of messages
* `((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+` - Criteria to select messages * `((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+` - Criteria to select messages
* `labelids <LabelIDList>` - Select messages with labels that match all of the specified label IDs.
* `max_to_xxx` - Limit the number of messages that will be processed; use a value of 0 for no limit * `max_to_xxx` - Limit the number of messages that will be processed; use a value of 0 for no limit
* `doit` - No messages are processed unless you specify `doit`. By not specifying `doit`, you can preview the messages selected to verify that the results match your expectations. * `doit` - No messages are processed unless you specify `doit`. By not specifying `doit`, you can preview the messages selected to verify that the results match your expectations.
@@ -570,6 +586,7 @@ gam config auto_batch_min 1 groups_inde EastOffice delete message query "rfc822m
``` ```
gam <UserTypeEntity> show messages|threads gam <UserTypeEntity> show messages|threads
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])* (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])*
[labelids <LabelIDList>]
[quick|notquick] [max_to_show <Number>] [includespamtrash])|(ids <MessageIDEntity>) [quick|notquick] [max_to_show <Number>] [includespamtrash])|(ids <MessageIDEntity>)
[labelmatchpattern <REMatchPattern>] [sendermatchpattern <REMatchPattern>] [labelmatchpattern <REMatchPattern>] [sendermatchpattern <REMatchPattern>]
[countsonly|positivecountsonly] [useronly] [countsonly|positivecountsonly] [useronly]
@@ -581,6 +598,7 @@ gam <UserTypeEntity> show messages|threads
[targetfolder <FilePath>] [overwrite [<Boolean>]] [targetfolder <FilePath>] [overwrite [<Boolean>]]
gam <UserTypeEntity> print messages|threads [todrive <ToDriveAttribute>*] gam <UserTypeEntity> print messages|threads [todrive <ToDriveAttribute>*]
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])* (((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])*
[labelids <LabelIDList>]
[quick|notquick] [max_to_print <Number>] [includespamtrash])|(ids <MessageIDEntity>) [quick|notquick] [max_to_print <Number>] [includespamtrash])|(ids <MessageIDEntity>)
[labelmatchpattern <REMatchPattern>] [sendermatchpattern <REMatchPattern>] [labelmatchpattern <REMatchPattern>] [sendermatchpattern <REMatchPattern>]
[countsonly|positivecountsonly] [useronly] [countsonly|positivecountsonly] [useronly]
@@ -607,6 +625,7 @@ gam user user@domain.com print|show threads maxmessagesperthread 1
## Display a selected set of messages ## Display a selected set of messages
* `((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+` - Criteria to select messages * `((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+` - Criteria to select messages
* `labelids <LabelIDList>` - Select messages with labels that match all of the specified label IDs.
* `max_to_xxx` - Limit the number of messages that will be displayed * `max_to_xxx` - Limit the number of messages that will be displayed
* `includespamtrash` - Include messages in the Spam and Trash folders * `includespamtrash` - Include messages in the Spam and Trash folders
* `labelmatchpattern <REMatchPattern>` - Only display messages with some label that matches `<REMatchPattern>` * `labelmatchpattern <REMatchPattern>` - Only display messages with some label that matches `<REMatchPattern>`

View File

@@ -108,7 +108,7 @@ Paul shall send emails from the marketing email address with the name Paul from
``` gam user paul add sendas marketing@example.com "Paul from Example" replyto paul``` ``` gam user paul add sendas marketing@example.com "Paul from Example" replyto paul```
## Display sendas ## Display sendas
### Display the information as an indented list of keys and values. ### Display the sendas information as an indented list of keys and values.
``` ```
gam <UserTypeEntity> info sendas <EmailAddressEntity> [compact|format|html] gam <UserTypeEntity> info sendas <EmailAddressEntity> [compact|format|html]
gam <UserTypeEntity> show sendas [compact|format|html] gam <UserTypeEntity> show sendas [compact|format|html]
@@ -126,7 +126,19 @@ By default, all sendas addresses are shown, use these options to limit the displ
Use the `verifyonly` option to display `True` or `False` in the signature field based on whether the signature is non-blank. Use the `verifyonly` option to display `True` or `False` in the signature field based on whether the signature is non-blank.
### Display the information in CSV form. To capture a signature for use as input to GAM, do the following.
```
gam redirect stdout ./signature.html user user@domain.com show sendas compact
```
Edit signature.html and remove the following data leaving just the HTML.
```
SendAs Address: <user@domain.com>
IsPrimary: True
Default: True
Signature:
```
### Display the sendas information in CSV form.
``` ```
gam <UserTypeEntity> print sendas [compact] gam <UserTypeEntity> print sendas [compact]
[primary|default] [verifyonly] [todrive <ToDriveAttribute>*] [primary|default] [verifyonly] [todrive <ToDriveAttribute>*]
@@ -170,7 +182,7 @@ email address signature rather than the alias signature to be set.
If you have a current default signature, the API will update that, but if you delete it, it seems that the API will not over-write any of the other signatures, but instead add a new signature called `My signature`. If you rename that signature, the API will keep on updating that same signature, and not touch the other signatures. If you have a current default signature, the API will update that, but if you delete it, it seems that the API will not over-write any of the other signatures, but instead add a new signature called `My signature`. If you rename that signature, the API will keep on updating that same signature, and not touch the other signatures.
## Display signature ## Display signature
### Display the information as an indented list of keys and values. ### Display the signature as an indented list of keys and values.
``` ```
gam <UserTypeEntity> show signature|sig [compact|format|html] gam <UserTypeEntity> show signature|sig [compact|format|html]
[primary|default] [verifyonly] [primary|default] [verifyonly]
@@ -187,7 +199,19 @@ By default, the signature for `<UserTypeEntity>` is displayed, use these options
Use the `verifyonly` option to display `True` or `False` in the signature field based on whether the signature is non-blank. Use the `verifyonly` option to display `True` or `False` in the signature field based on whether the signature is non-blank.
### Display the information in CSV form. To capture a signature for use as input to GAM, do the following.
```
gam redirect stdout ./signature.html user user@domain.com show signature compact
```
Edit signature.html and remove the following data leaving just the HTML.
```
SendAs Address: <user@domain.com>
IsPrimary: True
Default: True
Signature:
```
### Display the signature in CSV form.
``` ```
gam <UserTypeEntity> print signature [compact] gam <UserTypeEntity> print signature [compact]
[primary|default] [verifyonly] [todrive <ToDriveAttribute>*] [primary|default] [verifyonly] [todrive <ToDriveAttribute>*]

View File

@@ -3,7 +3,7 @@
Print the current version of Gam with details Print the current version of Gam with details
``` ```
gam version gam version
GAM 7.10.00 - https://github.com/GAM-team/GAM - pyinstaller GAM 7.10.03 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com> GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final Python 3.13.5 64-bit final
MacOS Sequoia 15.5 x86_64 MacOS Sequoia 15.5 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 Print the current version of Gam with details and time offset information
``` ```
gam version timeoffset gam version timeoffset
GAM 7.10.00 - https://github.com/GAM-team/GAM - pyinstaller GAM 7.10.03 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com> GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final Python 3.13.5 64-bit final
MacOS Sequoia 15.5 x86_64 MacOS Sequoia 15.5 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 Print the current version of Gam with extended details and SSL information
``` ```
gam version extended gam version extended
GAM 7.10.00 - https://github.com/GAM-team/GAM - pyinstaller GAM 7.10.03 - https://github.com/GAM-team/GAM - pyinstaller
GAM Team <google-apps-manager@googlegroups.com> GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final Python 3.13.5 64-bit final
MacOS Sequoia 15.5 x86_64 MacOS Sequoia 15.5 x86_64
@@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64
Path: /Users/Admin/bin/gam7 Path: /Users/Admin/bin/gam7
Version Check: Version Check:
Current: 5.35.08 Current: 5.35.08
Latest: 7.10.00 Latest: 7.10.03
echo $? echo $?
1 1
``` ```
@@ -72,7 +72,7 @@ echo $?
Print the current version number without details Print the current version number without details
``` ```
gam version simple gam version simple
7.10.00 7.10.03
``` ```
In Linux/MacOS you can do: In Linux/MacOS you can do:
``` ```
@@ -82,7 +82,7 @@ echo $VER
Print the current version of Gam and address of this Wiki Print the current version of Gam and address of this Wiki
``` ```
gam help gam help
GAM 7.10.00 - https://github.com/GAM-team/GAM GAM 7.10.03 - https://github.com/GAM-team/GAM
GAM Team <google-apps-manager@googlegroups.com> GAM Team <google-apps-manager@googlegroups.com>
Python 3.13.5 64-bit final Python 3.13.5 64-bit final
MacOS Sequoia 15.5 x86_64 MacOS Sequoia 15.5 x86_64