Metadata-Version: 2.1
Name: cs.ansi_colour
Version: 20180726
Summary: Convenience functions for ANSI terminal colour sequences
Home-page: https://bitbucket.org/cameron_simpson/css/commits/all
Author: Cameron Simpson
Author-email: cs@cskk.id.au
License: UNKNOWN
Description: Mapping and function for adding ANSI terminal colour escape sequences
        to strings for colour highlighting of output.
        
        ## Function `colourise(s, colour=None, uncolour='normal')`
        
        Return a string enclosed in colour-on and colour-off ANSI sequences.
        
        * `colour`: names the desired ANSI colour.
        * `uncolour`: may be used to specify the colour-off colour;
          the default is 'normal'.
        
        ## Function `colourise_patterns(s, patterns, default_colour=None)`
        
        Colourise a string according to patterns.
        
        * `s`: the string
        * `patterns`: a sequence of patterns
        * `default_colour`: if a string pattern has no colon, or starts
          with a colon, use this colour; default DEFAULT_HIGHLIGHT
        
        Each pattern may be:
        * a string of the form "[colour]:regexp"
        * a string containing no colon, taken to be a regexp
        * a tuple of the form (colour, regexp)
        * a regexp object
        
        Returns the string with ANSI colour escapes embedded.
        
        ## Function `make_pattern(pattern, default_colour=None)`
        
        Convert a pattern specification into a (colour, regexp) tuple.
        
        Each pattern may be:
        * a string of the form "[colour]:regexp"
        * a string containing no colon, taken to be a regexp
        * a tuple of the form (colour, regexp)
        * a regexp object
        
        ## Function `make_patterns(patterns, default_colour=None)`
        
        Convert an iterable of pattern specifications into a list of
        (colour, regexp) tuples.
        
        Each pattern may be:
        * a string of the form "[colour]:regexp"
        * a string containing no colon, taken to be a regexp
        * a tuple of the form (colour, regexp)
        * a regexp object
Keywords: python2,python3
Platform: UNKNOWN
Classifier: Development Status :: 6 - Mature
Classifier: Environment :: Console
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Terminals
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Description-Content-Type: text/markdown
