taers232c / GAMADV-XTD3

Command line tool to manage Google Workspace
691 stars 86 forks source link

Please add formatting options for Tag Replace values #356

Closed chromestrong closed 1 year ago

chromestrong commented 1 year ago

Please add formatting options to RT and RTL that will enable the value for the tag to be updated to one of the following:

[Propercase]: The First Letter Of Each Word Or Value Is Capitalized.

- example: {RT}{PC}{fullname}{/PC}{/RT} = John Smith

[Uppercase]: ALL LETTERS ARE CAPITALIZED

- example: {RT}{UC}{fullname}{/UC}{/RT} = JOHN SMITH

[Lowercase]: all letters are lowercase.

- example: {RT}{LC}{fullname}{/LC}{/RT} = john smith

[Default]: No formatting / No change.

- example: {RT}{fullname}{/RT} = no change

Thank you

chromestrong commented 1 year ago

Love it.

On Wed, Apr 26, 2023 at 3:28 PM Ross Scroggs @.***> wrote:

This might be easier for me to code: [Propercase]: The First Letter Of Each Word Or Value Is Capitalized.

  • example: {RTPC}{fullname}{/RT} = John Smith

[Uppercase]: ALL LETTERS ARE CAPITALIZED

  • example: {RTUC}{fullname}{/RT} = JOHN SMITH

[Lowercase]: all letters are lowercase.

  • example: {RTLC}{fullname}{/RT} = john smith

[Default]: No formatting / No change.

  • example: {RT}{fullname}{/RT} = no change

— Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1523934858, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMIEBER4AEJDEMV6IMZTITXDFZPFANCNFSM6AAAAAAXMQVTM4 . You are receiving this because you authored the thread.Message ID: @.***>

taers232c commented 1 year ago

My current thought: [Propercase]: The First Letter Of Each Word Or Value Is Capitalized.

[Uppercase]: ALL LETTERS ARE CAPITALIZED

[Lowercase]: all letters are lowercase.

[Default]: No formatting / No change.

Thank you

chromestrong commented 1 year ago

Love it less

~Sent from my Android Device

On Wed, Apr 26, 2023, 19:06 Ross Scroggs @.***> wrote:

My current thought: [Propercase]: The First Letter Of Each Word Or Value Is Capitalized.

  • example: {RT}{pc:fullname}{/RT} = John Smith

[Uppercase]: ALL LETTERS ARE CAPITALIZED

  • example: {RT}{uc:fullname}{/RT} = JOHN SMITH

[Lowercase]: all letters are lowercase.

  • example: {RT}{lc:fullname}{/LC}{/RT} = john smith

[Default]: No formatting / No change.

  • example: {RT}{fullname}{/RT} = no change

Thank you

— Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1524149155, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMIEBAQY3ON3B2YO2GIKCDXDGS55ANCNFSM6AAAAAAXMQVTM4 . You are receiving this because you authored the thread.Message ID: @.***>

taers232c commented 1 year ago

$ gam sendemail to ross.scroggs message "PC:{pc:data} UC:{uc:data} LC:{lc:data} {data}" replace data "abc"

User: @.***, Send Email to 1 Recipient

Recipient: @.***, Message:, Email Sent: 187bff59ced38f7f

@.*** 4:44 PM (2 minutes ago) to me

PC:Abc UC:ABC LC:abc abc

On Wed, Apr 26, 2023 at 4:37 PM Eric @.***> wrote:

Love it less

~Sent from my Android Device

On Wed, Apr 26, 2023, 19:06 Ross Scroggs @.***> wrote:

My current thought: [Propercase]: The First Letter Of Each Word Or Value Is Capitalized.

  • example: {RT}{pc:fullname}{/RT} = John Smith

[Uppercase]: ALL LETTERS ARE CAPITALIZED

  • example: {RT}{uc:fullname}{/RT} = JOHN SMITH

[Lowercase]: all letters are lowercase.

  • example: {RT}{lc:fullname}{/LC}{/RT} = john smith

[Default]: No formatting / No change.

  • example: {RT}{fullname}{/RT} = no change

Thank you

— Reply to this email directly, view it on GitHub < https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1524149155 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AMMIEBAQY3ON3B2YO2GIKCDXDGS55ANCNFSM6AAAAAAXMQVTM4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1524202134, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCTYL3B4DUZNFECKGIDSW3XDGWVHANCNFSM6AAAAAAXMQVTM4 . You are receiving this because you commented.Message ID: @.***>

-- Ross Scroggs @.***

taers232c commented 1 year ago

Give me an example of a use case?

taers232c commented 1 year ago

Ahhh, multiple words, back to coding.

chromestrong commented 1 year ago

ADP and Lattice sets countries , and other random fields in all caps, which doesn't look great in signatures etc.

