Use glamour and termev to render/colorize content #181
Merged
lunny
merged 9 commits from 6543/tea:use-glamour
into master
2 years ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch '6543/tea:use-glamour'
Deleting a branch is permanent. It CANNOT be undone. Continue?
close #146
close #49
use glamour to render markdon for detail views
and use glamour's dependency termev to colorize
use-glamourto Use glamour and termev to render/colorize content 2 years agoNice!
This renders badly on a light-themed terminal for me though.
You could use
termenv.HasDarkBackground()
to set the glamour theme to"light"
or"dark"
.Also, note that this feature increases build size from 17mb to 25mb. But I guess that's worth it..?
for me tea with all patches:
17M
(17694720b)wip: because of HasDarkBackground()
@noerw hope your terminal looks now nice too :)
@6543 nice, theming works well!
RE build size (with
go version go1.13.14 linux/amd64
):make
results in a 20M binary for me (current master is13M
)go build
results in a 25M binary (current master is17M
).Might be a go<=1.14 issue..?
@noerw go 1.15 was announced as creating smaller binaries, perhaps you could attempt building with that?
Can confirm, on go 1.15 production build is 17M (compared to 11M on master).
The point still stands, this feature increases build size by more than 50%.
Considering that 11M is already totally out of place for a simple CLI, 17M is not significantly worse I guess ¯\_(ツ)_/¯ But it somehow rubs me the wrong way
@noerw on the one hand storage space is cheep this days ...
on the other hand: look at the tools the unix time has given us (
140K /usr/bin/ls
) ...I think the 6Mb are worth it if we realy utilize this two libs
adding to mouch libs and blow up tea's binary on the other hand is bas
so I would considder only 3 legitime libs: markdown rendering (already include collor lib and syntax highliting lib), the sdk (include version lib) and in the future eventualy survey? (for interactive prompts)
@noerw with this and #186 the binary is 18M
gh
cli tool is 19M89e93d90b3
into master 2 years ago89e93d90b3
.