1% HTML2MARKDOWN(1) Pandoc User Manuals
2% John MacFarlane and Recai Oktas
7html2markdown - converts HTML to markdown-formatted text
11html2markdown [*pandoc-options*] [\-- *special-options*] [*input-file* or
16`html2markdown` converts *input-file* or *URL* (or text
17from *stdin*) from HTML to markdown-formatted plain text.
18If a URL is specified, `html2markdown` uses an available program
19(e.g. wget, w3m, lynx or curl) to fetch its contents. Output is sent
20to *stdout* unless an output file is specified using the `-o`
23`html2markdown` uses the character encoding specified in the
24"Content-type" meta tag. If this is not present, or if input comes
25from *stdin*, UTF-8 is assumed. A character encoding may be specified
26explicitly using the `-e` special option.
30`html2markdown` is a wrapper for `pandoc`, so all of
31`pandoc`'s options may be used. See `pandoc`(1) for
32a complete list. The following options are most relevant:
35: Include title, author, and date information (if present) at the
36 top of markdown output.
38-o *FILE*, \--output=*FILE*
39: Write output to *FILE* instead of *stdout*.
42: Use strict markdown syntax, with no extensions or variants.
45: Use reference-style links, rather than inline links, in writing markdown
49: Parse untranslatable HTML codes as raw HTML.
52: Disable text wrapping in output. (Default is to wrap text.)
54-H *FILE*, \--include-in-header=*FILE*
55: Include contents of *FILE* at the end of the header. Implies
58-B *FILE*, \--include-before-body=*FILE*
59: Include contents of *FILE* at the beginning of the document body.
61-A *FILE*, \--include-after-body=*FILE*
62: Include contents of *FILE* at the end of the document body.
64-C *FILE*, \--custom-header=*FILE*
65: Use contents of *FILE*
66 as the document header (overriding the default header, which can be
67 printed using `pandoc -D markdown`). Implies `-s`.
71In addition, the following special options may be used. The special
72options must be separated from the `html2markdown` command and any
73regular `pandoc` options by the delimiter \``--`', as in
75 html2markdown -o foo.txt -- -g 'curl -u bar:baz' -e latin1 \
78-e *encoding*, \--encoding=*encoding*
79: Assume the character encoding *encoding* in reading HTML.
80 (Note: *encoding* will be passed to `iconv`; a list of
81 available encodings may be obtained using `iconv -l`.)
82 If this option is not specified and input is not from
83 *stdin*, `html2markdown` will try to extract the character encoding
84 from the "Content-type" meta tag. If no character encoding is
85 specified in this way, or if input is from *stdin*, UTF-8 will be
88-g *command*, \--grabber=*command*
89: Use *command* to fetch the contents of a URL. (By default,
90 `html2markdown` searches for an available program or text-based
91 browser to fetch the contents of a URL.)
95`pandoc`(1), `iconv`(1)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list