Adds a style_text function #21

Manually merged
cmccabe merged 1 commits from style-function into master 2019-11-24 03:45:37 +00:00
Collaborator

I resisted the urge to apply the new function to the existing code. I'm trying to be better about clean pull requests that do what they say (and only what they say).

So, as the title says, this allows us to have an easy wrapper to terminal text effects. I made it variadic so you do not need to pass a list to it.

Usage:

bold_und_underlined = style_text("I am bolded and udnerlined", "bold", "underline")
print(bold_und_underline)

# or...

print(style_text("I am annoying", "blink"))

# or...

print("This is {} and this is {}".format(style_text("dim", "dim"), style_text("bold and inversed", "bold", "inverse")))
I resisted the urge to apply the new function to the existing code. I'm trying to be better about clean pull requests that do what they say (and only what they say). So, as the title says, this allows us to have an easy wrapper to terminal text effects. I made it variadic so you do _not_ need to pass a list to it. Usage: ```python bold_und_underlined = style_text("I am bolded and udnerlined", "bold", "underline") print(bold_und_underline) # or... print(style_text("I am annoying", "blink")) # or... print("This is {} and this is {}".format(style_text("dim", "dim"), style_text("bold and inversed", "bold", "inverse"))) ```
cmccabe closed this pull request 2019-11-24 03:45:37 +00:00
asdf deleted branch style-function 2020-01-10 08:40:31 +00:00
Sign in to join this conversation.
No description provided.