Skip to main content

Terminal Markup Language based on BBCode

Project description

terml

Terminal Markup Language based on BBCode.

Inspired by Go:tml and Python:rich.

Installation:

pip install terml
poetry add terml

Examples

from terml import format

print(format("[b][color=#f70000 background=yellow] WARNING [/color]:[/b] [magenta]Life leads to [i blue underline]Death[/i].[/magenta]"))

Tags

Tag Description
b Bold text
i Italic text
u Underline text
[color=<color>], <color name> Set foreground color

Non-existent tags do not cause errors.

Common attributes

Attribute Description
bold, italic, underline Apply the same style
<color name>, color=<color> Set foreground color
background=<color> Set background color

Unknown attributes are ignored.

Colors

Color name: black, red, green, yellow, blue, magenta, cyan, white. Also supported HEX-codes like #deadbeef.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terml-0.1.0.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

terml-0.1.0-py3-none-any.whl (7.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page