Use glamour and termev to render/colorize content #181
No reviewers
Labels
No Label
kind/breaking
kind/bug
kind/build
kind/dependency
kind/deployment
kind/docs
kind
enhancement
kind
feature
kind/proposal
kind
question
kind
refactor
kind/security
kind/testing
kind/translation
priority/critical
priority/high
priority/low
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/has-backport
status/has-pull
status/needs-backport
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
upstream/sdk
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/tea#181
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "6543/tea:use-glamour"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. 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 contentNice!
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 19M