HTML::...Elinks(3pm)
π HTML::FormatText::Elinks π
okay bestie, gather round, because this little perl module is literally the moment. it's HTML::FormatText::Elinks, it lives in the perl docs as a 3pm page, and its whole job is turning HTML into plain text using the elinks program. no cap. π¦
β¨ NAME β¨
HTML::FormatText::Elinks β format HTML as plain text using elinks. that's it, that's the vibe. π
πΈ SYNOPSIS πΈ
use HTML::FormatText::Elinks;
$text = HTML::FormatText::Elinks->format_file ($filename);
$text = HTML::FormatText::Elinks->format_string ($html_string);
$formatter = HTML::FormatText::Elinks->new (rightmargin => 60);
$tree = HTML::TreeBuilder->new_from_file ($filename);
$text = $formatter->format ($tree);
look at her go. four whole ways to use her, all iconic, all in the box. π
π DESCRIPTION π
so HTML::FormatText::Elinks takes your HTML and turns it into plain text, and it does it by handing the whole thing over to the elinks program. the way that it just... outsources the hard part? main character energy fr fr.
the elinks home is right here, go say hi:
<http://elinks.cz/>
the module interface is compatible with formatters like HTML::FormatText β same shape, same energy β but all the parsing and everything else is done by elinks. not by perl, not by this module, by elinks. π
for the formatting functions and options, go read HTML::FormatExternal. HTML::FormatText::Elinks supports all of them, but with the following caveats, and you need to know these, okay? not optional reading. π«Ά
input_charsetβ as of Elinks 0.12pre2 (Oct 2008), it has various unibyte input charsets, but the only multibyte input charset it accepts isutf-8. so if yours is something else multibyte, you could recode it to utf-8 yourself if you need to β but heads up, this module does not attempt to do that automatically. it's not gonna do it for you, bestie. π
also, elinks can be a little picky about its charset names. like, a tiny bit dramatic about it. this module tries to ease that pain by, for instance, turning latin-1 (which is not accepted) into latin1 (which is accepted). and a full name like ISO-8859-1 etc is accepted too. so you've got options. slay. β¨
π¦ SEE ALSO π¦
HTML::FormatExternalelinks(1)
π HOME PAGE π
<http://user42.tuxfamily.org/html-formatexternal/index.html>
π LICENSE π
Copyright 2008, 2009, 2010, 2012, 2013, 2015 Kevin Ryde
HTML-FormatExternal is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
HTML-FormatExternal is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with HTML-FormatExternal. If not, see <http://www.gnu.org/licenses/>.
periodt. π
and that's the whole page, bestie β no notes, ate, left no crumbs. π
this has been the HTML::...Elinks(3pm) page from perl v5.36.0, dated 2022-11-19, brought to you by User Contributed Perl Documentation. mwah. π
π¦ where this page comes from
- debian bookworm: libhtml-formatexternal-perl 26-6 Β· GPL-3.0-or-later
- debian trixie: libhtml-formatexternal-perl 26-6 Β· GPL-3.0-or-later
- ubuntu noble: libhtml-formatexternal-perl 26-6 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms