[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how far can i go with grotty?
From: |
Marc Chantreux |
Subject: |
how far can i go with grotty? |
Date: |
Fri, 24 Jul 2020 19:46:21 +0200 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
hello roffers,
i wrote this filter
sed '
1i.TS\
tab(:);\
lB l l l.
$a.TE
' | tbl |groff -kTutf8 | sed '/^$/q'
so i can get readable tables as stdout of my shell scripts. i wrote it
as a hack but now i'm wondering ...
* I already know (using man command) that groff is good for positioning
* I just looked at the code of tty.cpp and it
seems to be able to deal with colors and SGR_REVERSE CSI "7m"
so i wonder if there would be a way to have some text macros to render
colored and reversed table headers when rendering in a terminal but
can also be used when i need some pdf docs.
also: i need "sed '/^$/q'" at the end of my filter because groff
renders a lot of empty lines at the end of the output whenever i
use b in my tbl format. i don't know how to remove it.
any tought (even to tell me how stupid my ideas are) are welcome.
regards
marc