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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file terml-0.1.0.tar.gz.

File metadata

  • Download URL: terml-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.6 Linux/6.6.7-arch1-1

File hashes

Hashes for terml-0.1.0.tar.gz
Algorithm Hash digest
SHA256 319cd5f0480d0f0ea6c38380aab16279ebcc5481fbb2003c34d24cc1d8a7ab47
MD5 3a6e10093630acbe96483ab6da05e420
BLAKE2b-256 408d6a9ae0a7fe864fec45227e5751401cfbf17b0c5b6c6f2f9447d9fe8d2d2b

See more details on using hashes here.

File details

Details for the file terml-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: terml-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.6 Linux/6.6.7-arch1-1

File hashes

Hashes for terml-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d0fc0ffca467ab8281e5662a4a65a0034852d6b68673563708270ad9a6aa1ef9
MD5 f182739e107e5b0983160098e07373cc
BLAKE2b-256 e0699b2d2a999d876c66d3f58ab8a7220faf2b6fe3dee092904e6e1fa0cc9ae9

See more details on using hashes here.

Supported by

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