ANSI makes it easy!¶
lore.ansi makes formatting text output super simple! Lore doesn’t have
much of a UI. Text output should be excellent.
-
lore.ansi.BLACK= 30¶ If you gaze long into an abyss, the abyss will gaze back into you.
-
lore.ansi.BLINK= 6¶ For that patiently waiting cursor effect. Also doesn’t work, since sadists ruined it for everyone.
-
lore.ansi.BLUE= 34¶ Skies, oceans, infinite depths. The color of hope and melancholy.
-
lore.ansi.BOLD= 1¶ For people with a heavy hand.
-
lore.ansi.CONCEAL= 8¶ Why would you do this‽ Your attempt has been logged, and will be reported to the authorities.
-
lore.ansi.CYAN= 36¶ Only printers who prefer CMYK over RGB would name this color. It’s
BLUEstripped of soul, injected with 10,000 volts. A true Frankenstein’s monster.
-
lore.ansi.DEFAULT= 39¶ You get 3 guesses what this color is, and the first 2 don’t count.
-
lore.ansi.FAINT= 2¶ For people with a light touch.
-
lore.ansi.GREEN= 32¶ The most refreshingly natural color. Growth and softness.
-
lore.ansi.INVERSE= 7¶ Today is backwards day.
-
lore.ansi.MAGENTA= 35¶ For latin salsa dresses with matching shoes. Also, the radiant color of T brown dwarf stars as long as sodium and potassium atoms absorb the
GREENlight in the spectrum.
-
lore.ansi.RED= 31¶ Hot and loud. Like a fire engine, anger, or you’ve just bitten your cheek for the third time today.
-
lore.ansi.RESET= 0¶ Game over!
-
lore.ansi.STRIKE= 9¶ Adopt that sense of humility, let other people know you w̶e̶r̶e̶ ̶w̶r̶o̶n̶g learned from experience.
-
lore.ansi.STROBE= 5¶ For sadists looking to cause seizures. Doesn’t work except on masochist’s platforms.
-
lore.ansi.UNDERLINE= 4¶ It’s got a line under it, no need for a PhD here.
-
lore.ansi.WHITE= 37¶ The sum of all colors, to the point there is no color left at all. Floats nicely in the abyss.
-
lore.ansi.YELLOW= 33¶ Daisies and deadly poison dart frogs. Salted butter and lightning. Like scotch filtered through gold foil.
-
lore.ansi.background(color, content)[source]¶ Color the background of the content
Parameters: - color (int) – pick a constant, any constant
- content (unicode) – Whatever you want to say…
Returns: ansi string
Return type: unicode
-
lore.ansi.blink(content)[source]¶ Slowing blinking content
Parameters: content (unicode) – Whatever you want to say… Returns: ansi string Return type: unicode
-
lore.ansi.bold(content)[source]¶ Bold content
Parameters: content (unicode) – Whatever you want to say… Returns: ansi string Return type: unicode
-
lore.ansi.bright(color)[source]¶ Brighten a color
Parameters: color (int) – pick a constant, any constant Returns: brighter version of the color Return type: unicode
-
lore.ansi.conceal(content)[source]¶ Why do you persist in this nonsense?
Parameters: content (unicode) – Whatever you want to say… Returns: ansi string Return type: unicode
-
lore.ansi.critical(content=u'CRITICAL')[source]¶ for really big fuck ups, not to be used lightly.
Parameters: content (unicode) – Whatever you want to say… Returns: ansi string Return type: unicode
-
lore.ansi.debug(content=u'DEBUG')[source]¶ debug style
Parameters: content (unicode) – Whatever you want to say… Returns: ansi string Return type: unicode
-
lore.ansi.encode(code, readline=False)[source]¶ Adds escape and control characters for ANSI codes
Parameters: - code (int) – pick a constant, any constant
- readline – add readline compatibility, which causes bugs in other formats
Returns: ansi string
Return type: unicode
-
lore.ansi.error(content=u'ERROR')[source]¶ error style
Parameters: content (unicode) – Whatever you want to say… Returns: ansi string Return type: unicode
-
lore.ansi.faint(content)[source]¶ Faint content
Parameters: content (unicode) – Whatever you want to say… Returns: ansi string Return type: unicode
-
lore.ansi.foreground(color, content, readline=False)[source]¶ Color the text of the content
Parameters: - color (int) – pick a constant, any constant
- content (unicode) – Whatever you want to say…
Returns: ansi string
Return type: unicode
-
lore.ansi.gray(level, content)[source]¶ Grayscale
Parameters: - level (int) – [0-15] 0 is almost black, 15 is nearly white
- content (unicode) – Whatever you want to say…
Returns: ansi string
Return type: unicode
-
lore.ansi.info(content=u'INFO')[source]¶ info style
Parameters: content (unicode) – Whatever you want to say… Returns: ansi string Return type: unicode
-
lore.ansi.inverse(content)[source]¶ Inverted content
Parameters: content (unicode) – Whatever you want to say… Returns: ansi string Return type: unicode
-
lore.ansi.italic(content)[source]¶ Italic content
Parameters: content (unicode) – Whatever you want to say… Returns: ansi string Return type: unicode
-
lore.ansi.reset()[source]¶ Remove any active ansi styles
Returns: string resetting marker Return type: unicode
-
lore.ansi.rgb(red, green, blue, content)[source]¶ Colors a content using rgb for h :param red: [0-5] :type red: int :param green: [0-5] :type green: int :param blue: [0-5] :type blue: int :param content: Whatever you want to say… :type content: unicode :return: ansi string :rtype: unicode
-
lore.ansi.strike(content)[source]¶ Strike through content
Parameters: content (unicode) – Whatever you want to say… Returns: ansi string Return type: unicode
-
lore.ansi.strobe(content)[source]¶ Quickly blinking content
Parameters: content (unicode) – Whatever you want to say… Returns: ansi string Return type: unicode
-
lore.ansi.style(effect, content)[source]¶ add a particular style to the content
Parameters: - effect (int) – style
- content (unicode) – Whatever you want to say… string
Returns: ansi string
Return type: unicode
-
lore.ansi.success(content=u'SUCCESS')[source]¶ success style
Parameters: content (unicode) – Whatever you want to say… Returns: ansi string Return type: unicode