Skip to main content

Swag up your shell output with escape code magic!

Project description

Color your shell output with escape code magic.

Demo

Installation

pip install swag

Usage

usage: swag [-h] {print,install} ...

positional arguments:
  {print,install}  [command] help
    install        install the colors to the folder of choice
    print          prints the text with the specified color and type to the
                   console

optional arguments:
  -h, --help       show this help message and exit

Raw Usage

Use from code

from swag import colors
print colors.COLORS["red"], "This will be red"

Installation to a folder

From the commandline do

swag install -d <path/to/folder> # default is ~/.colors

This will install all the escape codes to the ~/.colors or folder.

Now you can use the colors directly from the console via:

echo $(cat ~/.colors/blue) This will be blue

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swag-1.1.0.tar.gz (17.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page