Boxes, chatgpt update

box

Needs ‘boxes’ and ‘lolcat’.

box () { echo "$*" | boxes -d simple -a hcvc | lolcat -p 50 }
  • -a hcvc # will center stuff
  • -p 50 # the amount of color spread, defaults to 3.

Example
example

Links:
Boxes https://boxes.thomasjensen.com/examples.html

Random findings

train

# colorful animated train
sl | lolcat

Nice unicode chars for rounded box

# this does look good in terminal
# ╭──────────────╮
# │     test     │
# ╰──────────────╯

Roundbox script

An attempt at roundbox script,

roundbox

Only single line text is supported.

Research

Multiline should be possible as well, get longest line first, something like

printf "woot\nwooot\nwoooot\n" | while read r; do; echo "${#r}| $r |"; done
4| woot |
5| wooot |
6| woooot |

ChatGPT multi-line roundbox script

Update: And chatgpt update that supposedly brings multi-line text into the game.

Example:

echo "NOOOOOOOOOOOO\n   WAAAAAAAAAAAAAAAY" | multibox
# returns:
╭───────────────────╮
│ NOOOOOOOOOOOO     │
│ WAAAAAAAAAAAAAAAY │
╰───────────────────╯