The values from ADP/Lattice would be "UNITED STATES" or something like that for a variable like {country}.

The formatting would update them to "United States" or "united states" etc.

~Sent from my Android Device

On Wed, Apr 26, 2023, 20:15 Ross Scroggs @.***> wrote:

Ahhh, multiple words, back to coding.

— Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1524266076, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMIEBGXVZAFLYUL5KVTJE3XDG3DJANCNFSM6AAAAAAXMQVTM4 . You are receiving this because you authored the thread.Message ID: @.***>

taers232c commented 1 year ago

I think I have it: [Propercase]: The First Letter Of Each Word Or Value Is Capitalized.

[Uppercase]: ALL LETTERS ARE CAPITALIZED

[Lowercase]: all letters are lowercase.

Ross

chromestrong commented 1 year ago

And would RT/RTL remain for default/unchanged?

taers232c commented 1 year ago

Yes, {PC}{/PC) is handled separately from {RT}{/RT}

Ross

Ross Scroggs @.***

On Apr 27, 2023, at 6:15 AM, Eric @.***> wrote:

And would RT/RTL remain for default/unchanged?

— Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1525678787, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCTYL3P3LJXUOHXV4URGVLXDJWQNANCNFSM6AAAAAAXMQVTM4. You are receiving this because you commented.

taers232c commented 1 year ago

Eric,

6.58.00 has the changes, currently undocumented, test and report.

Ross

On Thu, Apr 27, 2023 at 7:13 AM Ross Scroggs @.***> wrote:

Yes, {PC}{/PC) is handled separately from {RT}{/RT}

Ross

Ross Scroggs @.***

On Apr 27, 2023, at 6:15 AM, Eric @.***> wrote:

And would RT/RTL remain for default/unchanged?

— Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1525678787, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCTYL3P3LJXUOHXV4URGVLXDJWQNANCNFSM6AAAAAAXMQVTM4 . You are receiving this because you commented.Message ID: @.***>

-- Ross Scroggs @.***

chromestrong commented 1 year ago

Just to confirm the tags are:

Is RTL still a flag? Do PCL, UCL, and LCL exist?

~ Sent from my Google Chromebook.

On Thu, Apr 27, 2023 at 1:07 PM Ross Scroggs @.***> wrote:

Eric,

6.58.00 has the changes, currently undocumented, test and report.

Ross

On Thu, Apr 27, 2023 at 7:13 AM Ross Scroggs @.***> wrote:

Yes, {PC}{/PC) is handled separately from {RT}{/RT}

Ross

Ross Scroggs @.***

On Apr 27, 2023, at 6:15 AM, Eric @.***> wrote:

And would RT/RTL remain for default/unchanged?

— Reply to this email directly, view it on GitHub < https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1525678787 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACCTYL3P3LJXUOHXV4URGVLXDJWQNANCNFSM6AAAAAAXMQVTM4

. You are receiving this because you commented.Message ID: @.***>

-- Ross Scroggs @.***

— Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1526046317, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMIEBATZE6AGHGGLIIMSITXDKRUHANCNFSM6AAAAAAXMQVTM4 . You are receiving this because you authored the thread.Message ID: @.***>

taers232c commented 1 year ago

These have been added:

Nothing about {RT} and {RTL} has changed.

PCL/UCL/LCL do not exist, I don't see any reason for them

On Thu, Apr 27, 2023 at 10:12 AM Eric @.***> wrote:

Just to confirm the tags are:

  • {PC}{/PC} = Data Value is formatted to Propercase
  • {UC}{/UC} = Data Value is formatted to Uppercase
  • {LC}{/LC} = Data Value is formatted to Lowercase
  • {RT}{/RT} = Data Value is NOT formatted, value is not changed.

Is RTL still a flag? Do PCL, UCL, and LCL exist?

~ Sent from my Google Chromebook.

On Thu, Apr 27, 2023 at 1:07 PM Ross Scroggs @.***> wrote:

Eric,

6.58.00 has the changes, currently undocumented, test and report.

Ross

On Thu, Apr 27, 2023 at 7:13 AM Ross Scroggs @.***> wrote:

Yes, {PC}{/PC) is handled separately from {RT}{/RT}

Ross

Ross Scroggs @.***

On Apr 27, 2023, at 6:15 AM, Eric @.***> wrote:

And would RT/RTL remain for default/unchanged?

— Reply to this email directly, view it on GitHub <

https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1525678787

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ACCTYL3P3LJXUOHXV4URGVLXDJWQNANCNFSM6AAAAAAXMQVTM4

. You are receiving this because you commented.Message ID: @.***>

-- Ross Scroggs @.***

