rad

A super easy console highlighter. Text goes in, color comes out.
Download

rad Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Publisher Name:
  • Rob O'Dwyer
  • Publisher web site:
  • http://github.com/robbles/

rad Tags


rad Description

A super easy console highlighter. Text goes in, color comes out. rad is a super easy console highlighter. Text goes in, color comes out. rad can be used to process the output of commands, or to highlight single files.How it worksrad will read the file given with --file/-f, or stdin if omitted.Highlighting is specified with re-usable colorer files. Colorer files are written in YAML. They contain a collection of rules like this:"regex": fore: green back: black style: normalor this:regex: {fore: red, back: white, style: bright}and are stored in ~/.rad/ by default. The simplest way to use rad is to give it the names of one or more colorers, like so:$ echo "this is a test" | rad colorer1 colorer2and all rules in the colorers ~/.rad/colorer1.yaml and ~/.rad/colorer2.yaml will be applied to the input text in order!rad can also make these files for you interactively, using the --new/-n option:$ rad -nColorer name for this rule: logsPattern to match: ERRORForeground color : redBackground color :Style :$ tail -f log.txt | rad logsColorer files will be appended to, so you can quickly build a colorer with a bunch of rules by running this a few times. Requirements: · Python


rad Related Software