python-tml


Namepython-tml JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/jonghwanhyeon/python-tml
SummaryA terminal markup language, inspired by tml
upload_time2024-08-13 05:34:52
maintainerNone
docs_urlNone
authorJonghwan Hyeon
requires_python>=3.7
licenseMIT
keywords terminal markup languages
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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("<red>this text is <bold>red</bold></red> and the following is <green>green</green>"))
```

Alternatively, you can use the `mprint()` function, which is a convenient shortcut.
```python
from tml import mprint
mprint("<red>this text is <bold>red</bold></red> and the following is <green>green</green>")
```

You don't need to close the tag explicitly if it is not needed.
```python
print(markup("<on-green><blue>this text has blue foreground on green background colors"))
```

If you would like to print brackets, use them in doubles:
```python
print(markup("<bold>This is <<example>></bold>"))
```

## Available Tags
### Foreground
- `<black>`
- `<red>`
- `<green>`
- `<yellow>`
- `<blue>`
- `<magenta>`
- `<cyan>`
- `<white>`
- `<bright-black>`
- `<light-black>`
- `<bright-red>`
- `<light-red>`
- `<bright-green>`
- `<light-green>`
- `<bright-yellow>`
- `<light-yellow>`
- `<bright-blue>`
- `<light-blue>`
- `<bright-magenta>`
- `<light-magenta>`
- `<bright-cyan>`
- `<light-cyan>`
- `<bright-white>`
- `<light-white>`

### Background
- `<on-black>`
- `<on-red>`
- `<on-green>`
- `<on-yellow>`
- `<on-blue>`
- `<on-magenta>`
- `<on-cyan>`
- `<on-white>`
- `<on-bright-black>`
- `<on-light-black>`
- `<on-bright-red>`
- `<on-light-red>`
- `<on-bright-green>`
- `<on-light-green>`
- `<on-bright-yellow>`
- `<on-light-yellow>`
- `<on-bright-blue>`
- `<on-light-blue>`
- `<on-bright-magenta>`
- `<on-light-magenta>`
- `<on-bright-cyan>`
- `<on-light-cyan>`

### Attributes
- `<bold>`
- `<b>`
- `<dark>`
- `<italic>`
- `<i>`
- `<underline>`
- `<u>`
- `<blink>`
- `<reverse>`
- `<concealed>`
- `<strike>`

## Acknowledgement
- This library is inspired by [tml](https://github.com/liamg/tml)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jonghwanhyeon/python-tml",
    "name": "python-tml",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "terminal, markup, languages",
    "author": "Jonghwan Hyeon",
    "author_email": "jonghwanhyeon93@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e4/0e/f039d151142bceae1409c11ace0b1683752a380a222ee0bc85e38f8cfffc/python_tml-1.0.2.tar.gz",
    "platform": null,
    "description": "# Terminal Markup Language (tml)\n- A python library to make the output of colored text in the terminal easier and more readable.\n\n## Example\n```python\nfrom tml import markup\nprint(markup(\"<red>this text is <bold>red</bold></red> and the following is <green>green</green>\"))\n```\n\nAlternatively, you can use the `mprint()` function, which is a convenient shortcut.\n```python\nfrom tml import mprint\nmprint(\"<red>this text is <bold>red</bold></red> and the following is <green>green</green>\")\n```\n\nYou don't need to close the tag explicitly if it is not needed.\n```python\nprint(markup(\"<on-green><blue>this text has blue foreground on green background colors\"))\n```\n\nIf you would like to print brackets, use them in doubles:\n```python\nprint(markup(\"<bold>This is <<example>></bold>\"))\n```\n\n## Available Tags\n### Foreground\n- `<black>`\n- `<red>`\n- `<green>`\n- `<yellow>`\n- `<blue>`\n- `<magenta>`\n- `<cyan>`\n- `<white>`\n- `<bright-black>`\n- `<light-black>`\n- `<bright-red>`\n- `<light-red>`\n- `<bright-green>`\n- `<light-green>`\n- `<bright-yellow>`\n- `<light-yellow>`\n- `<bright-blue>`\n- `<light-blue>`\n- `<bright-magenta>`\n- `<light-magenta>`\n- `<bright-cyan>`\n- `<light-cyan>`\n- `<bright-white>`\n- `<light-white>`\n\n### Background\n- `<on-black>`\n- `<on-red>`\n- `<on-green>`\n- `<on-yellow>`\n- `<on-blue>`\n- `<on-magenta>`\n- `<on-cyan>`\n- `<on-white>`\n- `<on-bright-black>`\n- `<on-light-black>`\n- `<on-bright-red>`\n- `<on-light-red>`\n- `<on-bright-green>`\n- `<on-light-green>`\n- `<on-bright-yellow>`\n- `<on-light-yellow>`\n- `<on-bright-blue>`\n- `<on-light-blue>`\n- `<on-bright-magenta>`\n- `<on-light-magenta>`\n- `<on-bright-cyan>`\n- `<on-light-cyan>`\n\n### Attributes\n- `<bold>`\n- `<b>`\n- `<dark>`\n- `<italic>`\n- `<i>`\n- `<underline>`\n- `<u>`\n- `<blink>`\n- `<reverse>`\n- `<concealed>`\n- `<strike>`\n\n## Acknowledgement\n- This library is inspired by [tml](https://github.com/liamg/tml)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A terminal markup language, inspired by tml",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/jonghwanhyeon/python-tml"
    },
    "split_keywords": [
        "terminal",
        " markup",
        " languages"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b04879565b58661a1a25c89f4b66ce17044d675c0cc787d46e9b464f50190af9",
                "md5": "ba861ace0372126d03647174bac149b0",
                "sha256": "f53fa57f154a36a5b0e2740eb081043fe8792e3bbe2434a3c0c478152907121c"
            },
            "downloads": -1,
            "filename": "python_tml-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ba861ace0372126d03647174bac149b0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 5376,
            "upload_time": "2024-08-13T05:34:51",
            "upload_time_iso_8601": "2024-08-13T05:34:51.392013Z",
            "url": "https://files.pythonhosted.org/packages/b0/48/79565b58661a1a25c89f4b66ce17044d675c0cc787d46e9b464f50190af9/python_tml-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e40ef039d151142bceae1409c11ace0b1683752a380a222ee0bc85e38f8cfffc",
                "md5": "99dcdb73419f502e1175da06b30b495c",
                "sha256": "f3f9b1bc324ad6a8cd2128b215691ada768906192a1f19ebb3e4ebb03874fa67"
            },
            "downloads": -1,
            "filename": "python_tml-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "99dcdb73419f502e1175da06b30b495c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 4676,
            "upload_time": "2024-08-13T05:34:52",
            "upload_time_iso_8601": "2024-08-13T05:34:52.627049Z",
            "url": "https://files.pythonhosted.org/packages/e4/0e/f039d151142bceae1409c11ace0b1683752a380a222ee0bc85e38f8cfffc/python_tml-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-13 05:34:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jonghwanhyeon",
    "github_project": "python-tml",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "python-tml"
}
        
Elapsed time: 1.31264s