— Reply to this email directly, view it on GitHub < https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1526046317 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AMMIEBATZE6AGHGGLIIMSITXDKRUHANCNFSM6AAAAAAXMQVTM4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1526052273, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCTYL7SKKGT5F5BX5HVM5LXDKSG7ANCNFSM6AAAAAAXMQVTM4 . You are receiving this because you commented.Message ID: @.***>

-- Ross Scroggs @.***

chromestrong commented 1 year ago

Perfect. I am updating now and will test soon after.

~Sent from my Android Device

On Thu, Apr 27, 2023, 13:17 Ross Scroggs @.***> wrote:

These have been added:

  • {PC}{/PC} = Data Value is formatted to Propercase
  • {UC}{/UC} = Data Value is formatted to Uppercase
  • {LC}{/LC} = Data Value is formatted to Lowercase

Nothing about {RT} and {RTL} has changed.

PCL/UCL/LCL do not exist, I don't see any reason for them

On Thu, Apr 27, 2023 at 10:12 AM Eric @.***> wrote:

Just to confirm the tags are:

  • {PC}{/PC} = Data Value is formatted to Propercase
  • {UC}{/UC} = Data Value is formatted to Uppercase
  • {LC}{/LC} = Data Value is formatted to Lowercase
  • {RT}{/RT} = Data Value is NOT formatted, value is not changed.

Is RTL still a flag? Do PCL, UCL, and LCL exist?

~ Sent from my Google Chromebook.

On Thu, Apr 27, 2023 at 1:07 PM Ross Scroggs @.***> wrote:

Eric,

6.58.00 has the changes, currently undocumented, test and report.

Ross

On Thu, Apr 27, 2023 at 7:13 AM Ross Scroggs @.***> wrote:

Yes, {PC}{/PC) is handled separately from {RT}{/RT}

Ross

Ross Scroggs @.***

On Apr 27, 2023, at 6:15 AM, Eric @.***> wrote:

And would RT/RTL remain for default/unchanged?

— Reply to this email directly, view it on GitHub <

https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1525678787

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ACCTYL3P3LJXUOHXV4URGVLXDJWQNANCNFSM6AAAAAAXMQVTM4

. You are receiving this because you commented.Message ID: @.***>

-- Ross Scroggs @.***

— Reply to this email directly, view it on GitHub <

https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1526046317

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AMMIEBATZE6AGHGGLIIMSITXDKRUHANCNFSM6AAAAAAXMQVTM4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1526052273 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACCTYL7SKKGT5F5BX5HVM5LXDKSG7ANCNFSM6AAAAAAXMQVTM4

. You are receiving this because you commented.Message ID: @.***>

-- Ross Scroggs @.***

— Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1526057819, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMIEBHPZDQ5CTV5ACVDCZLXDKSYZANCNFSM6AAAAAAXMQVTM4 . You are receiving this because you authored the thread.Message ID: @.***>

chromestrong commented 1 year ago

Tested and it appears to work as intended :)

The only issue I found was when the tags were used like this:

{UC}<table cellpadding="0" cellspacing="0" border="0" width="100%" style="display:

table; margin-bottom: 0px; transition: all 300ms ease 0s;">

  {footer}

{/UC}

The   was capitalized as it should have been because of the tag placements, but it broke the signature slightly.

The solution was using a combination of tags like this:

{RT}

 
{UC}{footer}{/UC}
{/RT}

This will remove the table if it's empty and capitalize its values as intended.

On Thu, Apr 27, 2023 at 1:18 PM Eric Landrum @.***> wrote:

Perfect. I am updating now and will test soon after.

~Sent from my Android Device

On Thu, Apr 27, 2023, 13:17 Ross Scroggs @.***> wrote:

These have been added:

  • {PC}{/PC} = Data Value is formatted to Propercase
  • {UC}{/UC} = Data Value is formatted to Uppercase
  • {LC}{/LC} = Data Value is formatted to Lowercase

Nothing about {RT} and {RTL} has changed.

PCL/UCL/LCL do not exist, I don't see any reason for them

On Thu, Apr 27, 2023 at 10:12 AM Eric @.***> wrote:

Just to confirm the tags are:

  • {PC}{/PC} = Data Value is formatted to Propercase
  • {UC}{/UC} = Data Value is formatted to Uppercase
  • {LC}{/LC} = Data Value is formatted to Lowercase
  • {RT}{/RT} = Data Value is NOT formatted, value is not changed.

Is RTL still a flag? Do PCL, UCL, and LCL exist?

~ Sent from my Google Chromebook.

On Thu, Apr 27, 2023 at 1:07 PM Ross Scroggs @.***> wrote:

Eric,

6.58.00 has the changes, currently undocumented, test and report.

Ross

On Thu, Apr 27, 2023 at 7:13 AM Ross Scroggs @.***> wrote:

Yes, {PC}{/PC) is handled separately from {RT}{/RT}

