Sign in to PrePAN


User's Modules

App::ansicolumn ANSI sequence aware column command

I made this command to demonstrate Text::ANSI::Printf module, but it is getting to be more interesting tool.


column(1) compatible usage

$ ls -1 --color=always /usr/bin | ansicolumn

$ (printf "PERM LINKS OWNER GROUP SIZE MONTH DAY HH:MM/YEAR NAME\n" ; ls --color=always -l | sed 1d) | ansicolumn -t

Show DOCX document in 3up format

$ cpanm App::optex::textconv
$ optex -Mtextconv ansicolumn -DPC3 foo.docx | less

Show highlighted source code in 2up format

$ source-highlight -f esc -i lib/App/ | ansicolumn -PC2 | less


$ cpanm

kaz-utashiro@github 0 comments

Text::ANSI::Printf printf function for string with ANSI sequence

Text::ANSI::Printf is a almost-printf-compatible library with a capability of handling string with ANSI terminal sequences, as well as multi-byte wide characters.

This is just a quick hack using existing modules, Text::VisualPrintf and Text::ANSI::Fold::Util. Not tuned for performance. Most of complicated work is done in Text::ANSI::Fold module.

INSTALL: cpanm

kaz-utashiro@github 6 comments