mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-10 06:33:34 +00:00
Add format argument to gam show signature
This commit is contained in:
@ -724,7 +724,8 @@ gam <UserTypeEntity> show sendas
|
|||||||
gam <UserTypeEntity> shortcuts <Boolean>
|
gam <UserTypeEntity> shortcuts <Boolean>
|
||||||
|
|
||||||
gam <UserTypeEntity> signature|sig <String>|(file <FileName> [charset <Charset>]) (replace <REPattern> <String>)*
|
gam <UserTypeEntity> signature|sig <String>|(file <FileName> [charset <Charset>]) (replace <REPattern> <String>)*
|
||||||
gam <UserTypeEntity> show signature|sig
|
gam <UserTypeEntity> show signature|sig [format]
|
||||||
|
|
||||||
gam <UserTypeEntity> snippets <Boolean>
|
gam <UserTypeEntity> snippets <Boolean>
|
||||||
|
|
||||||
gam <UserTypeEntity> utf|utf8|utf-8|unicode <Boolean>
|
gam <UserTypeEntity> utf|utf8|utf-8|unicode <Boolean>
|
||||||
|
17
src/gam.py
17
src/gam.py
@ -5121,6 +5121,15 @@ def doSignature(users):
|
|||||||
|
|
||||||
def getSignature(users):
|
def getSignature(users):
|
||||||
emailsettings = getEmailSettingsObject()
|
emailsettings = getEmailSettingsObject()
|
||||||
|
formatSig = False
|
||||||
|
i = 5
|
||||||
|
while i < len(sys.argv):
|
||||||
|
if sys.argv[i].lower() == u'format':
|
||||||
|
formatSig = True
|
||||||
|
i += 1
|
||||||
|
else:
|
||||||
|
print u'ERROR: %s is not a valid argument for "gam <users> show signature"' % sys.argv[i]
|
||||||
|
sys.exit(2)
|
||||||
for user in users:
|
for user in users:
|
||||||
if user.find(u'@') > 0:
|
if user.find(u'@') > 0:
|
||||||
emailsettings.domain = user[user.find(u'@')+1:]
|
emailsettings.domain = user[user.find(u'@')+1:]
|
||||||
@ -5131,8 +5140,12 @@ def getSignature(users):
|
|||||||
signature = result.get(u'signature') if result else None
|
signature = result.get(u'signature') if result else None
|
||||||
if not signature:
|
if not signature:
|
||||||
signature = u'None'
|
signature = u'None'
|
||||||
sys.stdout.write(u"User %s signature:\n " % (user+u'@'+emailsettings.domain))
|
if formatSig:
|
||||||
print convertUTF8(u" %s" % signature)
|
sys.stdout.write(u"User %s signature:\n" % (user+u'@'+emailsettings.domain))
|
||||||
|
print dehtml(signature)
|
||||||
|
else:
|
||||||
|
sys.stdout.write(u"User %s signature:\n " % (user+u'@'+emailsettings.domain))
|
||||||
|
print convertUTF8(u" %s" % signature)
|
||||||
|
|
||||||
def doWebClips(users):
|
def doWebClips(users):
|
||||||
if sys.argv[4].lower() in true_values:
|
if sys.argv[4].lower() in true_values:
|
||||||
|
@ -7,9 +7,16 @@ Added arguments to gam info group to suppress aliases listing and include groups
|
|||||||
Added argument to gam print cros to limit number of activeTimeRanges and recentUsers entries
|
Added argument to gam print cros to limit number of activeTimeRanges and recentUsers entries
|
||||||
`gam print cros ... [listlimit <Number>]`
|
`gam print cros ... [listlimit <Number>]`
|
||||||
|
|
||||||
Added argument to gam signature/vacation to allow specification of file character set so that extended characters can be read.
|
Added argument to `gam <Users> signature` and `gam <Users> vacation` to allow specification of file character set so that extended characters can be read.
|
||||||
`gam <Users> signature file <FileName> [charset <CharSet>]`
|
Added argument to `gam <Users> signature` and `gam <Users> vacation` to allow pattern substitution in the signature and vacation message.
|
||||||
`gam <Users> vacation ... <FileName> [charset <CharSet>] ...`
|
`gam <Users> signature <String>|(file <FileName> [charset <Charset>]) (replace <REPattern> <String>)*`
|
||||||
|
`gam <Users> vacation <TrueValues> subject <String> (message <String>)|(file <FileName> [charset <CharSet>]) (replace <REPattern> <String>)*
|
||||||
|
[contactsonly] [domainonly] [startdate <Date>] [enddate <Date>]`
|
||||||
|
This is especially useful with CSV files.
|
||||||
|
`gam csv Users.csv gam user "~User" signature file SignatureTemplate.txt replace "#User#" "~User" replace "#Title#" "~Title"`
|
||||||
|
|
||||||
|
Added argument to `gam <Users> show signature` to format the signature.
|
||||||
|
`gam <Users> show signature [format]`
|
||||||
|
|
||||||
Added argument to gam add/update calendar to allow specification of event notifications
|
Added argument to gam add/update calendar to allow specification of event notifications
|
||||||
`gam <Users> add/update calendar <Calendar> notification email|sms eventcreation|eventchange|eventcancellation|eventresponce|agenda`
|
`gam <Users> add/update calendar <Calendar> notification email|sms eventcreation|eventchange|eventcancellation|eventresponce|agenda`
|
||||||
@ -59,13 +66,6 @@ Added argument to `gam update group` to allow removing members by role.
|
|||||||
`gam update group <Group> clear [members] [managers] [owners]`
|
`gam update group <Group> clear [members] [managers] [owners]`
|
||||||
If no option follows clear, all members will removed.
|
If no option follows clear, all members will removed.
|
||||||
|
|
||||||
Added argument to `gam <Users> signature` and `gam <Users> vacation` to allow pattern substitution in the signature and vacation message.
|
|
||||||
`gam <Users> signature <String>|(file <FileName> [charset <Charset>]) (replace <REPattern> <String>)*`
|
|
||||||
`gam <UserTypeEntity> vacation <TrueValues> subject <String> (message <String>)|(file <FileName> [charset <CharSet>]) (replace <REPattern> <String>)*
|
|
||||||
[contactsonly] [domainonly] [startdate <Date>] [enddate <Date>]`
|
|
||||||
This is especially useful with CSV files.
|
|
||||||
`gam csv Users.csv gam user "~User" signature file SignatureTemplate.txt replace "#User#" "~User" replace "#Title#" "~Title"`
|
|
||||||
|
|
||||||
Changed `gam print admins` to include 'id:' in OrgUnitID column as with other `gam print` commands.
|
Changed `gam print admins` to include 'id:' in OrgUnitID column as with other `gam print` commands.
|
||||||
|
|
||||||
Fixed GAM to handle both future date error messages in `gam report`
|
Fixed GAM to handle both future date error messages in `gam report`
|
||||||
|
Reference in New Issue
Block a user