Ross

Ross Scroggs @.***

On Apr 27, 2023, at 6:15 AM, Eric @.***> wrote:

And would RT/RTL remain for default/unchanged?

— Reply to this email directly, view it on GitHub <

https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1525678787

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ACCTYL3P3LJXUOHXV4URGVLXDJWQNANCNFSM6AAAAAAXMQVTM4

. You are receiving this because you commented.Message ID: @.***>

-- Ross Scroggs @.***

— Reply to this email directly, view it on GitHub <

https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1526046317

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AMMIEBATZE6AGHGGLIIMSITXDKRUHANCNFSM6AAAAAAXMQVTM4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1526052273 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACCTYL7SKKGT5F5BX5HVM5LXDKSG7ANCNFSM6AAAAAAXMQVTM4

. You are receiving this because you commented.Message ID: @.***>

-- Ross Scroggs @.***

— Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1526057819, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMIEBHPZDQ5CTV5ACVDCZLXDKSYZANCNFSM6AAAAAAXMQVTM4 . You are receiving this because you authored the thread.Message ID: @.***>

taers232c commented 1 year ago

Your second solution is the way to do this, using {xC}{/xC} too broadly will surely break things.

On Fri, Apr 28, 2023 at 10:02 AM Eric @.***> wrote:

Tested and it appears to work as intended :)

The only issue I found was when the tags were used like this:

{UC}<table cellpadding="0" cellspacing="0" border="0" width="100%" style="display:

table; margin-bottom: 0px; transition: all 300ms ease 0s;">

  {footer}

{/UC}

The   was capitalized as it should have been because of the tag placements, but it broke the signature slightly.

The solution was using a combination of tags like this:

{RT}<table cellpadding="0" cellspacing="0" border="0" width="100%" style="display: table; margin-bottom: 0px; transition: all 300ms ease 0s;">

  {UC}{footer}{/UC}

{/RT}

This will remove the table if it's empty and capitalize its values as intended.

On Thu, Apr 27, 2023 at 1:18 PM Eric Landrum @.***> wrote:

Perfect. I am updating now and will test soon after.

~Sent from my Android Device

On Thu, Apr 27, 2023, 13:17 Ross Scroggs @.***> wrote:

These have been added:

  • {PC}{/PC} = Data Value is formatted to Propercase
  • {UC}{/UC} = Data Value is formatted to Uppercase
  • {LC}{/LC} = Data Value is formatted to Lowercase

Nothing about {RT} and {RTL} has changed.

PCL/UCL/LCL do not exist, I don't see any reason for them

On Thu, Apr 27, 2023 at 10:12 AM Eric @.***> wrote:

Just to confirm the tags are:

  • {PC}{/PC} = Data Value is formatted to Propercase
  • {UC}{/UC} = Data Value is formatted to Uppercase
  • {LC}{/LC} = Data Value is formatted to Lowercase
  • {RT}{/RT} = Data Value is NOT formatted, value is not changed.

Is RTL still a flag? Do PCL, UCL, and LCL exist?

~ Sent from my Google Chromebook.

On Thu, Apr 27, 2023 at 1:07 PM Ross Scroggs @.***> wrote:

Eric,

6.58.00 has the changes, currently undocumented, test and report.

Ross

On Thu, Apr 27, 2023 at 7:13 AM Ross Scroggs @.***> wrote:

Yes, {PC}{/PC) is handled separately from {RT}{/RT}

Ross

Ross Scroggs @.***

On Apr 27, 2023, at 6:15 AM, Eric @.***> wrote:

And would RT/RTL remain for default/unchanged?

— Reply to this email directly, view it on GitHub <

https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1525678787

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ACCTYL3P3LJXUOHXV4URGVLXDJWQNANCNFSM6AAAAAAXMQVTM4

. You are receiving this because you commented.Message ID: @.***>

-- Ross Scroggs @.***

— Reply to this email directly, view it on GitHub <

https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1526046317

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AMMIEBATZE6AGHGGLIIMSITXDKRUHANCNFSM6AAAAAAXMQVTM4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1526052273

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ACCTYL7SKKGT5F5BX5HVM5LXDKSG7ANCNFSM6AAAAAAXMQVTM4

. You are receiving this because you commented.Message ID: @.***>

-- Ross Scroggs @.***

— Reply to this email directly, view it on GitHub < https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1526057819 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AMMIEBHPZDQ5CTV5ACVDCZLXDKSYZANCNFSM6AAAAAAXMQVTM4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/356#issuecomment-1527838619, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCTYL7VDPAHRXIK4F25VN3XDPZZHANCNFSM6AAAAAAXMQVTM4 . You are receiving this because you commented.Message ID: @.***>

-- Ross Scroggs @.***