diff options
| author | Tong Sun <[email protected]> | 2023-05-02 23:28:24 -0400 |
|---|---|---|
| committer | Tong Sun <[email protected]> | 2023-05-02 23:38:45 -0400 |
| commit | 094a51466efe1a0463891307d46da8d95db8f6da (patch) | |
| tree | d381211c30ac2c4c1440bf187b6668663e1725ec | |
| parent | - [+] add --opt-escape-mode; build with latest; closes #2 #4 #8 (diff) | |
| download | html2md-094a51466efe1a0463891307d46da8d95db8f6da.tar.xz html2md-094a51466efe1a0463891307d46da8d95db8f6da.zip | |
- [#] prepare for separated README
| -rw-r--r-- | README.e.md | 62 |
1 files changed, 12 insertions, 50 deletions
diff --git a/README.e.md b/README.e.md index 2734bc2..fa4d7dc 100644 --- a/README.e.md +++ b/README.e.md @@ -1,13 +1,7 @@ -{{render "license/shields" . "License" "MIT"}} -{{template "badge/godoc" .}} -{{template "badge/goreport" .}} -{{template "badge/travis" .}} -[](http://godoc.org/github.com/go-easygen/wireframe) +## {{toc 5}} -# {{toc 5}} - -# {{.Name}} - HTML to Markdown converter +## {{.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. @@ -15,13 +9,13 @@ to convert HTML into Markdown, which is using an [HTML Parser](https://github.co  -# Usage +## Usage ### $ {{exec "html2md" | color "sh"}} -# Examples +### Examples -## Simplest form +#### Simplest form ```md $ html2md -i https://github.com/suntong/html2md | head -3 @@ -30,7 +24,7 @@ $ html2md -i https://github.com/suntong/html2md | head -3 [Homepage](https://github.com/) ``` -## Using goquery +#### 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. @@ -39,7 +33,7 @@ $ {{.Name}} -i https://github.com/JohannesKaufmann/html-to-markdown -s "div.Bord ``` -## The options and plugins +### The options and plugins Works as expected: @@ -59,7 +53,7 @@ $ echo 'Only <del>blue ones</del> <s> left</s>' | html2md -i --plugin-strikethro Only ~blue ones~ ~left~ ``` -## Testing the new table plugins +#### Testing the new table plugins ```sh $ cat $GOPATH/src/github.com/JohannesKaufmann/html-to-markdown/testdata/TestPlugins/table/input.html | html2md -i -T | head -6 @@ -92,47 +86,15 @@ $ cat $GOPATH/src/github.com/JohannesKaufmann/html-to-markdown/testdata/TestPlug + ``` -# Download/Install - - -## Download binaries - -- The latest binary executables are available right under the github release page -https://github.com/suntong/{{.Name}}/releases -as the result of the Continuous-Integration process. -- I.e., they are built during every git tagged push, automatically by [GitHub Actions](https://github.com/features/actions), right from the source code, truely WYSIWYG. -- The `.deb`, `.rpm` and `.apk` packages are readily available, as well as the executables for other Linux and Windows as well. -- Pick & choose the binary executable that suits your OS and its architecture. E.g., for Linux, it would most probably be the `{{.Name}}_ver_linux_amd64.tar.gz` file. -- Unzip it and put the executable somewhere in the PATH, after downloading it. - - -## Install Source - -To install the source code instead: - -``` -go get github.com/suntong/{{.Name}} -``` - -# Credits & Authors +## Credits -## Credits +### Credits -- [Johannes Kaufmann's html-to-markdown](github.com/JohannesKaufmann/html-to-markdown) that does the heavy lifting behind the scene. +- [Johannes Kaufmann's html-to-markdown](https://github.com/JohannesKaufmann/html-to-markdown) that does the heavy lifting behind the scene. -## Similar Projects +### Similar Projects - [turndown (js)](https://github.com/domchristie/turndown), a very good library written in javascript. - [lunny/html2md](https://github.com/lunny/html2md), which is using [regex instead of goquery](https://stackoverflow.com/a/1732454), which exhibits a few edge cases which prompted `github.com/JohannesKaufmann/html-to-markdown` - [jaytaylor/html2text](https://github.com/jaytaylor/html2text), which is not converting to markdown but plain text. - -## Author(s) & Contributor(s) - -Tong SUN - - -[](http://godoc.org/github.com/go-easygen/wireframe) -_Powered by_ [**WireFrame**](https://github.com/go-easygen/wireframe), the _one-stop wire-framing solution_ for Go cli based projects, from start to deploy. - -All patches welcome. |