bruhanimate


Namebruhanimate JSON
Version 0.2.52 PyPI version JSON
download
home_pagehttps://github.com/ethanlchristensen/bruhanimate
SummaryASCII Terminal Animation Package
upload_time2024-06-03 02:49:47
maintainerNone
docs_urlNone
authorEthan Christensen
requires_pythonNone
licenseNone
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://i.ibb.co/TwssymP/BRUHANIMA.gif" alt="BRUHANIMA" border="0">



<img src="https://i.ibb.co/p3mbKb1/plas.gif" alt="plas" border="0">



<img src="https://i.ibb.co/pR49kL6/noises.gif" alt="noises" border="0">

</div>



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



bruhanimate offers a series of files to aid in rendering out animations in the terminal. This is heavily inspisred by the <a href="https://github.com/peterbrittain/asciimatics">Asciimatics</a> package. While Asciimatics is the end-all be-all for termianl animations, I figured it would be good practice to go ahead and attempt something like this myself.



## 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/>

```py



"""

Here is a simple program that uses the EffectRenderer to render out one

of the prebuilt effects to the terminal.

"""

from bruhanimate.bruhrenderer import *

from bruhanimate.bruhscreen import Screen

import bruhanimate.images as images

import sys



def demo(screen, img, frames, time, effect_type, background, transparent):

    

    # CREATE THE RENDERER

    renderer = CenterRenderer(screen, frames, time, img, effect_type, background, transparent)



    # SET EFFECT ATTRIBUTES

    renderer.update_smart_transparent(True)

    renderer.effect.update_color(True)

    renderer.effect.update_intensity(100)



    # RUN THE ANIMATION

    renderer.run()



    # CATCH THE END WITH INPUT() --> for Win-Systems --> Ctl-C for Unix-Systems

    input()





def main():

    Screen.show(demo, args=(images.get_image("TWOPOINT"), 300, 0, "noise", " ", False))







if __name__ == "__main__":

    main()



```



