2019-12-21 21:00:39 -05:00
2019-12-21 21:18:43 -05:00
2019-12-21 04:15:12 +01:00
2019-12-19 00:43:46 +01:00
2019-12-21 04:10:20 +01:00
2019-12-20 22:55:00 +01:00
2019-12-20 22:55:00 +01:00
2019-12-19 01:06:54 +01:00
2019-12-25 05:04:11 +01:00
2019-11-15 12:27:41 -06:00

Glamour

GoDoc Build Status Go ReportCard

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.Printf(out)

HelloWorld Example

Custom Renderer

import (
	"github.com/charmbracelet/glamour"
	"github.com/charmbracelet/glamour/ansi"
)

in := `# Custom Renderer

Word-wrapping will occur when lines exceed the limit of 40 characters. Just so
you know: Glamour's default word-wrapping limit is set to 100 characters per
line.

Bye!
`

r, _ := glamour.NewTermRenderer("dark", ansi.Options{
    WordWrap: int(40),
})

out, _ := r.Render(in)
fmt.Printf("%s", out)
}

Glamourous Projects

Check out Glow, a markdown renderer for the command-line, which uses glamour.

License

MIT

S
Description
A temporary, hacked together fork of Glamour v0.7.0 to reduce the startup time and binary size of MUTN while other solutions are evaluated.
Readme MIT
2.6 MiB
Languages
Go 98.5%
Shell 1.5%