Popularity
0.5
Declining
Activity
0.0
Stable
0
3
0
Description
mold your templated to HTML/ TEXT to PDF easily.
Programming language: HTML
License: BSD 3-clause "New" or "Revised" License
Latest version: v0.1
mold alternatives and similar packages
Based on the "Command Line" category.
Alternatively, view mold alternatives based on common mentions on social networks and blogs.
-
urfave/cli
A simple, fast, and fun package for building command line apps in Go -
Rich Interactive Widgets for Terminal UIs
Terminal UI library with rich, interactive widgets — written in Golang -
go-prompt
Building powerful interactive prompts in Go, inspired by python-prompt-toolkit. -
survey
A golang library for building interactive and accessible prompts with full support for windows and posix terminals. -
tcell
Tcell is an alternate terminal package, similar in some ways to termbox, but better in others. -
cointop
A fast and lightweight interactive terminal based UI application for tracking cryptocurrencies 🚀 -
pterm
✨ #PTerm is a modern Go module to easily beautify console output. Featuring charts, progressbars, tables, trees, text input, select menus and much more 🚀 It's completely configurable and 100% cross-platform compatible. -
progressbar
A really basic thread-safe progress bar for Golang applications -
pflag
Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags. -
The Platinum Searcher
A code search tool similar to ack and the_silver_searcher(ag). It supports multi platforms and multi encodings. -
asciigraph
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies. -
readline
Readline is a pure go(golang) implementation for GNU-Readline kind library -
Git Town
Git workflow automation to keep branches in sync and reduce merge conflicts. -
dotenv-linter
⚡️Lightning-fast linter for .env files. Written in Rust 🦀 -
CLI Color
🎨 Terminal color rendering library, support 8/16 colors, 256 colors, RGB color rendering output, support Print/Sprintf methods, compatible with Windows. GO CLI 控制台颜色渲染工具库,支持16色,256色,RGB色彩渲染输出,使用类似于 Print/Sprintf,兼容并支持 Windows 环境的色彩渲染 -
flaggy
Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Promo
www.influxdata.com
Do you think we are missing an alternative of mold or a related project?
Popular Comparisons
README
mold
mold your templated to HTML/ TEXT/ PDF easily.
install
go get github.com/mayur-tolexo/mold
Example 1
//Todo model
type Todo struct {
Title string
Done bool
}
//TodoPageData model
type TodoPageData struct {
PageTitle string
Todos []Todo
}
func main() {
tmpl := `
<h1>{{.PageTitle}}<h1>
<ul>
{{range .Todos}}
{{if .Done}}
<li class="done">{{.Title}}</li>
{{else}}
<li>{{.Title}}</li>
{{end}}
{{end}}
</ul>
`
mold, _ := mold.NewHTMLTemplate(tmpl)
data := TodoPageData{
PageTitle: "My TODO list",
Todos: []Todo{
{Title: "Task 1", Done: false},
{Title: "Task 2", Done: true},
{Title: "Task 3", Done: true},
{Title: "Task 4", Done: true},
},
}
if err := mold.Execute(data); err == nil {
mold.PDF(".", "tmp.pdf")
} else {
fmt.Println(err)
}
}
Example 2
//Invoice details
type Invoice struct {
InvoiceNo string
InvoiceDate string
Currency string
AmountDue float64
Items []ItemDetail
Total float64
}
//ItemDetail : Item details
type ItemDetail struct {
Name string
Desc string
Amount float64
Qty int
Total float64
}
func main() {
mold, _ := mold.NewHTMLTemplate()
mold.HTMLPath = "invoice.html"
item := []ItemDetail{
{
Name: "Front End Consultation",
Desc: "Experience Review",
Amount: 150,
Qty: 4,
Total: 600,
},
}
data := Invoice{
InvoiceNo: "Invoice",
InvoiceDate: "January 1, 2019",
Currency: "Rs.",
AmountDue: 600,
Items: item,
Total: 600,
}
if err := mold.Execute(data); err == nil {
mold.PDF(".", "invoice.pdf")
} else {
fmt.Println(err)
}
}