1HTML::FormatText::Lynx(U3s)er Contributed Perl DocumentatHiToMnL::FormatText::Lynx(3)
2
3
4
6 HTML::FormatText::Lynx - format HTML as plain text using lynx
7
9 use HTML::FormatText::Lynx;
10 $text = HTML::FormatText::Lynx->format_file ($filename);
11 $text = HTML::FormatText::Lynx->format_string ($html_string);
12
13 $formatter = HTML::FormatText::Lynx->new (rightmargin => 60);
14 $tree = HTML::TreeBuilder->new_from_file ($filename);
15 $text = $formatter->format ($tree);
16
18 "HTML::FormatText::Lynx" turns HTML into plain text using the "lynx"
19 program.
20
21 <http://lynx.isc.org/>
22
23 The module interface is compatible with formatters like
24 "HTML::FormatText", but all parsing etc is done by lynx.
25
26 See "HTML::FormatExternal" for the formatting functions and options,
27 all of which are supported by "HTML::FormatText::Lynx", with the
28 following caveats
29
30 "leftmargin", "rightmargin"
31 Prior to the "-nomargins" option of Lynx 2.8.6dev.12 (June 2005) an
32 additional 3 space margin is always applied within the requested
33 left and right positions.
34
35 "input_charset", "output_charset"
36 Note that "latin-1" etc is not accepted, it must be "iso-8859-1"
37 etc.
38
39 "output_charset" becomes the "-display_charset" option and can't be
40 used on very old "lynx" which doesn't have that option (eg. lynx
41 circa 2.8.1). Perhaps in the future "output_charset" could be
42 dropped if it's already what will be output, or throw a Perl error
43 when unsupported.
44
45 Extra Options
46 "justify" (boolean)
47 If true then "-justify" is passed to lynx to have all lines in the
48 paragraph padded out with extra spaces to the given "rightmargin"
49 (or default right margin).
50
51 "unique_links" (boolean)
52 If true then "-unique_urls" is passed to have lynx give its link
53 footnotes just once for each distinct URL, re-used when the same
54 URL occurs more than once in the document. This module option is
55 per HTML::FormatText::WithLinks.
56
58 HTML::FormatExternal, lynx(1)
59
61 <http://user42.tuxfamily.org/html-formatexternal/index.html>
62
64 Copyright 2008, 2009, 2010, 2013, 2015 Kevin Ryde
65
66 HTML-FormatExternal is free software; you can redistribute it and/or
67 modify it under the terms of the GNU General Public License as
68 published by the Free Software Foundation; either version 3, or (at
69 your option) any later version.
70
71 HTML-FormatExternal is distributed in the hope that it will be useful,
72 but WITHOUT ANY WARRANTY; without even the implied warranty of
73 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
74 General Public License for more details.
75
76 You should have received a copy of the GNU General Public License along
77 with HTML-FormatExternal. If not, see <http://www.gnu.org/licenses/>.
78
79
80
81perl v5.36.0 2023-01-20 HTML::FormatText::Lynx(3)