reads HTML documents from the
R input-url s,
formats each of them into a stream of plain text characters,
and writes the result to standard output (or into
R output-file ,
command line option is used).
Documents that are specified by a URL (RFC 1738) that begins with
"http:" are retrieved with the Hypertext Transfer Protocol
(RFC 1945). URLs that begin with "file:" and URLs that do not
contain a colon specify local files. All other URLs are invalid.
R input-url s
are specified on the command line,
reads from standard input. A dash as the
is an alternate way to specify standard input.
understands all HTML 3.2 constructs, but can render only part of them due to
the limitations of the text output format. However, the program attempts to
provide good substitutes for the elements it cannot render.
parses HTML 4 input, too, but not always as successful as other HTML
processors. It also accepts syntactically incorrect input, and attempts to
interpret it "reasonably".
formats the HTML documents is controlled by formatting properties read
from an RC file.
attempts to read
(or the file specified by the
command line option); if that file cannot be read,
attempts to read
R /etc/html2textrc .
If no RC file can be read (or if the RC file does not override all
formatting properties), then "reasonable" defaults are assumed. The
RC file format is described in the
for the output. Specifying this option, plain
is used instead. To find out how non-ASCII characters are rendered, refer to
the file "ascii.substitutes".
This option is for diagnostic purposes: The HTML document is only parsed and
not processed otherwise. In this mode of operation,
will report on parse errors and scan errors, which it does not in other modes
of operation. Note that parse and scan errors are not fatal for
R html2text ,
but may cause mis-interpretation of the HTML code and/or portions of the
document being swallowed.
report on the tokens being shifted, rules being applied, etc., while scanning
the HTML document. This option is for diagnostic purposes.
report on each lexical token scanned, while scanning the HTML document. This
option is for diagnostic purposes.
Print command line summary and exit.
renders underlined letters with sequences like "underscore-backspace-character"
and boldface letters like "character-backspace-character", which works fine
when the output is piped into
or similar. For other applications, or when redirecting the output into a file,
it may be desirable not to render character attributes with such backspace
sequences, which can be accomplished with this command line option.
I -o output-file
Write the output to
instead of standard output. A dash as the
is an alternate way to specify the standard output.
I -rcfile path
Attempt to read the file specified in
as RC file.
R -style ( compact | pretty )
changes some of the default values of the formatting parameters documented in
To find out which and how the formatting parameter defaults are changed, check
the file "pretty.style". If this option is omitted, style
is assumed as default.
This option is for diagnostic purposes: Instead of formatting the parsed document,
generate HTML code, that is guaranteed to be syntactically correct. If
has problems parsing a syntactically incorrect HTML document, this option
may help you to understand what
thinks that the original HTML code means.
Print program version and exit.
I -width width
formats the HTML documents for a screen width of 79 characters. If redirecting
the output into a file, or if your terminal has a width other than 80
characters, or if you just want to get an idea how
deals with large tables and different terminal widths, you may want to specify
R width .
System wide parser configuration file.
Personal parser configuration file, overrides the system wide values.
(HTML 3.2 Reference Specification - http://www.w3.org/TR/REC-html32),
(Hypertext Transfer Protocol - HTTP).
provides only a basic implementation of the Hypertext Transfer Protocol
(HTTP). It requires the complete and exactly matching URL to be given as
argument and will not follow redirections (HTTP 301/ 307). Proxy
servers are not supported.
was written to convert HTML 3.2 documents. When using it with HTML 4 or
even XHTML 1 documents, some constructs present only in these HTML versions
might not be rendered.
was written up to version 1.2.2 by Arno Unkrig <firstname.lastname@example.org>
for GMRS Software GmbH, Unterschleissheim.
Current maintainer and primary download location is:
Martin Bayer <email@example.com>