```py



"""

Here is another example that makes use of line drawing to draw a 3-D triangle

"""

from bruhanimate.bruhrenderer import *

from bruhanimate.bruhscreen import Screen

import bruhanimate.images as images



def demo(screen, img, frames, time, effect, background, transparent):

    # CREATE THE RENDERER

    renderer = PanRenderer(screen, frames, time, img, effect, background, transparent, loop=True)

    

    # REGISTER THE LINES - LET'S MAKE A DECENT 3D TRIANGLE

    renderer.effect.add_line((15, 15), (30, 30))

    renderer.effect.add_line((30, 30), (50, 20))

    renderer.effect.add_line((50, 20), (15, 15))



    renderer.effect.add_line((30,30), (32, 22))

    renderer.effect.add_line((32, 22), (15, 15))

    renderer.effect.add_line((32, 22), (50, 20))





    # RUN THE ANIMATION

    renderer.run(end_message=False)



    # CATCH THE END WITH INPUT() ON WINDOWS

    input()



image = images.text_to_image("HELLO WORLD!", padding_top_bottom=1, padding_left_right=3)

Screen.show(demo, args=(image, 500, 0.05, "drawlines", " ", True))



```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ethanlchristensen/bruhanimate",
    "name": "bruhanimate",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python, terminal, terminal-animation, bruhanimate",
    "author": "Ethan Christensen",
    "author_email": "ethanlchristensen@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/b8/0d/2779646781942b1b93c270384ed9356e22e31a18a806ab912262d82fce21/bruhanimate-0.2.52.tar.gz",
    "platform": null,
    "description": "\r\n# bruhanimate\r\r\n[![Downloads](https://static.pepy.tech/badge/bruhanimate)](https://pepy.tech/project/bruhanimate)\r\r\n[![Downloads](https://static.pepy.tech/badge/bruhanimate/month)](https://pepy.tech/project/bruhanimate)\r\r\n[![Downloads](https://static.pepy.tech/badge/bruhanimate/week)](https://pepy.tech/project/bruhanimate)\r\r\n<div>\r\r\n<img src=\"https://i.ibb.co/TwssymP/BRUHANIMA.gif\" alt=\"BRUHANIMA\" border=\"0\">\r\r\n\r\r\n<img src=\"https://i.ibb.co/p3mbKb1/plas.gif\" alt=\"plas\" border=\"0\">\r\r\n\r\r\n<img src=\"https://i.ibb.co/pR49kL6/noises.gif\" alt=\"noises\" border=\"0\">\r\r\n</div>\r\r\n\r\r\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/termcolor.svg?logo=python&logoColor=FFE873)](https://pypi.org/project/bruhanimate/)\r\r\n\r\r\nbruhanimate offers a series of files to aid in rendering out animations in the terminal. This is heavily inspisred by the <a href=\"https://github.com/peterbrittain/asciimatics\">Asciimatics</a> package. While Asciimatics is the end-all be-all for termianl animations, I figured it would be good practice to go ahead and attempt something like this myself.\r\r\n\r\r\n## Installation\r\r\n\r\r\n### From PyPI\r\r\n\r\r\n```bash\r\r\npip install --upgrade bruhanimate\r\r\n```\r\r\n\r\r\n### From source\r\r\n\r\r\n```bash\r\r\ngit clone https://github.com/FNBBDevs/bruhanimate\r\r\ncd bruhanimate\r\r\npython -m pip install .\r\r\n```\r\r\n\r\r\n# Quick Start\r\r\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!\r\r\n- static\r\r\n- offset\r\r\n- noise\r\r\n- stars\r\r\n- snow\r\r\n- rain\r\r\n- plasma\r\r\n- gol (Conway's Game of Life)\r\r\n- matrix\r\r\n- twinkle\r\r\n\r\r\n```py\r\r\n# Import a demo\r\r\nfrom bruhanimate import plasma_demo\r\r\n# run the demo\r\r\nplasma_demo.run()\r\r\n```\r\r\n\r\r\n# Usage\r\r\nHere are some examples on how bruhanimate might be used. <br/><br/>\r\r\n```py\r\r\n\r\r\n\"\"\"\r\r\nHere is a simple program that uses the EffectRenderer to render out one\r\r\nof the prebuilt effects to the terminal.\r\r\n\"\"\"\r\r\nfrom bruhanimate.bruhrenderer import *\r\r\nfrom bruhanimate.bruhscreen import Screen\r\r\nimport bruhanimate.images as images\r\r\nimport sys\r\r\n\r\r\ndef demo(screen, img, frames, time, effect_type, background, transparent):\r\r\n    \r\r\n    # CREATE THE RENDERER\r\r\n    renderer = CenterRenderer(screen, frames, time, img, effect_type, background, transparent)\r\r\n\r\r\n    # SET EFFECT ATTRIBUTES\r\r\n    renderer.update_smart_transparent(True)\r\r\n    renderer.effect.update_color(True)\r\r\n    renderer.effect.update_intensity(100)\r\r\n\r\r\n    # RUN THE ANIMATION\r\r\n    renderer.run()\r\r\n\r\r\n    # CATCH THE END WITH INPUT() --> for Win-Systems --> Ctl-C for Unix-Systems\r\r\n    input()\r\r\n\r\r\n\r\r\ndef main():\r\r\n    Screen.show(demo, args=(images.get_image(\"TWOPOINT\"), 300, 0, \"noise\", \" \", False))\r\r\n\r\r\n\r\r\n\r\r\nif __name__ == \"__main__\":\r\r\n    main()\r\r\n\r\r\n```\r\r\n\r\r\n```py\r\r\n\r\r\n\"\"\"\r\r\nHere is another example that makes use of line drawing to draw a 3-D triangle\r\r\n\"\"\"\r\r\nfrom bruhanimate.bruhrenderer import *\r\r\nfrom bruhanimate.bruhscreen import Screen\r\r\nimport bruhanimate.images as images\r\r\n\r\r\ndef demo(screen, img, frames, time, effect, background, transparent):\r\r\n    # CREATE THE RENDERER\r\r\n    renderer = PanRenderer(screen, frames, time, img, effect, background, transparent, loop=True)\r\r\n    \r\r\n    # REGISTER THE LINES - LET'S MAKE A DECENT 3D TRIANGLE\r\r\n    renderer.effect.add_line((15, 15), (30, 30))\r\r\n    renderer.effect.add_line((30, 30), (50, 20))\r\r\n    renderer.effect.add_line((50, 20), (15, 15))\r\r\n\r\r\n    renderer.effect.add_line((30,30), (32, 22))\r\r\n    renderer.effect.add_line((32, 22), (15, 15))\r\r\n    renderer.effect.add_line((32, 22), (50, 20))\r\r\n\r\r\n\r\r\n    # RUN THE ANIMATION\r\r\n    renderer.run(end_message=False)\r\r\n\r\r\n    # CATCH THE END WITH INPUT() ON WINDOWS\r\r\n    input()\r\r\n\r\r\nimage = images.text_to_image(\"HELLO WORLD!\", padding_top_bottom=1, padding_left_right=3)\r\r\nScreen.show(demo, args=(image, 500, 0.05, \"drawlines\", \" \", True))\r\r\n\r\r\n```\r\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "ASCII Terminal Animation Package",
    "version": "0.2.52",
    "project_urls": {
        "Homepage": "https://github.com/ethanlchristensen/bruhanimate"
    },
    "split_keywords": [
        "python",
        " terminal",
        " terminal-animation",
        " bruhanimate"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b80d2779646781942b1b93c270384ed9356e22e31a18a806ab912262d82fce21",
                "md5": "ab35dc48a699b499b7a177103bcd451c",
                "sha256": "b09961ea98c9953373849f0c4136c8b4867f6666d2cecb9ef0fc0b243ac1b9fb"
            },
            "downloads": -1,
            "filename": "bruhanimate-0.2.52.tar.gz",
            "has_sig": false,
            "md5_digest": "ab35dc48a699b499b7a177103bcd451c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 44044,
            "upload_time": "2024-06-03T02:49:47",
            "upload_time_iso_8601": "2024-06-03T02:49:47.503989Z",
            "url": "https://files.pythonhosted.org/packages/b8/0d/2779646781942b1b93c270384ed9356e22e31a18a806ab912262d82fce21/bruhanimate-0.2.52.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-03 02:49:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ethanlchristensen",
    "github_project": "bruhanimate",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "bruhanimate"
}
        
Elapsed time: 0.27151s