2023-05-17 05:15:01 +12:00
|
|
|
# boxes
|
|
|
|
|
|
|
|
> Draw, remove, and repair ASCII art boxes.
|
2024-01-19 22:15:01 -03:00
|
|
|
> More information: <https://boxes.thomasjensen.com/boxes-man-1.html>.
|
2023-05-17 05:15:01 +12:00
|
|
|
|
|
|
|
- Draw a box around a string:
|
|
|
|
|
|
|
|
`echo "{{string}}" | boxes`
|
|
|
|
|
2025-03-28 05:26:23 +02:00
|
|
|
- Remove a box from a string:
|
2023-05-17 05:15:01 +12:00
|
|
|
|
2025-03-28 05:26:23 +02:00
|
|
|
`echo "{{string}}" | boxes {{[-r|--remove]}}`
|
2023-05-17 05:15:01 +12:00
|
|
|
|
2025-03-28 05:26:23 +02:00
|
|
|
- Specify the box design:
|
2023-05-17 05:15:01 +12:00
|
|
|
|
2025-03-28 05:26:23 +02:00
|
|
|
`echo "{{string}}" | boxes {{[-d|--design]}} {{parchment}}`
|
2023-05-17 05:15:01 +12:00
|
|
|
|
2025-03-28 05:26:23 +02:00
|
|
|
- Specify the box size (in columns by lines):
|
2023-05-17 05:15:01 +12:00
|
|
|
|
2025-03-28 05:26:23 +02:00
|
|
|
`echo "{{string}}" | boxes {{[-s|--size]}} {{10}}x{{5}}`
|
2023-05-17 05:15:01 +12:00
|
|
|
|
2025-03-28 05:26:23 +02:00
|
|
|
- Align the box text [h]orizonally (at [l]eft, [c]enter or [r]ight):
|
2023-05-17 05:15:01 +12:00
|
|
|
|
2025-03-28 05:26:23 +02:00
|
|
|
`echo "{{string}}" | boxes {{[-a|--align]}} h{{l|c|r}}`
|
2024-02-19 11:13:42 -03:00
|
|
|
|
2025-03-28 05:26:23 +02:00
|
|
|
- Align the box text [v]ertically (at [t]op, [c]enter or [b]ottom):
|
2024-02-19 11:13:42 -03:00
|
|
|
|
2025-03-28 05:26:23 +02:00
|
|
|
`echo "{{string}}" | boxes {{[-a|--align]}} v{{t|c|b}}`
|
2024-02-19 11:13:42 -03:00
|
|
|
|
|
|
|
- [j]ustify the box text (at [l]eft, [c]enter or [r]ight):
|
|
|
|
|
2025-03-28 05:26:23 +02:00
|
|
|
`echo "{{string}}" | boxes {{[-a|--align]}} j{{l|c|r}}{{vt}}`
|