print-cli
TypeScript icon, indicating that this package has built-in type declarations

2.1.2 • Public • Published

Print CLI

npm npm npm npm npm

GitHub tag GitHub release GitHub issues GitHub pull requests GitHub license

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

intro

Table of Contents

Installation

Global CLI

  $ npm i -g print-cli

Non CLI

  $ npm i print-cli

Usage

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

Non CLI

const { Printer } = require('print-cli');

Printer.printData('<text>', {
  banner: 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 { Printer } from 'print-cli';

Printer.printData('<text>', {
  banner: 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": "print-cli -b -f standard -c green \"print-cli\""
  }
}
$ npm run print-banner

> print-cli -b -f standard -c green "print-cli"
               _         _                _  _
  _ __   _ __ (_) _ __  | |_         ___ | |(_)
 | '_ \ | '__|| || '_ \ | __|_____  / __|| || |
 | |_) || |   | || | | || |_|_____|| (__ | || |
 | .__/ |_|   |_||_| |_| \__|       \___||_||_|
 |_|

Options

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:

  npx 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

none

Package Sidebar

Install

npm i print-cli

Weekly Downloads

102,821

Version

2.1.2

License

MIT

Unpacked Size

10.4 kB

Total Files

8

Last publish

Collaborators

  • tpt2dfw