Metadata-Version: 2.4
Name: painter
Version: 0.3.3
Summary: Your own expressive painter who colors text in your terminal.
Home-page: https://codeberg.org/fgimian/painter
Author: Fotis Gimian
Author-email: fgimiansoftware@gmail.com
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: Implementation
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Terminals
License-File: LICENSE
Requires-Dist: colorama
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

Painter
=======

|License| |Latest Version| |Python Versions|

|Logo|

.. |License| image:: https://img.shields.io/badge/license-MIT-blue.svg
   :target: https://codeberg.org/fgimian/painter/src/main/LICENSE
.. |Latest Version| image:: https://img.shields.io/pypi/v/painter.svg
   :target: https://pypi.python.org/pypi/painter/
.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/painter.svg
   :target: https://pypi.python.org/pypi/painter/
.. |Logo| image:: https://codeberg.org/fgimian/painter/raw/main/images/painter-logo.png
   :alt: Painter Logo

Artwork courtesy of `Open Clip Art
Library <http://openclipart.org/detail/174634/painter-penguin-by-moini-174634>`_

Introduction
------------

Painter is an ANSI coloring library based on the excellent
`chalk <https://github.com/sindresorhus/chalk>`_ and
`colors.js <https://github.com/marak/colors.js/>`_ libraries for
Node.js. However, painter attempts to provide an even more expressive
API which reads like English.

Painter is fully tested with 100% coverage and also completely Flake8
compliant too!

Quick Start
-----------

Install Painter in your virtualenv as follows:

.. code:: bash

    pip install painter

And now, go ahead and use it to output colors to your terminal:

.. code:: python

    from __future__ import print_function

    from painter import paint

    # Simple printing of colors
    print('Welcome to Painter!', paint.red('I can paint things red'),
          paint.blue('and blue'))

    # Chaining colors and styles
    print(paint.blue.on_red.bold.underline('and far more complex combos too'))
    print()

    # Using color patterns
    print(paint.rainbow('Awww look, a pretty rainbow :)'))
    print(paint.zebra('and a scary looking zebra!'))
    print()

    # Nested painting
    print(paint.on_red('I can also use a background color across',
                       paint.blue('multiple'),
                       paint.yellow('foreground colors')))

    # Custom separator
    print(paint('and', 'allow', 'you to use', paint.red('custom separators'),
          sep='-'))
    print()

    # Creating themes
    cool_theme = paint.green.on_red.underline.bold
    print('Creating', cool_theme('your own theme'), 'is easy')

    # Easily disable painting of colors
    paint.enabled = False
    print('and I allow you to easily', paint.red('disable'), paint.blue('me'))
    print()

    paint.enabled = True
    print('Hope you have a', paint.blue('lovely day!'), paint.green(':)'))

The output of the script above looks something like this:

.. image:: https://codeberg.org/fgimian/painter/raw/main/images/painter-demo.png
   :alt: Painter Demo

Documentation
-------------

Please check out the `Painter Usage documentation
<https://codeberg.org/fgimian/painter/src/main/USAGE.rst/>`_.

Running Tests
-------------

You may run the unit tests as follows:

.. code:: bash

    git clone https://codeberg.org/fgimian/painter.git
    cd painter
    python setup.py test

You may validate Flake8 compatibility as follows:

.. code:: bash

    python setup.py flake8

License
-------

Painter is released under the **MIT** license. Please see the
`LICENSE <https://codeberg.org/fgimian/painter/src/main/LICENSE>`_
file for more details.
