Metadata-Version: 2.2
Name: rainbow
Version: 2.8.0
Summary: Colorize commands output using patterns.
Home-page: https://github.com/nicoulaj/rainbow
Author: Julien Nicoulaud
Author-email: julien.nicoulaud@gmail.com
License: GPLv3
Keywords: color colorize colorizer pattern
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX
Classifier: Topic :: System
Classifier: Topic :: Utilities
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: System Administrators
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Requires-Python: >=3.6
License-File: COPYING
Provides-Extra: build
Requires-Dist: Jinja2==3.0.3; extra == "build"
Provides-Extra: test
Requires-Dist: pytest==6.2.5; extra == "test"
Requires-Dist: coverage==6.2; extra == "test"
Requires-Dist: pytest-cov==3.0.0; extra == "test"
Requires-Dist: pytest-html==3.1.1; extra == "test"
Requires-Dist: pytest-timeout==2.0.2; extra == "test"
Requires-Dist: flake8==4.0.1; extra == "test"
Requires-Dist: pygal==3.0.0; extra == "test"
Requires-Dist: pygaljs==1.0.2; extra == "test"
Requires-Dist: pytest-benchmark==3.4.1; extra == "test"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: provides-extra
Dynamic: requires-python
Dynamic: summary

rainbow
=======

.. image:: https://img.shields.io/github/tag/nicoulaj/rainbow.svg
   :target: https://pypi.org/project/rainbow
   :alt: last release

.. image:: https://pepy.tech/badge/rainbow
   :target: https://pypi.org/project/rainbow
   :alt: downloads

.. image:: https://img.shields.io/pypi/pyversions/rainbow.svg
   :target: https://pypi.org/project/rainbow
   :alt: python versions

.. image:: https://github.com/nicoulaj/rainbow/actions/workflows/tests.yml/badge.svg
   :target: https://github.com/nicoulaj/rainbow/actions
   :alt: continuous integration

.. image:: https://api.codeclimate.com/v1/badges/724f29330eb898c7516b/test_coverage
   :target: https://codeclimate.com/github/nicoulaj/rainbow/test_coverage
   :alt: test Coverage

.. image:: https://badges.gitter.im/nicoulaj/rainbow.svg
   :target: https://gitter.im/nicoulaj/rainbow
   :alt: gitter chat

----

**Easily colorize commands output using patterns.**
::

  rainbow [ --COLOR=PATTERN ... | --conf CONF ] COMMAND


Examples
--------

Using the command line
~~~~~~~~~~~~~~~~~~~~~~
Prepend ``rainbow`` with ``--COLOR=PATTERN`` associations to your
command, for example:

-  Tail some log file with lines containing ``ERROR`` in red:
   ::

     rainbow --red=ERROR tail -f /var/log/my.log

-  You can also pipe commands output into rainbow:
   ::

     tail -f /var/log/my.log | rainbow --red=ERROR


Using configs
~~~~~~~~~~~~~

Rainbow can load configuration for each command from files, which is the most convenient way to use it. When running ``rainbow mycommand``, rainbow will automatically look for a config named ``mycommand.cfg`` in ``~/.config/rainbow``, ``~/.rainbow``, ``/etc/rainbow``, or builtin configs:

-  Colorize the ``diff`` command output using the builtin config:
   ::

     rainbow diff file1 file2

-  Start my custom command, using ``~/.rainbow/mycommand.cfg``:
   ::

     rainbow mycommand

The syntax for writing configs is straightforward, see the
`builtin configs <https://github.com/nicoulaj/rainbow/blob/master/rainbow/config/builtin>`_
for examples. See also the `commands support table <https://github.com/nicoulaj/rainbow/blob/master/CONTRIBUTING.md>`_.


Installation
------------

Using packages
~~~~~~~~~~~~~~

============================================  ============================================
 System                                        Installation instructions
============================================  ============================================
 Debian / Ubuntu                               `rainbow repository <https://software.opensuse.org/download.html?project=home%3Anicoulaj%3Arainbow&package=rainbow>`_
 Fedora / CentOS / RHEL / Scientific Linux     `rainbow repository <https://software.opensuse.org/download.html?project=home%3Anicoulaj%3Arainbow&package=rainbow>`_
 OpenSUSE / SLE                                `rainbow repository <https://software.opensuse.org/download.html?project=home%3Anicoulaj%3Arainbow&package=rainbow>`_
 Arch Linux                                    `AUR/rainbow <https://aur.archlinux.org/packages/rainbow>`_ / `AUR/rainbow-git <https://aur.archlinux.org/packages/rainbow-git>`_
 `pip` / `easy_install`                        `PyPI: rainbow <https://pypi.org/project/rainbow>`_
============================================  ============================================


Building from sources
~~~~~~~~~~~~~~~~~~~~~

You can build from sources this way:

::

    git clone git://github.com/nicoulaj/rainbow.git
    cd rainbow
    python setup.py build install --user


Contributing
------------

Contributions are welcome, please see `CONTRIBUTING <https://github.com/nicoulaj/rainbow/blob/master/CONTRIBUTING.md>`_.


License
-------

This project is a fork of `Linibou's colorex <http://bitbucket.org/linibou/colorex>`_.
It is is released under the terms of the `GNU General Public
License <http://www.gnu.org/licenses/gpl.html>`_. See ``COPYING`` for
details.
