bruhanimate


Namebruhanimate JSON
Version 0.2.90 PyPI version JSON
download
home_pagehttps://github.com/ethanlchristensen/bruhanimate
SummaryASCII Termnial Animation Package
upload_time2024-11-11 03:25:59
maintainerNone
docs_urlNone
authorethanlchristensen
requires_python<4.0,>=3.11
licenseApache License
keywords python terminal terminal-animation bruhanimate
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # bruhanimate
[![Downloads](https://static.pepy.tech/badge/bruhanimate)](https://pepy.tech/project/bruhanimate)
[![Downloads](https://static.pepy.tech/badge/bruhanimate/month)](https://pepy.tech/project/bruhanimate)
[![Downloads](https://static.pepy.tech/badge/bruhanimate/week)](https://pepy.tech/project/bruhanimate)
<div>
<img src="https://github.com/user-attachments/assets/22d61f3e-b3ca-406f-9e1c-2f539eea23c7" alt="snow" border="0">
<img src="https://github.com/user-attachments/assets/644afa91-ffb0-465e-815f-998a59759c3b" alt="fireworks" border="0">
</div>

[![Supported Python versions](https://img.shields.io/pypi/pyversions/termcolor.svg?logo=python&logoColor=FFE873)](https://pypi.org/project/bruhanimate/)

bruhanimate provides a set of tools for creating and rendering animations directly in the terminal. Designed for ease of use, this package enables developers to incorporate dynamic animations into command-line applications. While drawing inspiration from existing terminal animation libraries, bruhanimate brings a fresh approach and offers a unique set of features tailored for flexibility and creativity in terminal-based projects.

Inspired by the <a href="https://github.com/peterbrittain/asciimatics">Asciimatics</a> package.

## Installation

### From PyPI

```bash
pip install --upgrade bruhanimate
```

### From source

```bash
git clone https://github.com/FNBBDevs/bruhanimate
cd bruhanimate
python -m pip install .
```

# Quick Start
Use some of the built in demos to see what is possible. There are demos for each effect. Simply import `<effect>_demo` from bruhanimate and call the `<effect>_demo.run()` to run the demo!
- static
- offset
- noise
- stars
- snow
- rain
- plasma
- gol (Conway's Game of Life)
- matrix
- twinkle

```py
# Import a demo
from bruhanimate import plasma_demo
# run the demo
plasma_demo.run()
```

# Usage
Here are some examples on how bruhanimate might be used. <br/><br/>

Pass in arguments through the `show()` command. <br/>
```py

"""
Here is a simple program that uses the EffectRenderer passing in
the arguments to the main function
"""
from bruhanimate import Screen, CenterRenderer, images


def demo(screen, img, frames, time, effect_type, background, transparent):
    renderer = CenterRenderer(screen, frames, time, img, effect_type, background, transparent)
    renderer.update_smart_transparent(True)
    renderer.effect.update_color(True)
    renderer.effect.update_intensity(100)
    renderer.run()


def main():
    Screen.show(demo, args=(images.get_image("twopoint"), 300, 0, "noise", " ", False))


if __name__ == "__main__":
    main()
```

Set the arguments directly in the function invoked by `show()`. <br/>
```py
"""
Here is a simple program that uses the EffectRenderer setting the arguments
directly in the main function.
"""
from bruhanimate import Screen, EffectRenderer


def demo(screen: Screen):
    renderer = EffectRenderer(
        screen=screen,
        frames=float("inf"),
        frame_time=0.1,
        effect_type="snow",
        background=" ",
        transparent=False
    )
    renderer.run()


if __name__ == "__main__":
    Screen.show(main)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ethanlchristensen/bruhanimate",
    "name": "bruhanimate",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": "python, terminal, terminal-animation, bruhanimate",
    "author": "ethanlchristensen",
    "author_email": "ethanlchristensen@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/be/77/eddaabd0177030a9d0e888d8573b4313cbbd0f4498c6c27b70782dd4ce62/bruhanimate-0.2.90.tar.gz",
    "platform": null,
    "description": "# bruhanimate\n[![Downloads](https://static.pepy.tech/badge/bruhanimate)](https://pepy.tech/project/bruhanimate)\n[![Downloads](https://static.pepy.tech/badge/bruhanimate/month)](https://pepy.tech/project/bruhanimate)\n[![Downloads](https://static.pepy.tech/badge/bruhanimate/week)](https://pepy.tech/project/bruhanimate)\n<div>\n<img src=\"https://github.com/user-attachments/assets/22d61f3e-b3ca-406f-9e1c-2f539eea23c7\" alt=\"snow\" border=\"0\">\n<img src=\"https://github.com/user-attachments/assets/644afa91-ffb0-465e-815f-998a59759c3b\" alt=\"fireworks\" border=\"0\">\n</div>\n\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/termcolor.svg?logo=python&logoColor=FFE873)](https://pypi.org/project/bruhanimate/)\n\nbruhanimate provides a set of tools for creating and rendering animations directly in the terminal. Designed for ease of use, this package enables developers to incorporate dynamic animations into command-line applications. While drawing inspiration from existing terminal animation libraries, bruhanimate brings a fresh approach and offers a unique set of features tailored for flexibility and creativity in terminal-based projects.\n\nInspired by the <a href=\"https://github.com/peterbrittain/asciimatics\">Asciimatics</a> package.\n\n## Installation\n\n### From PyPI\n\n```bash\npip install --upgrade bruhanimate\n```\n\n### From source\n\n```bash\ngit clone https://github.com/FNBBDevs/bruhanimate\ncd bruhanimate\npython -m pip install .\n```\n\n# Quick Start\nUse some of the built in demos to see what is possible. There are demos for each effect. Simply import `<effect>_demo` from bruhanimate and call the `<effect>_demo.run()` to run the demo!\n- static\n- offset\n- noise\n- stars\n- snow\n- rain\n- plasma\n- gol (Conway's Game of Life)\n- matrix\n- twinkle\n\n```py\n# Import a demo\nfrom bruhanimate import plasma_demo\n# run the demo\nplasma_demo.run()\n```\n\n# Usage\nHere are some examples on how bruhanimate might be used. <br/><br/>\n\nPass in arguments through the `show()` command. <br/>\n```py\n\n\"\"\"\nHere is a simple program that uses the EffectRenderer passing in\nthe arguments to the main function\n\"\"\"\nfrom bruhanimate import Screen, CenterRenderer, images\n\n\ndef demo(screen, img, frames, time, effect_type, background, transparent):\n    renderer = CenterRenderer(screen, frames, time, img, effect_type, background, transparent)\n    renderer.update_smart_transparent(True)\n    renderer.effect.update_color(True)\n    renderer.effect.update_intensity(100)\n    renderer.run()\n\n\ndef main():\n    Screen.show(demo, args=(images.get_image(\"twopoint\"), 300, 0, \"noise\", \" \", False))\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\nSet the arguments directly in the function invoked by `show()`. <br/>\n```py\n\"\"\"\nHere is a simple program that uses the EffectRenderer setting the arguments\ndirectly in the main function.\n\"\"\"\nfrom bruhanimate import Screen, EffectRenderer\n\n\ndef demo(screen: Screen):\n    renderer = EffectRenderer(\n        screen=screen,\n        frames=float(\"inf\"),\n        frame_time=0.1,\n        effect_type=\"snow\",\n        background=\" \",\n        transparent=False\n    )\n    renderer.run()\n\n\nif __name__ == \"__main__\":\n    Screen.show(main)\n```\n",
    "bugtrack_url": null,
    "license": "Apache License",
    "summary": "ASCII Termnial Animation Package",
    "version": "0.2.90",
    "project_urls": {
        "Homepage": "https://github.com/ethanlchristensen/bruhanimate",
        "Repository": "https://github.com/ethanlchristensen/bruhanimate"
    },
    "split_keywords": [
        "python",
        " terminal",
        " terminal-animation",
        " bruhanimate"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "377e2740c45f5e5441ae5bbc0c17c33b2213fd26ee16af0113bfdbc37caf855b",
                "md5": "ee5ad97743d3d9026745953248abd9b8",
                "sha256": "cbf9b13e30a7702cbdbb889c0e84268cc80df4d6569d0d558e2eb8d98b93cb5c"
            },
            "downloads": -1,
            "filename": "bruhanimate-0.2.90-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ee5ad97743d3d9026745953248abd9b8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 108571,
            "upload_time": "2024-11-11T03:25:58",
            "upload_time_iso_8601": "2024-11-11T03:25:58.537522Z",
            "url": "https://files.pythonhosted.org/packages/37/7e/2740c45f5e5441ae5bbc0c17c33b2213fd26ee16af0113bfdbc37caf855b/bruhanimate-0.2.90-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "be77eddaabd0177030a9d0e888d8573b4313cbbd0f4498c6c27b70782dd4ce62",
                "md5": "1995e21fd60d66c59ab30e9e2a296de3",
                "sha256": "684da618cd9fb1939e50cf5867b92c798b7759ada13131fb9814825cd7bd259f"
            },
            "downloads": -1,
            "filename": "bruhanimate-0.2.90.tar.gz",
            "has_sig": false,
            "md5_digest": "1995e21fd60d66c59ab30e9e2a296de3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 68262,
            "upload_time": "2024-11-11T03:25:59",
            "upload_time_iso_8601": "2024-11-11T03:25:59.746004Z",
            "url": "https://files.pythonhosted.org/packages/be/77/eddaabd0177030a9d0e888d8573b4313cbbd0f4498c6c27b70782dd4ce62/bruhanimate-0.2.90.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-11 03:25:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ethanlchristensen",
    "github_project": "bruhanimate",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "bruhanimate"
}
        
Elapsed time: 0.33418s