Skip to main content

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.

Metadata

Release files for terml 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for terml 0.1.0
File Size Uploaded
terml-0.1.0.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for terml 0.1.0
File Interpreter ABI Platform
terml-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.3 kB

Release files / terml-0.1.0.tar.gz

Download URL terml-0.1.0.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
319cd5f0480d0f0ea6c38380aab16279ebcc5481fbb2003c34d24cc1d8a7ab47
BLAKE2b-256 checksum
How to use checksums
408d6a9ae0a7fe864fec45227e5751401cfbf17b0c5b6c6f2f9447d9fe8d2d2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.6 Linux/6.6.7-arch1-1

Release files / terml-0.1.0-py3-none-any.whl

Download URL terml-0.1.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0fc0ffca467ab8281e5662a4a65a0034852d6b68673563708270ad9a6aa1ef9
BLAKE2b-256 checksum
How to use checksums
e0699b2d2a999d876c66d3f58ab8a7220faf2b6fe3dee092904e6e1fa0cc9ae9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.6 Linux/6.6.7-arch1-1

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page