{ "info": { "author": "Carlo Lobrano", "author_email": "c.lobrano@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Topic :: System :: Logging", "Topic :: Utilities" ], "description": "[![PyPI version](https://badge.fury.io/py/raffaello.svg)](https://badge.fury.io/py/raffaello)\n[![Build Status](https://travis-ci.org/clobrano/raffaello.svg?branch=master)](https://travis-ci.org/clobrano/raffaello)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/clobrano/5)\n\nRaffaello - output colorizer\n============================\n\nRaffaello colorizes the output stream of any command-line tool (e.g. gcc/g++, cmake, dmesg, syslog and custom), making it easier to read.\n\n## Usage\n\nThe raffaello's command line interface let you use two call modes: **pipes** and **command**.\n\nIn pipe mode you call raffaello like:\n\n | raffaello [options]\n\nIn command mode raffaello will call your stream source in your behalf\n\n raffaello [options] -c \n\n\nTo highlight the output stream, Raffaello has **2 color modes** and **2 styles modes**:\n\nColor modes:\n\n- **8 colors** mode let you use the following names: *black, red, green, yellow, blue, magenta, cyan, light_gray*. **NEW** Starting from version 3.0.3 Raffaello introduces a *blind* color: *lines matching the pattern with color \"blind\" will be REMOVED from the stream*. This will improve readability of dense stream output.\n\n- **256 colors** mode let you use other 248 colors and choose between foreground or background colors (you can mix 8 colors mode names with 256 color mode names):\n\nColor styles:\n\n- Foreground color names are in the form `colorNUM`. E.g. foreground red is *color001*\n- Background color names are in the form `bgcolorNUM`. E.g. background red is *bgcolor001*\n\nWith the styles you can blend colors in **bold** and **underlined**\n\n- foreground red bold is *color001_bold*\n- foreground red underlined is *color001_underlined*\n\nCall `raffaello -l` to see the complete list of available colors.\n\n\n### Full interface description\n\n```\nUsage: raffaello (-p PRESET | -r REQUEST | -f FILE | -l) [options]\n\n -p PRESET, --preset=PRESET Prebuilt config files for coloring known output streams (gcc/g++, cmake, dmesg, gcc/g++, ModemManager, logcat...)\n -r REQUEST --request=REQUEST The requested text/color mapping string. Multipe requests are separated by a space. Regular expression are supported. E.g. \"error=>red [Ww]arning=>yellow_bold\".\n -f FILE --file=FILE Path to the custom text=>color configuration file.\n -c COMMAND --command=COMMAND Instead of using raffaello with pipes, set the command-line tool to be executed by raffaello directly. E.g. -c \"dmesg -w\".\n -m, --match-only Print only the lines that match against some defined pattern.\n -d DELIMITER --delimiter=DELIMITER If you don't like \"=>\" as delimiter between text and color, use this flag to change it. E.g. -d & [default: =>]\n -l, --list List all the available colors and presets\n -v --verbose Enable debug logging\n```\n\n**NEWS**\n- version 3.0.3 --match-only flag Print only the lines that match against any defined pattern.\n\n## Examples\n\nThe simpler usage is using the `request` flag. The `request` flag requires a string in the form \"text=>color anothertext=>anothercolor\", where text can be a constant string or a [Regular expression](https://docs.python.org/2/library/re.html), while color is the name of the color to use (see [Usage](#Usage) section)\n\n* Simple constant text highlight\n\n $ ifconfig eno1 | raffaello --request=\"collisions=>blue\"\n\n![example001](./examples/raffaello001.png)\n\n* Highlight of multiple texts. Here you can see that spaces in the \"text part\" are not allowed. Use \\s instead.\n\n $ ifconfig eno1 | raffaello --request=\"RX\\spackets=>green TX\\spackets=>red\"\n\n![example002](./examples/raffaello002.png)\n\n* Highlight with regular expressions\n\n $ ifconfig eno1 | raffaello --request=\"\\d+\\.\\d+\\.\\d+\\.\\d+=>green_bold\"\n\n![example003](./examples/raffaello003.png)\n\n\nFor more complex color mapping you can write a file with a line for each *text=>color* entry, like the following\n\n collisions=>blue\n RX\\spackets=>green\n TX\\spackets=>red\n \\d+\\.\\d+\\.\\d+\\.\\d+=>green_bold\n\nsave the file and provide it to raffaello using its fullpath\n\n $ ifconfig eno1 | raffaello --file=$HOME/colorfile\n\n![example004](./examples/raffaello004.png)\n\nColor files can be reused in other color files using the `include` directive followed by the fullpath to the file.\n\nUsing fullpath is annoying, tough, so Raffaello has a special path under $HOME/.raffaello. All the colorfiles inside this folder can be passed using simply their filename, without the path.\n\n # include custom colorfile in $HOME/.raffaello\n include some_custom_colorfile\n\n # include custom color outside $HOME/.raffaello\n include $HOME/path/to/some_other_custom_color\n\n collisions=>blue\n RX\\spackets=>green\n TX\\spackets=>red\n \\d+\\.\\d+\\.\\d+\\.\\d+=>green_bold\n\n\nRaffaello provides some built-in colorfiles, called **presets**, for known tools like cmake, gcc/g++, dmesg, etc.\nThe presets can be used alone using `--preset` flag or even included in custom colorfile in order to extend their colormaps.\n\n # Include a preset colorfile\n include errors\n\n # include custom colorfile in $HOME/.raffaello\n include some_custom_colorfile\n\n # include custom color outside $HOME/.raffaello\n include $HOME/path/to/some_other_custom_color\n\n collisions=>blue\n RX\\spackets=>green\n TX\\spackets=>red\n \\d+\\.\\d+\\.\\d+\\.\\d+=>green_bold\n\nFor a full list of presets, call `raffaello --list`.\n\n\n## Raffaello is a python module\n\nRaffaello can be used as a python module inside other source codes\n\n```python\nfrom raffaello import Raffaello, Commission\n\nrequest = '''\nerror=>red\nwarning=>yellow_bold\nbluish\\stext=>color026\n'''\n\nc = Commission(request)\nr = Raffaello(c.commission)\n\nprint(r.paint('Sample message with error, warning and a bluish text.'))\n```\n\n## Install\n\nInstall from source using setuptools. Just type the following command\n\n # python setup.py install\n\nInstall from [PyPI - the Python Package Index](https://pypi.python.org/pypi)\n\n # pip install raffaello\n\n\n## Dependencies\n\n* `docopt` language for description of command-line interfaces\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/clobrano/raffaello", "keywords": "formatter,console,colorizer", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "raffaello", "package_url": "https://pypi.org/project/raffaello/", "platform": "", "project_url": "https://pypi.org/project/raffaello/", "project_urls": { "Homepage": "https://github.com/clobrano/raffaello" }, "release_url": "https://pypi.org/project/raffaello/4.0.0/", "requires_dist": [ "docopt" ], "requires_python": "", "summary": "Raffaello command-line output colorizer", "version": "4.0.0" }, "last_serial": 4873867, "releases": { "2.1.0": [], "2.1.1": [ { "comment_text": "", "digests": { "md5": "7de28dde3d9c24c0ce3072d5e19e33b0", "sha256": "36e32f20c1d3d5b7a71d04f2acc748e4cac562cf986c54cea9811a5f6351a43d" }, "downloads": -1, "filename": "raffaello-2.1.1.tar.gz", "has_sig": false, "md5_digest": "7de28dde3d9c24c0ce3072d5e19e33b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6044, "upload_time": "2015-08-12T09:13:01", "url": "https://files.pythonhosted.org/packages/1c/fd/5d63573970d6fa1b3ad7be82091bb692a72d208ae27a21248acd574f1bdf/raffaello-2.1.1.tar.gz" } ], "2.1.2": [ { "comment_text": "", "digests": { "md5": "b2e8b513809fa5ad230add38c224600b", "sha256": "7b3da2f4ee839d3ca6785415acb9f814f7369a913dc6d5ffebfee188e9bcec7c" }, "downloads": -1, "filename": "raffaello-2.1.2.tar.gz", "has_sig": false, "md5_digest": "b2e8b513809fa5ad230add38c224600b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4545, "upload_time": "2015-08-12T09:17:06", "url": "https://files.pythonhosted.org/packages/da/c0/bf0709c377f26de03b6681235f99b8cbce6944cb0134d808a4749e20d23b/raffaello-2.1.2.tar.gz" } ], "2.2.0": [ { "comment_text": "", "digests": { "md5": "18b26494de2c8a48c94954a2a911799f", "sha256": "957bf075c23386e281496d1fa0f7fcbfd317049c59f01534d000f8e1525416b6" }, "downloads": -1, "filename": "raffaello-2.2.0.tar.gz", "has_sig": false, "md5_digest": "18b26494de2c8a48c94954a2a911799f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1694308, "upload_time": "2015-10-01T20:39:37", "url": "https://files.pythonhosted.org/packages/82/3c/66b9eae53dfb94c474f95196744c63c730489e9dc70cf44672bb61b1744d/raffaello-2.2.0.tar.gz" } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "52909beaa0f31c59d28243b4ab311662", "sha256": "87695fc4e60a1420e18d2c81c4f36ae574d502f6c68e1111673ef370fbaae21a" }, "downloads": -1, "filename": "raffaello-3.0.0.tar.gz", "has_sig": false, "md5_digest": "52909beaa0f31c59d28243b4ab311662", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8112, "upload_time": "2016-07-20T14:11:07", "url": "https://files.pythonhosted.org/packages/80/4d/3a5203f0dc40b2ce20c71f40ff4c3ab2d34c72a0858a998e09c562ddcaa4/raffaello-3.0.0.tar.gz" } ], "3.0.1": [ { "comment_text": "", "digests": { "md5": "77e2627a21591d77fec8857006b794a5", "sha256": "5e855da6686d4f3c5b1361f21940691eaf4a3fa49ad373539737588f26f05c4c" }, "downloads": -1, "filename": "raffaello-3.0.1.tar.gz", "has_sig": false, "md5_digest": "77e2627a21591d77fec8857006b794a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8168, "upload_time": "2016-11-02T15:16:51", "url": "https://files.pythonhosted.org/packages/ff/72/ba3b94d1a27564bdef67a613eaf942d96c3ebb9788eed974dad9a518cc57/raffaello-3.0.1.tar.gz" } ], "3.0.2": [ { "comment_text": "", "digests": { "md5": "e8ba3aaa436b8fdd813c5974bebe4aff", "sha256": "0d6c29c4deb6fd52e49233b8779ea1d94a5e6361725aab51020aaaa66ed8ddd7" }, "downloads": -1, "filename": "raffaello-3.0.2.tar.gz", "has_sig": false, "md5_digest": "e8ba3aaa436b8fdd813c5974bebe4aff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10561, "upload_time": "2016-11-15T11:07:56", "url": "https://files.pythonhosted.org/packages/7c/42/7cb1ced99f684248fb5b1f7d9e0e80668123fbefd3ee16dd4a99911f26f5/raffaello-3.0.2.tar.gz" } ], "3.0.4": [ { "comment_text": "", "digests": { "md5": "b22fa8efeb03b79c5f78d035871a0bfe", "sha256": "1549ada41130de0e1804621bc50e1267555760523eaaf3728c21c74f3dc1dfc3" }, "downloads": -1, "filename": "raffaello-3.0.4.tar.gz", "has_sig": false, "md5_digest": "b22fa8efeb03b79c5f78d035871a0bfe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10994, "upload_time": "2017-01-30T11:52:45", "url": "https://files.pythonhosted.org/packages/de/26/ed3422e65bf7a0f916a96debc3432877ba174e5fc73e8c67e83779caf999/raffaello-3.0.4.tar.gz" } ], "4.0.0": [ { "comment_text": "", "digests": { "md5": "b7a7b7b48e8f46950d18daeae5e584bc", "sha256": "00914110dcc4b8d65bcb230c00f4bbb5dafcd076a035a9feda0da979cfe99cac" }, "downloads": -1, "filename": "raffaello-4.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b7a7b7b48e8f46950d18daeae5e584bc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12810, "upload_time": "2019-02-27T11:55:46", "url": "https://files.pythonhosted.org/packages/26/0f/2494149a9ad26fe0aa1144b0edb5fe400c943591de988a6ead7e53d18e64/raffaello-4.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8680dbf4df9244b154d8229771f32369", "sha256": "882967d8571a6b5529a8040585ac5db58d5b6a25bd267d94516a8c344a158b39" }, "downloads": -1, "filename": "raffaello-4.0.0.tar.gz", "has_sig": false, "md5_digest": "8680dbf4df9244b154d8229771f32369", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9709, "upload_time": "2019-02-27T11:55:48", "url": "https://files.pythonhosted.org/packages/f4/32/bd8191c8a5146ae459fde77d3892f4483e4f694de1e30fdc54c7eba445da/raffaello-4.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b7a7b7b48e8f46950d18daeae5e584bc", "sha256": "00914110dcc4b8d65bcb230c00f4bbb5dafcd076a035a9feda0da979cfe99cac" }, "downloads": -1, "filename": "raffaello-4.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b7a7b7b48e8f46950d18daeae5e584bc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12810, "upload_time": "2019-02-27T11:55:46", "url": "https://files.pythonhosted.org/packages/26/0f/2494149a9ad26fe0aa1144b0edb5fe400c943591de988a6ead7e53d18e64/raffaello-4.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8680dbf4df9244b154d8229771f32369", "sha256": "882967d8571a6b5529a8040585ac5db58d5b6a25bd267d94516a8c344a158b39" }, "downloads": -1, "filename": "raffaello-4.0.0.tar.gz", "has_sig": false, "md5_digest": "8680dbf4df9244b154d8229771f32369", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9709, "upload_time": "2019-02-27T11:55:48", "url": "https://files.pythonhosted.org/packages/f4/32/bd8191c8a5146ae459fde77d3892f4483e4f694de1e30fdc54c7eba445da/raffaello-4.0.0.tar.gz" } ] }