git.iko.soy/typeable/pandoc
on master help sign in
+ Changed 'web2markdown' to 'html2markdown'.
3491420fiddlosopher
Makefile+1−1
@@ -25,7 +25,7 @@ EXECSBASE := $(shell sed -ne 's/^[Ee]xecutable:[[:space:]]*//p' $(CABAL).in)
25#-------------------------------------------------------------------------------
25#-------------------------------------------------------------------------------
26# Install targets
26# Install targets
27#-------------------------------------------------------------------------------
27#-------------------------------------------------------------------------------
28−WRAPPERS := web2markdown markdown2pdf
28+WRAPPERS := html2markdown markdown2pdf
29# Add .exe extensions if we're running Windows/Cygwin.
29# Add .exe extensions if we're running Windows/Cygwin.
30EXTENSION := $(shell uname | tr '[:upper:]' '[:lower:]' | \
30EXTENSION := $(shell uname | tr '[:upper:]' '[:lower:]' | \
31 sed -ne 's/^cygwin.*$$/\.exe/p')
31 sed -ne 's/^cygwin.*$$/\.exe/p')
README+9−9
@@ -38,14 +38,14 @@ Requirements
38The `pandoc` program itself does not depend on any external libraries
38The `pandoc` program itself does not depend on any external libraries
39or programs.
39or programs.
40
40
41−The wrapper script `web2markdown` requires
41+The wrapper script `html2markdown` requires
42
42
43 - `pandoc` (which must be in the PATH)
43 - `pandoc` (which must be in the PATH)
44 - a POSIX-compliant shell (installed by default on all linux and unix
44 - a POSIX-compliant shell (installed by default on all linux and unix
45 systems, including Mac OS X, and in [Cygwin] for Windows),
45 systems, including Mac OS X, and in [Cygwin] for Windows),
46 - `HTML Tidy`
46 - `HTML Tidy`
47 - `iconv` (for character encoding conversion). (If `iconv` is absent,
47 - `iconv` (for character encoding conversion). (If `iconv` is absent,
48− `web2markdown` will still work, but it will treat everything as UTF-8.)
48+ `html2markdown` will still work, but it will treat everything as UTF-8.)
49
49
50[Cygwin]: http://www.cygwin.com/
50[Cygwin]: http://www.cygwin.com/
51[HTML Tidy]: http://tidy.sourceforge.net/
51[HTML Tidy]: http://tidy.sourceforge.net/
@@ -117,7 +117,7 @@ But for simple documents it should be adequate. The `latex` and `html`
117readers are also limited in what they can do. Because the `html`
117readers are also limited in what they can do. Because the `html`
118reader is picky about the HTML it parses, it is recommended that you
118reader is picky about the HTML it parses, it is recommended that you
119pipe HTML through [HTML Tidy] before sending it to `pandoc`, or use the
119pipe HTML through [HTML Tidy] before sending it to `pandoc`, or use the
120−`web2markdown` script described below.
120+`html2markdown` script described below.
121
121
122If you don't specify a reader or writer explicitly, `pandoc` will
122If you don't specify a reader or writer explicitly, `pandoc` will
123try to determine the input and output format from the extensions of
123try to determine the input and output format from the extensions of
@@ -151,10 +151,10 @@ The shell scripts (described below) automatically convert the input
151from the local encoding to UTF-8 before running them through `pandoc`,
151from the local encoding to UTF-8 before running them through `pandoc`,
152then convert the output back to the local encoding.
152then convert the output back to the local encoding.
153
153
154−`markdown2pdf` and `web2markdown`
154+`markdown2pdf` and `html2markdown`
155−=================================
155+==================================
156
156
157−Two shell scripts, `markdown2pdf` and `web2markdown`, are included in
157+Two shell scripts, `markdown2pdf` and `html2markdown`, are included in
158the standard Pandoc installation. (They are not included in the Windows
158the standard Pandoc installation. (They are not included in the Windows
159binary package, as they require a POSIX shell, but they may be used
159binary package, as they require a POSIX shell, but they may be used
160in Windows under Cygwin.)
160in Windows under Cygwin.)
@@ -175,19 +175,19 @@ in Windows under Cygwin.)
175
175
176 If no input file is specified, input will be taken from STDIN.
176 If no input file is specified, input will be taken from STDIN.
177
177
178−2. `web2markdown` grabs a web page from a file or URL and converts
178+2. `html2markdown` grabs a web page from a file or URL and converts
179 it to markdown-formatted text, using `tidy` and `pandoc`.
179 it to markdown-formatted text, using `tidy` and `pandoc`.
180 Unless input is from STDIN, an attempt is made to determine the
180 Unless input is from STDIN, an attempt is made to determine the
181 character encoding of the page from the "Content-type" meta tag.
181 character encoding of the page from the "Content-type" meta tag.
182 If this is not present, UTF-8 is assumed. Alternatively, a character
182 If this is not present, UTF-8 is assumed. Alternatively, a character
183 encoding may be specified explicitly using the `-e` option.
183 encoding may be specified explicitly using the `-e` option.
184
184
185− `web2markdown` searches for an available program (`wget`, `curl`,
185+ `html2markdown` searches for an available program (`wget`, `curl`,
186 or a text-mode browser) to fetch the contents of a URL.
186 or a text-mode browser) to fetch the contents of a URL.
187 Optionally, the `-g` command may be used to specify the command
187 Optionally, the `-g` command may be used to specify the command
188 to be used:
188 to be used:
189
189
190− web2markdown -g 'wget --user=foo --password=bar' mysite.com
190+ html2markdown -g 'wget --user=foo --password=bar' mysite.com
191
191
192Command-line options
192Command-line options
193====================
193====================
man/man1/web2markdown.1 → man/man1/html2markdown.1renamed+10−10
@@ -1,22 +1,22 @@
1−.TH WEB2MARKDOWN 1 "December 15, 2006" Pandoc "User Manuals"
1+.TH HTML2MARKDOWN 1 "December 15, 2006" Pandoc "User Manuals"
2.SH NAME
2.SH NAME
3−web2markdown \- converts HTML to markdown-formatted text
3+html2markdown \- converts HTML to markdown-formatted text
4.SH SYNOPSIS
4.SH SYNOPSIS
5−\fBweb2markdown\fR [\fIoptions\fR] [\fIinput\-file\fR or \fIURL\fR]
5+\fBhtml2markdown\fR [\fIoptions\fR] [\fIinput\-file\fR or \fIURL\fR]
6.SH DESCRIPTION
6.SH DESCRIPTION
7−\fBweb2markdown\fR converts \fIinput\-file\fR or \fIURL\fR (or text
7+\fBhtml2markdown\fR converts \fIinput\-file\fR or \fIURL\fR (or text
8from STDIN) from HTML to markdown\-formatted plain text.
8from STDIN) from HTML to markdown\-formatted plain text.
9−If a URL is specified, \fBweb2markdown\fR uses an available program
9+If a URL is specified, \fBhtml2markdown\fR uses an available program
10(e.g. wget, w3m, lynx or curl) to fetch its contents. Output is sent
10(e.g. wget, w3m, lynx or curl) to fetch its contents. Output is sent
11to STDOUT unless an output file is specified using the \fB\-o\fR
11to STDOUT unless an output file is specified using the \fB\-o\fR
12option.
12option.
13.PP
13.PP
14−\fBweb2markdown\fR uses the character encoding specified in the
14+\fBhtml2markdown\fR uses the character encoding specified in the
15"Content-type" meta tag. If this is not present, or if input comes
15"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
16from STDIN, UTF-8 is assumed. A character encoding may be specified
17explicitly using the \fB\-e\fR option.
17explicitly using the \fB\-e\fR option.
18.PP
18.PP
19−\fBweb2markdown\fR is a wrapper for \fBpandoc\fR.
19+\fBhtml2markdown\fR is a wrapper for \fBpandoc\fR.
20.SH OPTIONS
20.SH OPTIONS
21.TP
21.TP
22.B \-s, \-\-standalone
22.B \-s, \-\-standalone
@@ -62,17 +62,17 @@ Assume the character encoding \fIencoding\fR in reading HTML.
62(Note: \fIencoding\fR will be passed to \fBiconv\fR; a list of
62(Note: \fIencoding\fR will be passed to \fBiconv\fR; a list of
63available encodings may be obtained using `\fBiconv \-l\fR'.)
63available encodings may be obtained using `\fBiconv \-l\fR'.)
64If the \fB\-e\fR option is not specified and input is not from
64If the \fB\-e\fR option is not specified and input is not from
65−STDIN, \fBweb2markdown\fR will try to extract the character encoding
65+STDIN, \fBhtml2markdown\fR will try to extract the character encoding
66from the "Content-type" meta tag. If no character encoding is
66from the "Content-type" meta tag. If no character encoding is
67specified in this way, or if input is from STDIN, UTF-8 will be
67specified in this way, or if input is from STDIN, UTF-8 will be
68assumed.
68assumed.
69.TP
69.TP
70.B \-g \fIcommand\fR
70.B \-g \fIcommand\fR
71Use \fIcommand\fR to fetch the contents of a URL. (By default,
71Use \fIcommand\fR to fetch the contents of a URL. (By default,
72−\fBweb2markdown\fR searches for an available program or text-based
72+\fBhtml2markdown\fR searches for an available program or text-based
73browser to fetch the contents of a URL.) For example:
73browser to fetch the contents of a URL.) For example:
74.IP
74.IP
75−web2markdown \-g 'wget \-\-user=foo \-\-password=bar' mysite.com
75+html2markdown \-g 'wget \-\-user=foo \-\-password=bar' mysite.com
76
76
77.SH "SEE ALSO"
77.SH "SEE ALSO"
78\fBpandoc\fR(1),
78\fBpandoc\fR(1),
man/man1/pandoc.1+2−2
@@ -41,7 +41,7 @@ and output through \fBiconv\fR:
41.PP
41.PP
42\fIPandoc\fR's HTML parser is not very forgiving. If your input is
42\fIPandoc\fR's HTML parser is not very forgiving. If your input is
43HTML, consider running it through \fBtidy\fR(1) before passing it
43HTML, consider running it through \fBtidy\fR(1) before passing it
44−to Pandoc. Or use \fBweb2markdown\fR(1), a wrapper around \fBpandoc\fR.
44+to Pandoc. Or use \fBhtml2markdown\fR(1), a wrapper around \fBpandoc\fR.
45
45
46.SH OPTIONS
46.SH OPTIONS
47.TP
47.TP
@@ -151,7 +151,7 @@ Print version.
151Show usage message.
151Show usage message.
152
152
153.SH "SEE ALSO"
153.SH "SEE ALSO"
154−\fBweb2markdown\fR(1),
154+\fBhtml2markdown\fR(1),
155\fBmarkdown2pdf\fR(1).
155\fBmarkdown2pdf\fR(1).
156The
156The
157.I README
157.I README
src/wrappers/web2markdown.in → src/wrappers/html2markdown.inrenamed+2−2
@@ -72,7 +72,7 @@ grabber=
72while [ $# -gt 0 ]; do
72while [ $# -gt 0 ]; do
73 case "$1" in
73 case "$1" in
74 -h|--help)
74 -h|--help)
75− pandoc -h 2>&1 | sed -e 's/pandoc/web2markdown/' \
75+ pandoc -h 2>&1 | sed -e 's/pandoc/html2markdown/' \
76 -e '/^[[:space:]]*\(-f\|-t\|-S\|-N\|-m\|-i\|-c\|-T\|-D\|-d\)/,/./d'\
76 -e '/^[[:space:]]*\(-f\|-t\|-S\|-N\|-m\|-i\|-c\|-T\|-D\|-d\)/,/./d'\
77 1>&2
77 1>&2
78 err " -e ENCODING, --encoding=ENCODING"
78 err " -e ENCODING, --encoding=ENCODING"
@@ -81,7 +81,7 @@ while [ $# -gt 0 ]; do
81 err " Specify command to be used to grab contents of URL"
81 err " Specify command to be used to grab contents of URL"
82 exit 0 ;;
82 exit 0 ;;
83 -v|--version)
83 -v|--version)
84− pandoc -v 2>&1 | sed -e 's/pandoc/web2markdown/' 1>&2
84+ pandoc -v 2>&1 | sed -e 's/pandoc/html2markdown/' 1>&2
85 exit 0 ;;
85 exit 0 ;;
86 -e)
86 -e)
87 shift
87 shift
web/demos.sh+1−1
@@ -14,7 +14,7 @@ pandoc -s README.tex -o demo0.txt
14pandoc -s -w rst README -o demo0.txt
14pandoc -s -w rst README -o demo0.txt
15pandoc -s README -o demo0.rtf
15pandoc -s README -o demo0.rtf
16pandoc -s -m -i -w s5 S5DEMO -o demo0.html
16pandoc -s -m -i -w s5 S5DEMO -o demo0.html
17−web2markdown http://www.gnu.org/software/make/ -o demo0.txt
17+html2markdown http://www.gnu.org/software/make/ -o demo0.txt
18markdown2pdf README -o demo0.pdf
18markdown2pdf README -o demo0.pdf
19markdown2pdf -C myheader.tex README -o demo0.pdf'
19markdown2pdf -C myheader.tex README -o demo0.pdf'
20
20
web/index.txt+1−1
@@ -35,7 +35,7 @@ you should extract from the zip archive and put somewhere in your
35PATH). See the included file `README-WINDOWS.txt` for instructions
35PATH). See the included file `README-WINDOWS.txt` for instructions
36on using the program. Note: If you use [Cygwin], we recommend that
36on using the program. Note: If you use [Cygwin], we recommend that
37you compile Pandoc from source. This will give you access to the
37you compile Pandoc from source. This will give you access to the
38−wrapper scripts `markdown2pdf` and `web2markdown`, which are not
38+wrapper scripts `markdown2pdf` and `html2markdown`, which are not
39included in the Windows binary package.
39included in the Windows binary package.
40
40
41[`@TARBALL_NAME@`]: http://pandoc.googlecode.com/files/@TARBALL_NAME@
41[`@TARBALL_NAME@`]: http://pandoc.googlecode.com/files/@TARBALL_NAME@