• Stars
    star
    249
  • Rank 162,987 (Top 4 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created about 13 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🌈 Colorize commands output or STDIN using patterns.

rainbow

last release downloads python versions continuous integration test Coverage 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 for examples. See also the commands support table.

Installation

Using packages

System Installation instructions
Debian / RPM based rainbow repository (sources here)
Arch Linux AUR/rainbow / AUR/rainbow-git
pip PyPI: 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.

License

This project is a fork of Linibou's colorex. It is is released under the terms of the GNU General Public License. See COPYING for details.

More Repositories

1

idea-markdown

Markdown language support for IntelliJ IDEA (abandonned).
Java
600
star
2

compile-command-annotations

Annotation hints for the Hotspot JVM JIT compiler.
Java
43
star
3

checksum-maven-plugin

Compute Maven project artifacts/dependencies/files checksum digests.
Java
43
star
4

broom

A disk cleaning utility for developers.
Shell
39
star
5

vagrant-maven-plugin

Maven plugin for Vagrant.
Java
33
star
6

focalboard-docker

Cross platform Docker images for Focalboard.
Dockerfile
26
star
7

openrgb-rs

Rust client library for OpenRGB SDK.
Rust
23
star
8

pytest-csv

CSV reporter for pytest.
Python
20
star
9

vagrant-sandbox

Preconfigured Vagrant environment for running various systems in a single command.
16
star
10

cinnamon-applet-wireguard

A simple WireGuard systray applet for the Cinnamon desktop environment.
JavaScript
14
star
11

commons-dbcp-jmx

Mbean wrappers around Apache Commons DBCP datasources.
Java
11
star
12

jmh-utils

Utilities/addons for JMH.
Java
9
star
13

auto-instrument

Use java.lang.instrument without writing an agent.
Java
9
star
14

soot-maven-plugin

Maven plugin for Soot, the Java bytecode optimization framework.
Java
7
star
15

jcrfs

A filesystem in userspace (FUSE) for Java Content Repositories (JCR).
Java
5
star
16

devops-sandbox

Ready-to-use virtual machines for safely testing various tools.
Puppet
5
star
17

archiso

Automated build of customized Arch Linux Live ISO.
Shell
5
star
18

microbenchmarks

Java microbenchmarks sandbox.
Java
3
star
19

idea-byteman

Byteman plugin for IntelliJ IDEA.
Java
3
star
20

maven-skins

A collection of skins for Maven generated sites.
JavaScript
3
star
21

visualvm-hide-jstatd

A simple VisualVM plugin that hides Jstatd instances.
Java
2
star
22

mock-webapp

Mock web application for performance or integration testing.
Java
2
star
23

parent-pom

Parent POM for Maven projects.
1
star