justify

package module
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2019 License: MIT Imports: 2 Imported by: 0

README

justify

text alignment in terminal

install

go get github.com/utgwkk/justify/cmd/justify

Usage

$ justify < input
# or
$ command | justify

Options

flag description
-aa Consider input as an ascii art

Examples

% cat input
これが そうか
この掌にあるものが

心か

% justify < input
                                                  これが そうか
                                               この掌にあるものが

                                                      心か

% cowsay Hello | ~/go/bin/justify -aa
                                           _______
                                          < Hello >
                                           -------
                                                  \   ^__^
                                                   \  (oo)\_______
                                                      (__)\       )\/\
                                                          ||----w |
                                                          ||     ||

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Center

func Center(cols int, text string) string

Center centerizes normal text in the terminal of `cols` columns.

func CenterASCIIArt added in v1.0.3

func CenterASCIIArt(cols int, text string) string

CenterASCIIArt centerizes an ASCII Art in the terminal of `cols` columns.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL