mkdown

package
v0.0.0-...-64fca71 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Markdown2HTML = &gcli.Command{
	Name:    "md2html",
	UseFor:  "convert one or multi markdown file to html",
	Aliases: []string{"mkdown2html"},

	Func: mh.Handle,
	Config: func(c *gcli.Command) {
		c.BoolOpt(&mh.toc, "toc", "", false,
			"Generate a table of contents (implies --latex=false)")
		flag.BoolVar(&mh.tocOnly, "toconly", false,
			"Generate a table of contents only (implies -toc)")
		c.BoolOpt(&mh.page, "page", "", false,
			"Generate a standalone HTML page (implies --latex=false)")
		c.BoolOpt(&mh.latex, "latex", "", false,
			"Generate LaTeX output instead of HTML")

		c.BoolOpt(&mh.smartyPants, "smartypants", "", true,
			"Apply smartypants-style substitutions")
		c.BoolOpt(&mh.latexDashes, "latexdashes", "", true,
			"Use LaTeX-style dash rules for smartypants")
		c.BoolOpt(&mh.fractions, "fractions", "", true,
			"Use improved fraction rules for smartypants")
		c.BoolOpt(&mh.htmlSimple, "html-simple", "", true,
			"Sets HTML output to a simple, just bare minimum HTML tags and attributes")

		c.StrOpt(&mh.css, "css", "", "",
			"Link to a CSS stylesheet (implies --page)")
		c.StrOpt(&mh.output, "output", "", "",
			"the rendered content output, default output STDOUT")
		c.StrOpt(&mh.driver, "driver", "", "bf",
			`set the markdown renderer driver.
allow:
bf - blackfriday
gm - gomarkdown
gd - goldmark
`)

		c.AddArg("files", "the listed files will be render to html", false, true)

		mh.cmd = c
	},
}

Markdown2HTML Convert Markdown to HTML styles from https://github.com/facelessuser/MarkdownPreview

"image_path": "https://github.githubassets.com/images/icons/emoji/unicode/", "non_standard_image_path": "https://github.githubassets.com/images/icons/emoji/"

View Source
var Markdown2SQL = &gcli.Command{
	Name:    "md2sql",
	Aliases: []string{"mkdown2sql"},
	UseFor:  "convert an markdown table to create DB table SQL",
	Config: func(c *gcli.Command) {

	},
	Func: func(c *gcli.Command, _ []string) error {
		return errors.New("TODO")
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL