git.iko.soy/typeable/pandoc
on master help sign in
Documentation changes corresponding to r456.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@457 788f1e2b-df1e-0410-8736-df70ead52e1b

commit9a37ee459cafd70310d732e600a73ccfdfe2cbb8 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateMon 8 Jan 2007, 21:16 (20 years ago) parent58697eb
4 files changed+45−48
README+21−9 debian/changelog−3 man/man1/html2markdown.1+19−22 man/man1/markdown2pdf.1+5−14
README+21−9
@@ -176,20 +176,32 @@ may be used in Windows under Cygwin.)
176176 markdown2pdf -o "My Book.pdf" chap1.txt chap2.txt chap3.txt
177177
178178 If no input file is specified, input will be taken from STDIN.
179+ All of `pandoc`'s options will work with `markdown2pdf` as well.
179180
1801812. `html2markdown` grabs a web page from a file or URL and converts
181182 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.
186183
187− `html2markdown` searches for an available program (`wget`, `curl`,
188− or a text-mode browser) to fetch the contents of a URL.
189− Optionally, the `-g` command may be used to specify the command
190− to be used:
184+ All of `pandoc`'s options will work with `html2markdown` as well.
185+ In addition, the following special options may be used.
186+ The special options must be separated from the `html2markdown`
187+ command and any regular Pandoc options by the delimiter `--`:
191188
192− html2markdown -g 'wget --user=foo --password=bar' mysite.com
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+
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.
193205
1942063. `hsmarkdown` is designed to be used as a drop-in replacement for
195207 `Markdown.pl`. It forces `pandoc` to convert from markdown to
debian/changelog−3
@@ -210,9 +210,6 @@ pandoc (0.3) unstable; urgency=low
210210 + getopts shell builtin is used for portable option parsing.
211211 + Improved html2markdown's web grabber code, making it more robust,
212212 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'
216213
217214 -- Recai Oktaş <roktas@debian.org> Fri, 05 Jan 2007 09:41:19 +0200
218215
man/man1/html2markdown.1+19−22
@@ -2,7 +2,8 @@
22.SH NAME
33html2markdown \- converts HTML to markdown-formatted text
44.SH SYNOPSIS
5−\fBhtml2markdown\fR [\fIoptions\fR] [\fIinput\-file\fR or \fIURL\fR]
5+\fBhtml2markdown\fR [\fIpandoc\-options\fR]
6+[\-\- \fIspecial\-options\fR] [\fIinput\-file\fR or \fIURL\fR]
67.SH DESCRIPTION
78\fBhtml2markdown\fR converts \fIinput\-file\fR or \fIURL\fR (or text
89from STDIN) from HTML to markdown\-formatted plain text.
@@ -14,10 +15,12 @@ option.
1415\fBhtml2markdown\fR uses the character encoding specified in the
1516"Content-type" meta tag. If this is not present, or if input comes
1617from STDIN, UTF-8 is assumed. A character encoding may be specified
17−explicitly using the \fB\-e\fR option.
18−.PP
19−\fBhtml2markdown\fR is a wrapper for \fBpandoc\fR.
18+explicitly using the \fB\-e\fR special option.
2019.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:
2124.TP
2225.B \-s, \-\-standalone
2326Include title, author, and date information (if present) at the
@@ -26,12 +29,6 @@ top of markdown output.
2629.B \-o FILE, \-\-output=FILE
2730Write output to \fIFILE\fR instead of STDOUT.
2831.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
3532.B \-\-strict
3633Use strict markdown syntax, with no extensions or variants.
3734.TP
@@ -54,29 +51,29 @@ Use contents of \fIFILE\fR
5451as the document header (overriding the default header, which can be
5552printed using '\fBpandoc \-D markdown\fR'). Implies
5653\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
5762.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
6564Assume the character encoding \fIencoding\fR in reading HTML.
6665(Note: \fIencoding\fR will be passed to \fBiconv\fR; a list of
6766available 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
6968STDIN, \fBhtml2markdown\fR will try to extract the character encoding
7069from the "Content-type" meta tag. If no character encoding is
7170specified in this way, or if input is from STDIN, UTF-8 will be
7271assumed.
7372.TP
74−.B \-g \fIcommand\fR
73+.B \-g \fIcommand\fR, \-\-grabber=\fIcommand\fR
7574Use \fIcommand\fR to fetch the contents of a URL. (By default,
7675\fBhtml2markdown\fR searches for an available program or text-based
77−browser to fetch the contents of a URL.) For example:
78−.IP
79−html2markdown \-g 'wget \-\-user=foo \-\-password=bar' mysite.com
76+browser to fetch the contents of a URL.)
8077
8178.SH "SEE ALSO"
8279\fBpandoc\fR(1),
man/man1/markdown2pdf.1+5−14
@@ -23,19 +23,16 @@ output through \fBiconv\fR:
2323\fBmarkdown2pdf\fR assumes that the 'unicode' and 'fancyvrb' packages
2424are in latex's search path. If these packages are not included in your
2525latex setup, they can be obtained from <http://ctan.org>.
26−.PP
27−\fBmarkdown2pdf\fR is a wrapper around \fBpandoc\fR.
2826.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:
2932.TP
3033.B \-o FILE, \-\-output=FILE
3134Write output to \fIFILE\fR.
3235.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
3936.B \-\-strict
4037Use strict markdown syntax, with no extensions or variants.
4138.TP
@@ -57,12 +54,6 @@ Include (LaTeX) contents of \fIFILE\fR at the end of the document body.
5754Use contents of \fIFILE\fR
5855as the LaTeX document header (overriding the default header, which can be
5956printed 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.
6657.SH "SEE ALSO"
6758\fBpandoc\fR(1),
6859\fBpdflatex\fR(1)