GithubHelp home page GithubHelp logo

alvarezmauro / styled-printf Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 84 KB

Do you want to add some styles ๐ŸŽจ to the output of your bash printf commands? Use this custom script and make the output of that printf look fanzy :bowtie:

License: Apache License 2.0

Shell 100.00%
bash bash-script

styled-printf's Introduction

styled-printf

Hex.pm npm

Do you want to add some styles ๐ŸŽจ to the output of your bash printf commands? Use this custom script and make the output of that printf look fanzy :bowtie:

How install

Using Yarn

yarn add styled-printf

Using NPM:

npm i styled-printf

How to use

The styled-printf command is like printf (in fact it's a function wrapping printf) that allows you to easily set the text styling, color and background color for the output.

Usage:

styled-printf [-s <text format>] [--style <text format>]
  [-c <color>] [--color <color>]
  [-b <color>] [-background-color <color>]
  format [argument]

Options:

Option Description Values
-s | --style Text formatting normal | bold | dim | italics | underline |
blink | reverse | hidden | password
-c | --color Text color default | white | black | red | green |
yellow | blue | magenta | cyan | gray |
light-red | light-green | light-yellow |
light-blue | light-magenta | light-cyan |
light-gray |

or a number between0 and 256
-b | --background-color Background color default | white | black | red | green |
yellow | blue | magenta | cyan | gray |
light-red | light-green | light-yellow |
light-blue | light-magenta | light-cyan |
light-gray |

or a number between0 and 256

Example

styled-printf -s bold -c blue -b yellow "%s\n" "This text is bold, red and has a blue background"

styled-printf output: text 'This text is bold, red and has a blue background' in blue color, bold and yellow background

Other flags:

-h | --help Display the help documentation
-t | --test Test all the different styles in your bash terminal

styled-printf's People

Contributors

alvarezmauro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.