Color text streams with a polished command line interface

Overview

colout(1) -- Color Up Arbitrary Command Output

Synopsis

colout [-h] [-r RESOURCE]

colout [-g] [-c] [-l min,max] [-a] [-t] [-T DIR] [-P DIR] [-d COLORMAP] [-s] [-e CHAR] [-E CHAR] [--debug] PATTERN [COLOR(S) [STYLE(S)]]

Description

colout read lines of text stream on the standard input and output characters matching a given regular expression PATTERN in given COLOR and STYLE.

If groups are specified in the regular expression pattern, only them are taken into account, else the whole matching pattern is colored.

You can specify several colors or styles when using groups by separating them with commas. If you indicate more colors than groups, the last ones will be ignored. If you ask for fewer colors, the last one will be duplicated across remaining groups.

Available colors are: blue, black, yellow, cyan, green, magenta, white, red, rainbow, random, Random, Spectrum, spectrum, scale, Scale, hash, Hash, none, an RGB hexadecimal triplet (#11aaff, for example) or any number between 0 and 255.

Available styles are: normal, bold, faint, italic, underline, blink, rapid_blink, reverse, conceal or random (some styles may have no effect, depending on your terminal).

In some case, you can indicate a foreground and a background color, by indicating boths colors separated by a period(for example: red.blue). You can also use this system to combine two styles (for example, for a bold style that also blinks: bold.blink).

rainbow will cycle over a the default colormap at each matching pattern. Rainbow will do the same over the default colormap for the 256-colors mode (this requires a terminal that supports the 256 color escape sequences).

Random will color each matching pattern with a random color among the default colormap (the 255 available in the ANSI table, by default). random will do the same in 8 colors mode.

spectrum and Spectrum are like rainbows, but with more colors (8 and 36 colors).

scale (8 colors) and Scale (256 colors) will parse the numbers characters in the matching text as a decimal number and apply the default colormap according to its position on the scale defined by the -l option (see below, "0,100" by default).

hash (8 colors) and Hash (256 colors) will take a fingerprint of the matching text and apply the default colormap according to it. This ensure that matching texts appearing several times will always get the same color.

Before interpreting the matched string as a number, colout will remove any character not supposed to be used to write down numbers. This permits to apply this special color on a large group, while interpreting only its numerical part.

You can use the name of a syntax-coloring "lexer" as a color (for example: "Cpp", "ruby", "xml+django", etc.).

If GIMP palettes files (*.gpl) are available, you can also use their names as a colormap (see the -P switch below).

Note that the RGB colors (either the hex triplets or the palettes's colors) will be converted to their nearest ANSI 256 color mode equivalents.

When not specified, a COLOR defaults to red and a STYLE defaults to bold.

colout comes with some predefined themes to rapidly color well-known outputs (see the -t switch below).

colout can be used as an interface to pygments (see also the --source switch below).

To have a list of all colors, styles, special colormaps, themes, palettes and lexers, use the -r switch (see below).

colout is released under the GNU Public License v3.

Installation

The reccomended method is using pipsi

pipsi install colout

Another method is to use pip to install the package for the local user:

pip install --user colout

There is also a PPA for Ubuntu 16.04 (Xenial)/18.04 (Bionic)

sudo add-apt-repository ppa:csaba-kertesz/random
sudo apt-get update
sudo apt-get/aptitude install colout

Options

  • -h, --help: Show a help message and exit

  • -g, --groups: For color maps (like "rainbow"), iterate over matching groups in the pattern instead of over patterns.

  • -c, --colormap: Use the given list of comma-separated colors as a colormap (cycle the colors at each match).

  • -l min,max, --scale min,max: When using the 'scale' colormap, parse matches as decimal numbers (taking your locale into account) or as arithmetic expression (like "1+2/0.9*3") and apply the rainbow colormap linearly between the given min,max (0,100, by default).

  • -a, --all: Color the whole input at once instead of line per line (really useful for coloring a source code file with strings on multiple lines).

  • -t, --theme: Interpret PATTERN as a predefined theme (perm, cmake, g++, etc.).

  • -T DIR, --themes-dir DIR: Search for additional themes (colout_*.py files) in this directory.

  • -P DIR, --palettes-dir DIR: Search for additional palettes (*.gpl files) in this directory.

  • -d COLORMAP, --default COLORMAP: When using special colormaps (random, scale or hash), use this COLORMAP instead of the default one. This can be either one of the available colormaps or a comma-separated list of colors. WARNING: be sure to specify a default colormap that is compatible with the special colormap's mode, or else the colors may not appear the same. Also, external palettes are converted from RGB to 256-ANSI and will thus not work if you use them as default colormaps for a 8-colors mode special color.

  • -r TYPE(S), --resources TYPE(S): Print the names of available resources. Use a comma-separated list of resources names (styles, colors, special, themes, palettes, colormaps or lexers), use 'all' to print everything.

  • -s, --source: Interpret PATTERN as source code readable by the Pygments library. If the first letter of PATTERN is upper case, use the 256 color mode, if it is lower case, use the 8 colors mode. In 256 color mode, interpret COLOR as a Pygments style (e.g. "default").

  • -e CHAR, --sep-list CHAR: Use this character as a separator for list of colors/resources/numbers (instead of comma).

  • -E CHAR, --sep-pair CHAR: Use this character as a separator for foreground/background pairs (instead of period).

  • --debug: Debug mode: print what's going on internally, if you want to check what features are available.

Regular expressions

A regular expression (or regex) is a pattern that describes a set of strings that matches it.

colout understands regex as specified in the re python module. Given that colout is generally called by the command line, you may have to escape special characters that would be recognize by your shell.

Dependencies

Necessary Python modules:

  • pygments for the source code syntax coloring
  • babel for a locale-aware number parsing

Limitations

Don't use nested groups or colout will duplicate the corresponding input text with each matching colors.

Using a default colormap that is incompatible with the special colormap's mode (i.e. number of colors) will end badly.

Color pairs ("foreground.background") work in 8-colors mode for simple coloring, but may fail with --colormap.

Examples

Simple

  • Color in bold red every occurrence of the word color in colout sources: cat colout.py | colout color red bold

  • Color in bold violet home directories in /etc/passwd: colout '/home/[a-z]+' 135 < /etc/passwd

  • Color in yellow user/groups id, in bold green name and in bold red home directories in /etc/passwd: colout ':x:([0-9]+:[0-9]+):([^:]+).*(/home/[a-z]+)' yellow,green,red normal,bold < /etc/passwd

  • Color in yellow file permissions with read rights for everyone: ls -l | colout '.(r.-){3}' yellow normal

  • Color in green read permission, in bold red write and execution ones: ls -l | colout '(r)(w*)(x*)' green,red normal,bold

  • Color in green comments in colout sources: colout '.*(#.*)$' green normal < colout.py

  • Color in bold green every numbers and in bold red the words error in make output: make 2>&1 | colout '[0-9]+' green normal | colout error

Somewhat useful

  • Use a different color for each line of the auth log grep user /var/log/auth.log | colout "^.*$" rainbow

  • Color each line of a file with a different color among a 256 color gradient from cyan to green: head /var/log/auth.log | colout -c "^.*$" 39,38,37,36,35,34

  • Color permissions with a predefined template: ls -l | colout -t perm

  • Color in light green comments in non-empty colout sources, with the sharp in bold green: grep -v '^\s*$' colout.py | colout '.*(#)(.*)$' green,119 bold,normal

  • Color a make output, line numbers in yellow, errors in bold red, warning in magenta, pragma in green and C++ file base names in cyan: make 2>&1 | colout ':([0-9]+):[0-9]*' yellow normal | colout error | colout warning magenta | colout pragma green normal | colout '/(\w+)*\.(h|cpp)' cyan normal Or using themes: make 2>&1 | colout -t cmake | colout -t g++

  • Color each word in the head of auth.log with a rainbow color map, starting a new colormap at each new line (the beginning of the command is just bash magic to repeat the string "(\w+)\W+": L=$(seq 10) ; P=${L//??/(\\w+)\\W+} ; head /var/log/auth.log | colout -g "^${P}(.*)$" rainbow

  • Color source code in 8 colors mode, without seeing comments: cat colout.py | grep -v "#" | colout -s python

  • Color source code in 256 color mode: cat colout.py | colout -s Python monokai

  • Color a JSON stream: echo '{"foo": "lorem", "bar":"ipsum"}' | python -mjson.tool | colout -t json

  • Color a source code substring: echo "There is an error in 'static void Functor::operator()( EOT& indiv ) { return indiv; }' you should fix it" | colout "'(.*)'" Cpp monokai

  • Color the percent of progress part of a CMake's makefile output, with a color related to the value of the progress (from 0%=blue to 100%=red): cmake .. && make | colout "^(\[\s*[0-9]+%\])" Scale

  • Color hosts and users in auth.log, with consistent colors: cat /var/log/auth.log | colout "^(\S+\s+){3}(\S+)\s(\S+\s+){3}(\S+)\s+(\S+\s+){2}(\S+)\s*" none,hash,none,hash,none,hash

Bash alias

The following bash function color the output of any command with the cmake and g++ themes:

function cm()
{
    set -o pipefail
    [email protected] 2>&1  | colout -t cmake | colout -t g++
}

You then can use the cm alias as a prefix to your build command, for example: cm make test

GDB integration

You can use colout within the GNU debuger (gbd) to color its output. For example, the following script .gdbinit configuration will color the output of the backtrace command:

set confirm off

# Don't wrap line or the coloring regexp won't work.
set width 0

# Create a named pipe to get outputs from gdb
shell test -e /tmp/coloutPipe && rm /tmp/coloutPipe
shell mkfifo /tmp/coloutPipe

define logging_on
  # Instead of printing on stdout only, log everything...
  set logging redirect on
  # ... in our named pipe.
  set logging on /tmp/coloutPipe
end

define logging_off
  set logging off
  set logging redirect off
  # Because both gdb and our commands are writing on the same pipe at the same
  # time, it is more than probable that gdb will end before our (higher level)
  # commands.  The gdb prompt will thus render before the result of the command,
  # which is highly akward. To prevent this, we need to wait before displaying
  # the prompt again.  The more your commands are complex, the higher you will
  # need to set this.
  shell sleep 0.4s
end

define hook-backtrace
    # Note: match path = [path]file[.ext] = (.*/)?(?:$|(.+?)(?:(\.[^.]*)|))
    # This line color highlights:
    # – lines that link to source code,
    # – function call in green,
    # – arguments names in yellow, values in magenta,
    # — the parent directory in bold red (assuming that the debug session would be in a "project/build/" directory).
    shell cat /tmp/coloutPipe | colout "^(#)([0-9]+)\s+(0x\S+ )*(in )*(.*) (\(.*\)) (at) (.*/)?(?:$|(.+?)(?:(\.[^.]*)|)):([0-9]+)" red,red,blue,red,green,magenta,red,none,white,white,yellow normal,bold,normal,normal,normal,normal,normal,bold,bold,bold | colout "([\w\s]*?)(=)([^,]*?)([,\)])" yellow,blue,magenta,blue normal | colout "/($(basename $(dirname $(pwd))))/" red bold &
    logging_on
end
define hookpost-backtrace
    logging_off
end

# Don't forget to clean the adhoc pipe.
define hook-quit
    set confirm off
    shell rm -f /tmp/coloutPipe
end

Take a look at the example.gdbinit file distributed with colout for more gdb commands.

Themes

You can easily add your own theme to colout. A theme is basically a module with a function named theme that take the configuration context as an argument and return back the (modified) context and a list of triplets. Each triplet figures the same arguments than those of the command line interface.

def theme(context):
    return context,[ [regexp, colors, styles] ]

With the context dictionary at hand, you have access to the internal configuration of colout, you can thus change colormaps for special keywords, the scale, even the available colors, styles or themes.

See the cmake theme for how to modify an existing colormap if (and only if) the user didn't ask for an alternative one. See the ninja theme for how to extend an existing theme with more regexps and a different configuration. See the gcc theme for an example of how to use the localization of existing softwares to build translated regexp.

Buffering

Note that when you use colout within real time streams (like tail -f X | grep Y | colout Z) of commands, you may observe that the lines are printed by large chunks and not one by one, in real time. This is not due to colout but to the buffering behavior of your shell. To fix that, use stdbuf, for example: tail -f X | stdbuf -o0 grep Y | colout Z.

Authors

Issues
  • Custom color selectors support

    Custom color selectors support

    I've starting create color themes for kubectl commands. The first one is kubectl get pods. But I can't create some logic without custom color selectors (like Scale or Rainbow). For example I need two digits comparer that will choose color by percentage ranges. I've created BaseSelector and PercentSelector as child of BaseSelector. BaseSelector should be a parent for any custom selectors. I've push this selectors into context and now it is possible to create any custom selectors inside colout_.py files. Example of usage for custom selectors is kubectlpods theme. For example kubectl get pods |colout.py -t kubectlpods

    opened by Tolyar 5
  • Developing new themes

    Developing new themes

    I am developing a theme to colorize Zabbix log files. What would be the best way to do it? Would you like me to create a pull request with this new theme (in this case I will proceed with development in a fork of your repository) or do you prefer keeping custom themes for not-that-commonly-used applications out of the mainstream repository (in which case I will create my own theme-only repository like dabrady/colout-themes and cym13/colout-templates)?

    opened by i-ky 0
  • Hanging when process writing into pipe has exited

    Hanging when process writing into pipe has exited

    I use the command like this one:

    $ ./my_script.py 2>&1 | colout -t cmake | colout -t g++ | colout -s Xml
    

    Sometimes this command hangs. In the process list I don't see my_script, only colout processes:

    develop+ 14887  0.0  0.0  12664  3068 pts/4    S+   14:17   0:00 /bin/bash /usr/local/bin/colout -t cmake
    develop+ 14888  0.0  0.0  12664  3080 pts/4    S+   14:17   0:00 /bin/bash /usr/local/bin/colout -t g++
    develop+ 14889  0.0  0.0  12664  2972 pts/4    S+   14:17   0:00 /bin/bash /usr/local/bin/colout -s Xml
    develop+ 14890  0.2  0.4  59708 22988 pts/4    S+   14:17   0:00 python3 -m colout.colout -t cmake
    develop+ 14891  0.2  0.4  59848 23324 pts/4    S+   14:17   0:00 python3 -m colout.colout -t g++
    develop+ 14892  0.2  0.4  59704 23060 pts/4    S+   14:17   0:00 python3 -m colout.colout -s Xml
    

    Doing

    $ sudo strace -p 14890
    

    reveals that this process is doing read(0.

    colout was installed from GitHub. OS is Ubuntu 16.04.

    opened by i-ky 0
  • `colout` is missing the `gray` color

    `colout` is missing the `gray` color

    In some version of colout, I was able to write:

    cat /proc/misc | colout cpu gray
    

    And have the output formatted as gray. However, today it seems unable:

    # cat /proc/misc | colout cpu gray
    234 btrfs-control
     56 memory_bandwidth
     57 network_throughput
     58 network_latency
    [colout] ERROR: Unknown color: gray (maybe you forgot to install python3-pygments?)
    
    

    Neither 0.6.1-3~xenial7 nor 0.6.2.dev21+g70bec38 (aka stdedos/[email protected] aka nojhan/[email protected] + 2) seem to contain it.

    # colout -r all
    STYLES: blink, bold, conceal, faint, italic, normal, rapid_blink, reverse, underline
    COLORS: black, blue, cyan, green, magenta, none, orange, purple, red, white, yellow
    SPECIAL: colormap, Hash, hash, Random, random, Scale, scale
    THEMES: clang, cmake, configure, ctest, g++, javac, json, latex, ninja, perm, python, valgrind
    COLORMAPS: Default, default, Hash, hash, jet72, Rainbow, rainbow, Random, random, Scale, scale, Spectrum, spectrum
    SYNTAX COLORING: abap, abnf, ada, adl, agda, aheui, ahk, alloy, ampl, antlr-as, antlr-cpp, antlr-csharp, antlr-java, antlr-objc, antlr-perl, antlr-python, antlr-ruby, antlr, apacheconf, apl, applescript, arduino, as3, as, aspectj, aspx-cs, aspx-vb, asy, at, autoit, awk, basemake, bash, bat, bbcode, bc, befunge, bib, blitzbasic, blitzmax, bnf, boo, boogie, brainfuck, bro, bst, bugs, c-objdump, ca65, cadl, camkes, capdl, capnp, cbmbas, c, ceylon, cfc, cfengine3, cfm, cfs, chai, chapel, cheetah, cirru, clay, clean, clojure, clojurescript, cmake, cobol, cobolfree, coffee-script, common-lisp, componentpascal, console, control, coq, cpp-objdump, cpp, cpsa, cr, crmsh, croc, cryptol, csharp, csound-document, csound-score, csound, css+django, css+erb, css+genshitext, css+lasso, css+mako, css+mozpreproc, css+myghty, css+php, css+smarty, css, cucumber, cuda, cypher, cython, d-objdump, dart, d, delphi, dg, diff, django, docker, doscon, dpatch, dtd, duel, dylan-console, dylan-lid, dylan, earl-grey, easytrieve, ebnf, ec, ecl, eiffel, elixir, elm, emacs, erb, erlang, erl, evoque, extempore, ezhil, factor, fancy, fan, felix, fish, flatline, forth, fortranfixed, fortran, foxpro, fsharp, gap, gas, genshi, genshitext, glsl, gnuplot, go, golo, gooddata-cl, gosu, groff, groovy, gst, haml, handlebars, haskell, haxeml, hexdump, hsail, html+cheetah, html+django, html+evoque, html+genshi, html+handlebars, html+lasso, html+mako, html+myghty, html+ng2, html+php, html+smarty, html+twig, html+velocity, html, http, hx, hybris, hylang, i6t, idl, idris, iex, igor, inform6, inform7, ini, io, ioke, irc, isabelle, jags, jasmin, java, javascript+mozpreproc, jcl, j, jlcon, js+cheetah, js+django, js+erb, js+genshitext, js+lasso, js+mako, js+myghty, js+php, js+smarty, jsgf, js, json-object, json, jsonld, jsp, julia, juttle, kal, kconfig, koka, kotlin, lagda, lasso, lcry, lean, less, lhs, lidr, lighty, limbo, liquid, live-script, llvm, logos, logtalk, lsl, lua, make, mako, maql, mask, mason, mathematica, matlab, matlabsession, md, minid, modelica, modula2, monkey, monte, moocode, moon, mozhashpreproc, mozpercentpreproc, mql, mscgen, mupad, mxml, myghty, mysql, nasm, ncl, nemerle, nesc, newlisp, newspeak, ng2, nginx, nim, nit, nixos, nsis, numpy, nusmv, objdump-nasm, objdump, objective-c++, objective-c, objective-j, ocaml, octave, odin, ooc, opa, openedge, pacmanconf, pan, parasail, pawn, perl6, perl, php, pig, pike, pkgconfig, plpgsql, postgresql, postscript, pot, pov, powershell, praat, prolog, properties, protobuf, ps1con, psql, pug, puppet, py3tb, pycon, pypylog, pytb, python3, python, qbasic, qml, qvto, racket, ragel-cpp, ragel-c, ragel-d, ragel-em, ragel-java, ragel-objc, ragel-ruby, ragel, raw, rbcon, rb, rconsole, rd, rebol, redcode, red, registry, resource, rexx, rhtml, rnc, roboconf-graph, roboconf-instances, robotframework, rql, rsl, rst, rts, rust, sas, sass, scala, scaml, scheme, scilab, sc, scss, shen, silver, slim, smali, smalltalk, smarty, sml, snobol, snowball, sourceslist, sparql, spec, splus, sp, sqlite3, sql, squidconf, ssp, stan, stata, swift, swig, systemverilog, tads3, tap, tasm, tcl, tcshcon, tcsh, tea, termcap, terminfo, terraform, tex, text, thrift, todotxt, trac-wiki, treetop, tsql, ts, turtle, twig, typoscriptcssdata, typoscripthtmldata, typoscript, urbiscript, vala, vb.net, vclsnippets, vcl, vctreestatus, velocity, verilog, vgl, vhdl, vim, wdiff, whiley, x10, xml+cheetah, xml+django, xml+erb, xml+evoque, xml+lasso, xml+mako, xml+myghty, xml+php, xml+smarty, xml+velocity, xml, xquery, xslt, xtend, xul+mozpreproc, yaml+jinja, yaml, zephir
    

    Output differs slightly between computers

    I could assume it is a python3-pygments issue, but I have no idea how to verify or "why" this happened.


    I know I could do something like cat /proc/misc | colout cpu '#xxxxxx' for x in [0-9a-f], but that is besides the point

    opened by stdedos 0
  • `pip install colout` is broken for everyone

    `pip install colout` is broken for everyone

    setup.py tries to read 'README.md', but no such file exists in the source dist package on PyPI.

    $ python3.7 -mpip install --user colout
    Collecting colout
      Downloading https://files.pythonhosted.org/packages/3d/ba/3ef31c0df3ace69271cc8b1af6b529f24de66ff42c0d99a8d18aa980a307/colout-0.5.tar.gz (47kB)
        100% |████████████████████████████████| 51kB 736kB/s 
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-install-gfp0x0mf/colout/setup.py", line 25, in <module>
            long_description=open('README.md').read(),
        FileNotFoundError: [Errno 2] No such file or directory: 'README.md'
        
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-gfp0x0mf/colout/
    

    This is not limited to py3.7. Earlier versions fail in the same way.

    opened by tartley 16
  • The

    The "make" theme should be extracted out of the "cmake" theme

    CMake can use different backends, like make, ninja or other IDEs project files. Colout already has a separate theme for ninja, it should be the same for make.

    Cf. https://github.com/nojhan/colout/blob/master/colout/colout_cmake.py

    bug help wanted good first issue 
    opened by nojhan 0
  • User-defined colormaps do not handle background

    User-defined colormaps do not handle background

    echo "pim pam poum"|colout -c p red,green.red
    [colout] ERROR: Unknown color: green.red (maybe you forgot to install python3-pygments?)
    
    bug 
    opened by nojhan 0
  • UnicodeEncodeError when using `less -R`

    UnicodeEncodeError when using `less -R`

    I get an UnicodeEncodeError when I use colout with less -R. When I use less without options or just don't use less at all, everything goes fine:

    $ cat svn-diff.txt | colout -s diff | less
    $ cat svn-diff.txt | colout -s diff
    

    But if I add -R option so that ascii escape sequences wouldn't be striped, I get this:

    $ cat svn-diff.txt | colout -s diff | less -R
    
    Index: generate_fountain.py
    Traceback (most recent call last):
      File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
        "__main__", fname, loader, pkg_name)
      File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
        exec code in run_globals
      File "/usr/local/lib/python2.7/dist-packages/colout/colout.py", line 862, in <module>
        write_all( as_all, sys.stdin, sys.stdout, highlight, lexer, formatter )
      File "/usr/local/lib/python2.7/dist-packages/colout/colout.py", line 729, in write_all
        map_write( stream_in, stream_out, function, *args )
      File "/usr/local/lib/python2.7/dist-packages/colout/colout.py", line 574, in map_write
        write( function(item, *args), stream_out )
      File "/usr/local/lib/python2.7/dist-packages/colout/colout.py", line 545, in write
        stream.write(colored)
    UnicodeEncodeError: 'ascii' codec can't encode character u'\u0412' in position 16: ordinal not in range(128)
    ===================================================================
    --- generate_fountain.py        (revision 1294)
    +++ generate_fountain.py        (working copy)
    @@ -5,7 +5,7 @@
    

    svn-diff.txt contains several non-ascii characters.

    question 
    opened by while0pass 1
  • Use the Cubehelix rainbow by default

    Use the Cubehelix rainbow by default

    http://bl.ocks.org/mbostock/310c99e53880faec2434

    enhancement help wanted good first issue 
    opened by nojhan 0
  • Add a way to reverse colormaps

    Add a way to reverse colormaps

    Sometimes, one want to use a colormap in reverse order. For example with the scale special colormap. Should we add an option to reverse (all the colormaps used in a single call) or should we automatically generate reverse colormaps (scale => r:scale) or someting else?

    enhancement question 
    opened by nojhan 0
Owner
nojhan
Maker, scientist, researcher in artificial intelligence algorithmics, illustrator, author, hacker, wikipedian, free culture enthusiast.
nojhan
Corgy allows you to create a command line interface in Python, without worrying about boilerplate code

corgy Elegant command line parsing for Python. Corgy allows you to create a command line interface in Python, without worrying about boilerplate code.

Jayanth Koushik 4 Nov 21, 2021
Python Fire is a library for automatically generating command line interfaces (CLIs) from absolutely any Python object.

Python Fire Python Fire is a library for automatically generating command line interfaces (CLIs) from absolutely any Python object. Python Fire is a s

Google 20.4k Nov 23, 2021
Command line animations based on the state of the system

shell-emotions Command line animations based on the state of the system for Linux or Windows 10 The ascii animations were created using a modified ver

Simon Malave 61 Oct 21, 2021
Library for building powerful interactive command line applications in Python

Python Prompt Toolkit prompt_toolkit is a library for building powerful interactive command line applications in Python. Read the documentation on rea

prompt-toolkit 7.4k Dec 2, 2021
Cleo allows you to create beautiful and testable command-line interfaces.

Cleo Create beautiful and testable command-line interfaces. Cleo is mostly a higher level wrapper for CliKit, so a lot of the components and utilities

Sébastien Eustace 776 Nov 26, 2021
Pythonic command line arguments parser, that will make you smile

docopt creates beautiful command-line interfaces Video introduction to docopt: PyCon UK 2012: Create *beautiful* command-line interfaces with Python N

null 7.5k Nov 25, 2021
Python Command-line Application Tools

Clint: Python Command-line Interface Tools Clint is a module filled with a set of awesome tools for developing commandline applications. C ommand L in

Kenneth Reitz Archive 61 Nov 24, 2021
prompt_toolkit is a library for building powerful interactive command line applications in Python.

Python Prompt Toolkit prompt_toolkit is a library for building powerful interactive command line applications in Python. Read the documentation on rea

prompt-toolkit 7.4k Dec 2, 2021
Textual is a TUI (Text User Interface) framework for Python using Rich as a renderer.

Textual is a TUI (Text User Interface) framework for Python using Rich as a renderer. The end goal is to be able to rapidly create rich termin

Will McGugan 6.2k Nov 27, 2021
sane is a command runner made simple.

sane is a command runner made simple.

Miguel M. 14 Jul 24, 2021
Simple cross-platform colored terminal text in Python

Colorama Makes ANSI escape character sequences (for producing colored terminal text and cursor positioning) work under MS Windows. PyPI for releases |

Jonathan Hartley 2.6k Dec 2, 2021
Rich is a Python library for rich text and beautiful formatting in the terminal.

Rich 中文 readme • lengua española readme • Läs på svenska Rich is a Python library for rich text and beautiful formatting in the terminal. The Rich API

Will McGugan 31.1k Nov 23, 2021
A cross platform package to do curses-like operations, plus higher level APIs and widgets to create text UIs and ASCII art animations

ASCIIMATICS Asciimatics is a package to help people create full-screen text UIs (from interactive forms to ASCII animations) on any platform. It is li

null 2.9k Nov 24, 2021
Generate generic activity streams from the actions on your site. Users can follow any actors' activities for personalized streams.

Django Activity Stream What is Django Activity Stream? Django Activity Stream is a way of creating activities generated by the actions on your site. I

Justin Quick 2k Nov 28, 2021
Evidence enables analysts to deliver a polished business intelligence system using SQL and markdown.

Evidence enables analysts to deliver a polished business intelligence system using SQL and markdown

null 582 Dec 2, 2021
Adversarial Color Enhancement: Generating Unrestricted Adversarial Images by Optimizing a Color Filter

ACE Please find the preliminary version published at BMVC 2020 in the folder BMVC_version, and its extended journal version in Journal_version. Datase

null 25 Nov 17, 2021
Convert three types of color in your clipboard and paste it to the color property (gamma correct)

ColorPaster [Blender Addon] Convert three types of color in your clipboard and paste it to the color property (gamma correct) How to Use Hover your mo

null 11 Sep 20, 2021
Color Picker and Color Detection tool for METR4202

METR4202 Color Detection Help This is sample code that can be used for the METR4202 project demo. There are two files provided, both running on Python

Miguel Valencia 1 Oct 23, 2021
PyGtk Color - A couple of python scripts to select a color (for scripting usage)

Selection Scripts This repository contains two scripts to be used within a scripting project, to aquire a color value. Both scripts requir

Spiros Georgaras 1 Oct 31, 2021
A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Stream your favorite shows straight from the command line.

A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Installation pip install -r requirements.txt It use

Jonardon Hazarika 14 Nov 18, 2021
Print 'text color' and 'text format' on Term with Python

term-printer Print 'text color' and 'text format' on Term with Python ※ It may not work depending on the OS and shell used. PIP $ pip install term-pri

ななといつ 6 Jun 26, 2021
Deskew is a command line tool for deskewing scanned text documents. It uses Hough transform to detect "text lines" in the image. As an output, you get an image rotated so that the lines are horizontal.

Deskew by Marek Mauder https://galfar.vevb.net/deskew https://github.com/galfar/deskew v1.30 2019-06-07 Overview Deskew is a command line tool for des

Marek Mauder 95 Nov 16, 2021
coala provides a unified command-line interface for linting and fixing all your code, regardless of the programming languages you use.

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." ― John F. Woods coala provides a

coala development group 3.3k Nov 22, 2021
A supercharged AWS command line interface (CLI).

SAWS Motivation AWS CLI Although the AWS CLI is a great resource to manage your AWS-powered services, it's tough to remember usage of: 70+ top-level c

Donne Martin 4.9k Nov 25, 2021
A command line interface for accessing google drive

Drive Cli Get the ability to access Google Drive without leaving your terminal. Inspiration Google Drive has become a vital part of our day to day lif

Chirag Shetty 505 Nov 18, 2021
Universal Command Line Interface for Amazon Web Services

aws-cli This package provides a unified command line interface to Amazon Web Services. Jump to: Getting Started Getting Help More Resources Getting St

Amazon Web Services 11.7k Nov 25, 2021
Python composable command line interface toolkit

$ click_ Click is a Python package for creating beautiful command line interfaces in a composable way with as little code as necessary. It's the "Comm

The Pallets Projects 11.6k Nov 24, 2021
coala provides a unified command-line interface for linting and fixing all your code, regardless of the programming languages you use.

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." ― John F. Woods coala provides a

coala development group 3.3k Nov 22, 2021