{{render "license/shields" . "License" "MIT"}} {{template "badge/godoc" .}} {{template "badge/goreport" .}} {{template "badge/travis" .}} [](http://godoc.org/github.com/go-easygen/wireframe) # {{toc 5}} # {{.Name}} - HTML to Markdown converter The `{{.Name}}` makes use of `github.com/JohannesKaufmann/html-to-markdown` to convert HTML into Markdown, which is using an [HTML Parser](https://github.com/PuerkitoBio/goquery) to avoid the use of `regexp` as much as possible, which can prevent some [weird cases](https://stackoverflow.com/a/1732454) and allows it to be used for cases where the input is totally unknown.  # Usage ### $ {{exec "html2md" | color "sh"}} # Examples ## Simplest form ```md $ html2md -i https://github.com/suntong/html2md | head -3 [Skip to content](#start-of-content) [Homepage](https://github.com/) ``` ## Using goquery The most useful feature is to use and pass a [goquery](https://github.com/PuerkitoBio/goquery) selection to filter for the content you want. ```md $ {{.Name}} -i https://github.com/JohannesKaufmann/html-to-markdown -s "div.BorderGrid-row.hide-sm.hide-md > div" ``` ## The options and plugins Works as expected: ```sh $ echo 'Bold Text' | html2md -i **Bold Text** $ echo 'Bold Text' | html2md -i --opt-strong-delimiter="__" __Bold Text__ $ echo '