print-cli

2.0.0 • Public • Published

Print CLI

npm npm npm npm npm

GitHub tag GitHub release GitHub issues GitHub pull requests GitHub license

Build Status Build status codecov Quality Gate Lines of Code

Bugs Code Smells Critical Violations Blocker Violations Technical Debt Ratio

Security Ratings Reliability Ratings Maintainability Ratings

node David David David

GitHub forks GitHub stars GitHub watchers

Generate a printable representation of ASCII text. Thanks to Figlet. Try it here

intro

Table of Contents

Installation

Global CLI

    $ npm install -g print-cli

Non CLI

    $ npm install --save print-cli

Usage

$ print-cli --banner --font slant "Hello World"
       __  __       __ __          _       __              __     __
      / / / /___   / // /____     | |     / /____   _____ / /____/ /
     / /_/ // _ \ / // // __ \    | | /| / // __ \ / ___// // __  /
    / __  //  __// // // /_/ /    | |/ |/ // /_/ // /   / // /_/ /
   /_/ /_/ \___//_//_/ \____/     |__/|__/ \____//_/   /_/ \__,_/

Non CLI

var print = require("print-cli");

print.PRINT({
  text: "",
  isBanner: true | false,
  font: "standard|doom|slant|bell|chunky",
  color: "blue|black|cyan|green|grey|magenta|red|white|yellow",
  bgColor: "bgBlack|bgBlue|bgCyan|bgGreen|bgMagenta|bgRed|bgWhite|bgYellow"
});
import { PRINT } from "print-cli";

PRINT({
  text: "",
  isBanner: true | false,
  font: "standard|doom|slant|bell|chunky",
  color: "blue|black|cyan|green|grey|magenta|red|white|yellow",
  bgColor: "bgBlack|bgBlue|bgCyan|bgGreen|bgMagenta|bgRed|bgWhite|bgYellow"
});

NPM Script

// package.json
{
  "scripts": {
    "print-banner": "./bin/print-cli -b -font standard -c green \"print-cli\""
  }
}
$ npm run print-banner

> print-cli@1.4.4 print-banner /Users/a565550/git/print-cli
> ./bin/print-cli -b -font standard -c green "print-cli"
               _         _                _  _
  _ __   _ __ (_) _ __  | |_         ___ | |(_)
 | '_ \ | '__|| || '_ \ | __|_____  / __|| || |
 | |_) || |   | || | | || |_|_____|| (__ | || |
 | .__/ |_|   |_||_| |_| \__|       \___||_||_|
 |_|

Options

help (-h|--help)

  • specifies how to use print-cli
$ print-cli --help

  Usage: print-cli [options] [text]


  Options:

        --version              output the version number
    -b  --banner               print banner in ASCII style
    -f  --font [font]          font used to print text [standard|doom|slant|bell|chunky]
    -c  --color [color]        color of the printed text [blue|black|cyan|green|grey|magenta|red|white|yellow|rainbow|zebra|america]
        --bg-color [bg color]  background color of the printed text [bgBlack|bgBlue|bgCyan|bgGreen|bgMagenta|bgRed|bgWhite|bgYellow]
    -h, --help                 output usage information

  Examples:

    $ print-cli --color red "print banner"
    $ print-cli --help

enableBanner (-b|--banner)

  • specifies to enable ASCII banner

font (-f|--font)

  • specifies font used to print the banner
    • standard (default)
    • doom
    • slant
    • bell
    • chunky

Fonts-Usage

color (-c|--color)

  • specifies color of the text being printed
    • blue
    • black
    • cyan
    • green
    • grey
    • magenta
    • red
    • white
    • yellow
    • rainbow
    • zebra
    • america

Colors-Usage

background color (--bg-color)

  • specifies background color of the printed text
    • bgBlack
    • bgBlue
    • bgCyan
    • bgGreen
    • bgMagenta
    • bgRed
    • bgWhite
    • bgYellow

Background-Colors-Usage

Updating print-cli

Global package:

    $ npm uninstall -g print-cli
    $ npm cache clean
    $ npm install -g print-cli@latest

License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Readme

Keywords

Package Sidebar

Install

npm i print-cli

Weekly Downloads

114

Version

2.0.0

License

MIT

Unpacked Size

17.1 kB

Total Files

5

Last publish

Collaborators

  • smallela