git.iko.soy/typeable/pandoc
on master help sign in
Documentation changes corresponding to r456.
9a37ee4fiddlosopher
README+21−9
@@ -176,20 +176,32 @@ may be used in Windows under Cygwin.)
176 markdown2pdf -o "My Book.pdf" chap1.txt chap2.txt chap3.txt
176 markdown2pdf -o "My Book.pdf" chap1.txt chap2.txt chap3.txt
177
177
178 If no input file is specified, input will be taken from STDIN.
178 If no input file is specified, input will be taken from STDIN.
179+ All of `pandoc`'s options will work with `markdown2pdf` as well.
179
180
1802. `html2markdown` grabs a web page from a file or URL and converts
1812. `html2markdown` grabs a web page from a file or URL and converts
181 it to markdown-formatted text, using `tidy` and `pandoc`.
182 it to markdown-formatted text, using `tidy` and `pandoc`.
182− Unless input is from STDIN, an attempt is made to determine the
183− character encoding of the page from the "Content-type" meta tag.
184− If this is not present, UTF-8 is assumed. Alternatively, a character
185− encoding may be specified explicitly using the `-e` option.
186
183
187− `html2markdown` searches for an available program (`wget`, `curl`,
184+ All of `pandoc`'s options will work with `html2markdown` as well.
188− or a text-mode browser) to fetch the contents of a URL.
185+ In addition, the following special options may be used.
189− Optionally, the `-g` command may be used to specify the command
186+ The special options must be separated from the `html2markdown`
190− to be used:
187+ command and any regular Pandoc options by the delimiter `--`:
191
188
189+ html2markdown -o out.txt -- -e latin1 -g curl google.com
190+
191+ The `-e` or `--encoding` option specifies the character encoding
192+ of the HTML input. If this option is not specified, and input
193+ is not from STDIN, `html2markdown` will attempt to determine the
194+ page's character encoding from the "Content-type" meta tag.
195+ If this is not present, UTF-8 is assumed.
196+
197+ The `-g` or `--grabber` option specifies the command to be used to
198+ fetch the contents of a URL:
199+
192− html2markdown -g 'wget --user=foo --password=bar' mysite.com
200+ html2markdown -g 'curl --user foo:bar' www.mysite.com
201+
202+ If this option is not specified, `html2markdown` searches for an
203+ available program (`wget`, `curl`, or a text-mode browser) to fetch
204+ the contents of a URL.
193
205
1943. `hsmarkdown` is designed to be used as a drop-in replacement for
2063. `hsmarkdown` is designed to be used as a drop-in replacement for
195 `Markdown.pl`. It forces `pandoc` to convert from markdown to
207 `Markdown.pl`. It forces `pandoc` to convert from markdown to
debian/changelog−3
@@ -210,9 +210,6 @@ pandoc (0.3) unstable; urgency=low
210 + getopts shell builtin is used for portable option parsing.
210 + getopts shell builtin is used for portable option parsing.
211 + Improved html2markdown's web grabber code, making it more robust,
211 + Improved html2markdown's web grabber code, making it more robust,
212 configurable and verbose. Added '-e', '-g' options.
212 configurable and verbose. Added '-e', '-g' options.
213− Possible use case:
214− # Use wget by setting timeout to 10 seconds and limit retries to 2.
215− html2markdown -g 'wget --timeout=10 --tries=2'
216
213
217 -- Recai Oktaş <roktas@debian.org> Fri, 05 Jan 2007 09:41:19 +0200
214 -- Recai Oktaş <roktas@debian.org> Fri, 05 Jan 2007 09:41:19 +0200
218
215
man/man1/html2markdown.1+19−22
@@ -2,7 +2,8 @@
2.SH NAME
2.SH NAME
3html2markdown \- converts HTML to markdown-formatted text
3html2markdown \- converts HTML to markdown-formatted text
4.SH SYNOPSIS
4.SH SYNOPSIS
5+\fBhtml2markdown\fR [\fIpandoc\-options\fR]
5−\fBhtml2markdown\fR [\fIoptions\fR] [\fIinput\-file\fR or \fIURL\fR]
6+[\-\- \fIspecial\-options\fR] [\fIinput\-file\fR or \fIURL\fR]
6.SH DESCRIPTION
7.SH DESCRIPTION
7\fBhtml2markdown\fR converts \fIinput\-file\fR or \fIURL\fR (or text
8\fBhtml2markdown\fR converts \fIinput\-file\fR or \fIURL\fR (or text
8from STDIN) from HTML to markdown\-formatted plain text.
9from STDIN) from HTML to markdown\-formatted plain text.
@@ -14,10 +15,12 @@ option.
14\fBhtml2markdown\fR uses the character encoding specified in the
15\fBhtml2markdown\fR uses the character encoding specified in the
15"Content-type" meta tag. If this is not present, or if input comes
16"Content-type" meta tag. If this is not present, or if input comes
16from STDIN, UTF-8 is assumed. A character encoding may be specified
17from STDIN, UTF-8 is assumed. A character encoding may be specified
17−explicitly using the \fB\-e\fR option.
18+explicitly using the \fB\-e\fR special option.
18−.PP
19−\fBhtml2markdown\fR is a wrapper for \fBpandoc\fR.
20.SH OPTIONS
19.SH OPTIONS
20+.PP
21+\fBhtml2markdown\fR is a wrapper for \fBpandoc\fR, so all of
22+\fBpandoc\fR's options may be used. See \fBpandoc\fR(1) for
23+a complete list. The following options are most relevant:
21.TP
24.TP
22.B \-s, \-\-standalone
25.B \-s, \-\-standalone
23Include title, author, and date information (if present) at the
26Include title, author, and date information (if present) at the
@@ -26,12 +29,6 @@ top of markdown output.
26.B \-o FILE, \-\-output=FILE
29.B \-o FILE, \-\-output=FILE
27Write output to \fIFILE\fR instead of STDOUT.
30Write output to \fIFILE\fR instead of STDOUT.
28.TP
31.TP
29−.B \-p, \-\-preserve-tabs
30−Preserve tabs instead of converting them to spaces.
31−.TP
32−.B \-\-tab-stop=\fITABSTOP\fB
33−Specify tab stop (default is 4).
34−.TP
35.B \-\-strict
32.B \-\-strict
36Use strict markdown syntax, with no extensions or variants.
33Use strict markdown syntax, with no extensions or variants.
37.TP
34.TP
@@ -54,29 +51,29 @@ Use contents of \fIFILE\fR
54as the document header (overriding the default header, which can be
51as the document header (overriding the default header, which can be
55printed using '\fBpandoc \-D markdown\fR'). Implies
52printed using '\fBpandoc \-D markdown\fR'). Implies
56\fB-s\fR.
53\fB-s\fR.
54+.SH "SPECIAL OPTIONS"
55+.PP
56+In addition, the following special options may be used. The special
57+options must be separated from the \fBhtml2markdown\fR command and any
58+regular \fBpandoc\fR options by the delimiter `\-\-', as in
59+.IP
60+.B html2markdown \-o foo.txt \-\- \-g 'curl \-u bar:baz' \-e latin1
61+.B www.foo.com
57.TP
62.TP
58−.B \-v, \-\-version
59−Print version.
60−.TP
61−.B \-h, \-\-help
62−Show usage message.
63−.TP
64−.B \-e \fIencoding\fR
63+.B \-e \fIencoding\fR, \-\-encoding=\fIencoding\fR
65Assume the character encoding \fIencoding\fR in reading HTML.
64Assume the character encoding \fIencoding\fR in reading HTML.
66(Note: \fIencoding\fR will be passed to \fBiconv\fR; a list of
65(Note: \fIencoding\fR will be passed to \fBiconv\fR; a list of
67available encodings may be obtained using `\fBiconv \-l\fR'.)
66available encodings may be obtained using `\fBiconv \-l\fR'.)
68−If the \fB\-e\fR option is not specified and input is not from
67+If this option is not specified and input is not from
69STDIN, \fBhtml2markdown\fR will try to extract the character encoding
68STDIN, \fBhtml2markdown\fR will try to extract the character encoding
70from the "Content-type" meta tag. If no character encoding is
69from the "Content-type" meta tag. If no character encoding is
71specified in this way, or if input is from STDIN, UTF-8 will be
70specified in this way, or if input is from STDIN, UTF-8 will be
72assumed.
71assumed.
73.TP
72.TP
74−.B \-g \fIcommand\fR
73+.B \-g \fIcommand\fR, \-\-grabber=\fIcommand\fR
75Use \fIcommand\fR to fetch the contents of a URL. (By default,
74Use \fIcommand\fR to fetch the contents of a URL. (By default,
76\fBhtml2markdown\fR searches for an available program or text-based
75\fBhtml2markdown\fR searches for an available program or text-based
77−browser to fetch the contents of a URL.) For example:
76+browser to fetch the contents of a URL.)
78−.IP
79−html2markdown \-g 'wget \-\-user=foo \-\-password=bar' mysite.com
80
77
81.SH "SEE ALSO"
78.SH "SEE ALSO"
82\fBpandoc\fR(1),
79\fBpandoc\fR(1),
man/man1/markdown2pdf.1+5−14
@@ -23,19 +23,16 @@ output through \fBiconv\fR:
23\fBmarkdown2pdf\fR assumes that the 'unicode' and 'fancyvrb' packages
23\fBmarkdown2pdf\fR assumes that the 'unicode' and 'fancyvrb' packages
24are in latex's search path. If these packages are not included in your
24are in latex's search path. If these packages are not included in your
25latex setup, they can be obtained from <http://ctan.org>.
25latex setup, they can be obtained from <http://ctan.org>.
26−.PP
27−\fBmarkdown2pdf\fR is a wrapper around \fBpandoc\fR.
28.SH OPTIONS
26.SH OPTIONS
27+.PP
28+\fBmarkdown2pdf\fR is a wrapper around \fBpandoc\fR, so all of
29+\fBpandoc\fR's options can be used with \fBmarkdown2pdf\fR as well.
30+See \fBpandoc\fR(1) for a complete list.
31+The following options are most relevant:
29.TP
32.TP
30.B \-o FILE, \-\-output=FILE
33.B \-o FILE, \-\-output=FILE
31Write output to \fIFILE\fR.
34Write output to \fIFILE\fR.
32.TP
35.TP
33−.B \-p, \-\-preserve-tabs
34−Preserve tabs instead of converting them to spaces.
35−.TP
36−.B \-\-tab-stop=\fITABSTOP\fB
37−Specify tab stop (default is 4).
38−.TP
39.B \-\-strict
36.B \-\-strict
40Use strict markdown syntax, with no extensions or variants.
37Use strict markdown syntax, with no extensions or variants.
41.TP
38.TP
@@ -57,12 +54,6 @@ Include (LaTeX) contents of \fIFILE\fR at the end of the document body.
57Use contents of \fIFILE\fR
54Use contents of \fIFILE\fR
58as the LaTeX document header (overriding the default header, which can be
55as the LaTeX document header (overriding the default header, which can be
59printed using '\fBpandoc \-D latex\fR'). Implies \fB-s\fR.
56printed using '\fBpandoc \-D latex\fR'). Implies \fB-s\fR.
60−.TP
61−.B \-v, \-\-version
62−Print version.
63−.TP
64−.B \-h, \-\-help
65−Show usage message.
66.SH "SEE ALSO"
57.SH "SEE ALSO"
67\fBpandoc\fR(1),
58\fBpandoc\fR(1),
68\fBpdflatex\fR(1)
59\fBpdflatex\fR(1)