https://github.com/jonghwanhyeon/python-tml
A terminal markup language, inspired by tml
https://github.com/jonghwanhyeon/python-tml
Last synced: 3 months ago
JSON representation
A terminal markup language, inspired by tml
- Host: GitHub
- URL: https://github.com/jonghwanhyeon/python-tml
- Owner: jonghwanhyeon
- License: mit
- Created: 2024-07-13T17:46:47.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-08-13T05:33:48.000Z (11 months ago)
- Last Synced: 2024-10-13T11:58:13.645Z (9 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terminal Markup Language (tml)
- A python library to make the output of colored text in the terminal easier and more readable.## Example
```python
from tml import markup
print(markup("this text is red and the following is green"))
```Alternatively, you can use the `mprint()` function, which is a convenient shortcut.
```python
from tml import mprint
mprint("this text is red and the following is green")
```You don't need to close the tag explicitly if it is not needed.
```python
print(markup("this text has blue foreground on green background colors"))
```If you would like to print brackets, use them in doubles:
```python
print(markup("This is <>"))
```## Available Tags
### Foreground
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``### Background
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``### Attributes
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``
- ``## Acknowledgement
- This library is inspired by [tml](https://github.com/liamg/tml)