diff --git a/src/GamCommands.txt b/src/GamCommands.txt index 00c9861a..e04be0b9 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -724,7 +724,8 @@ gam show sendas gam shortcuts gam signature|sig |(file [charset ]) (replace )* -gam show signature|sig +gam show signature|sig [format] + gam snippets gam utf|utf8|utf-8|unicode diff --git a/src/gam.py b/src/gam.py index 4e8593f7..736e8af8 100755 --- a/src/gam.py +++ b/src/gam.py @@ -5121,6 +5121,15 @@ def doSignature(users): def getSignature(users): 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 show signature"' % sys.argv[i] + sys.exit(2) for user in users: if user.find(u'@') > 0: emailsettings.domain = user[user.find(u'@')+1:] @@ -5131,8 +5140,12 @@ def getSignature(users): signature = result.get(u'signature') if result else None if not signature: signature = u'None' - sys.stdout.write(u"User %s signature:\n " % (user+u'@'+emailsettings.domain)) - print convertUTF8(u" %s" % signature) + if formatSig: + 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): if sys.argv[4].lower() in true_values: diff --git a/src/whatsnew.txt b/src/whatsnew.txt index 870d2c55..5ef47e39 100644 --- a/src/whatsnew.txt +++ b/src/whatsnew.txt @@ -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 `gam print cros ... [listlimit ]` -Added argument to gam signature/vacation to allow specification of file character set so that extended characters can be read. -`gam signature file [charset ]` -`gam vacation ... [charset ] ...` +Added argument to `gam signature` and `gam vacation` to allow specification of file character set so that extended characters can be read. +Added argument to `gam signature` and `gam vacation` to allow pattern substitution in the signature and vacation message. +`gam signature |(file [charset ]) (replace )*` +`gam vacation subject (message )|(file [charset ]) (replace )* + [contactsonly] [domainonly] [startdate ] [enddate ]` +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 show signature` to format the signature. +`gam show signature [format]` Added argument to gam add/update calendar to allow specification of event notifications `gam add/update 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 clear [members] [managers] [owners]` If no option follows clear, all members will removed. -Added argument to `gam signature` and `gam vacation` to allow pattern substitution in the signature and vacation message. -`gam signature |(file [charset ]) (replace )*` -`gam vacation subject (message )|(file [charset ]) (replace )* - [contactsonly] [domainonly] [startdate ] [enddate ]` -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. Fixed GAM to handle both future date error messages in `gam report`