mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-08-28 04:46:29 -04:00
aebdb7f58745bec5d27b4d8f7e3b7396cb2ea947
Glamour
Write beautiful command-line tools with glamour!
glamour lets you use markdown
templates to render user-friendly & stylish output on ANSI
compatible terminals.
Usage
import "github.com/charmbracelet/glamour"
in := `# Hello World
This is a simple example of glamour!
Check out the [other examples](https://github.com/charmbracelet/glamour/tree/master/examples).
Bye!
`
out, _ := glamour.Render(in, "dark")
fmt.Print(out)
Custom Renderer
import (
"github.com/charmbracelet/glamour"
"github.com/charmbracelet/glamour/ansi"
)
r, _ := glamour.NewTermRenderer("dark", ansi.Options{
WordWrap: int(40),
})
out, _ := r.Render(in)
fmt.Print(out)
Glamourous Projects
Check out Glow, a markdown renderer for
the command-line, which uses glamour.
License
Languages
Go
98.5%
Shell
1.5%
