man-pages/man3/HTML::FormatText.3pm.html
2021-03-31 01:06:50 +01:00

161 lines
4.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of HTML::FormatText</TITLE>
</HEAD><BODY>
<H1>HTML::FormatText</H1>
Section: User Contributed Perl Documentation (3pm)<BR>Updated: 2016-12-15<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
HTML::FormatText - Format HTML as plaintext
<A NAME="lbAC">&nbsp;</A>
<H2>VERSION</H2>
version 2.12
<A NAME="lbAD">&nbsp;</A>
<H2>SYNOPSIS</H2>
<PRE>
use HTML::TreeBuilder;
$tree = HTML::TreeBuilder-&gt;new-&gt;parse_file(&quot;test.html&quot;);
use HTML::FormatText;
$formatter = HTML::FormatText-&gt;new(leftmargin =&gt; 0, rightmargin =&gt; 50);
print $formatter-&gt;format($tree);
</PRE>
<P>
or, more simply:
<P>
<PRE>
use HTML::FormatText;
my $string = HTML::FormatText-&gt;format_file(
'test.html',
leftmargin =&gt; 0, rightmargin =&gt; 50
);
</PRE>
<A NAME="lbAE">&nbsp;</A>
<H2>DESCRIPTION</H2>
HTML::FormatText is a formatter that outputs plain latin1 text. All character
attributes (bold/italic/underline) are ignored. Formatting of <FONT SIZE="-1">HTML</FONT> tables and
forms is not implemented.
<P>
HTML::FormatText is built on HTML::Formatter and documentation for that
module applies to this - especially ``new'' in HTML::Formatter,
``format_file'' in HTML::Formatter and ``format_string'' in HTML::Formatter.
<P>
You might specify the following parameters when constructing the formatter:
<DL COMPACT>
<DT id="1"><I>leftmargin</I> (alias <I>lm</I>)<DD>
The column of the left margin. The default is 3.
<DT id="2"><I>rightmargin</I> (alias <I>rm</I>)<DD>
The column of the right margin. The default is 72.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>SEE ALSO</H2>
HTML::Formatter
<A NAME="lbAG">&nbsp;</A>
<H2>INSTALLATION</H2>
See perlmodinstall for information and options on installing Perl modules.
<A NAME="lbAH">&nbsp;</A>
<H2>BUGS AND LIMITATIONS</H2>
You can make new bug reports, and view existing ones, through the
web interface at &lt;<A HREF="http://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Format">http://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Format</A>&gt;.
<A NAME="lbAI">&nbsp;</A>
<H2>AVAILABILITY</H2>
The project homepage is &lt;<A HREF="https://metacpan.org/release/HTML-Format">https://metacpan.org/release/HTML-Format</A>&gt;.
<P>
The latest version of this module is available from the Comprehensive Perl
Archive Network (<FONT SIZE="-1">CPAN</FONT>). Visit &lt;<A HREF="http://www.perl.com/CPAN/">http://www.perl.com/CPAN/</A>&gt; to find a <FONT SIZE="-1">CPAN</FONT>
site near you, or see &lt;<A HREF="https://metacpan.org/module/HTML::Format/">https://metacpan.org/module/HTML::Format/</A>&gt;.
<A NAME="lbAJ">&nbsp;</A>
<H2>AUTHORS</H2>
<DL COMPACT>
<DT id="3">&bull;<DD>
Nigel Metheringham &lt;<A HREF="mailto:nigelm@cpan.org">nigelm@cpan.org</A>&gt;
<DT id="4">&bull;<DD>
Sean M Burke &lt;<A HREF="mailto:sburke@cpan.org">sburke@cpan.org</A>&gt;
<DT id="5">&bull;<DD>
Gisle Aas &lt;<A HREF="mailto:gisle@ActiveState.com">gisle@ActiveState.com</A>&gt;
</DL>
<A NAME="lbAK">&nbsp;</A>
<H2>COPYRIGHT AND LICENSE</H2>
This software is copyright (c) 2015 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.
<P>
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="6"><A HREF="#lbAB">NAME</A><DD>
<DT id="7"><A HREF="#lbAC">VERSION</A><DD>
<DT id="8"><A HREF="#lbAD">SYNOPSIS</A><DD>
<DT id="9"><A HREF="#lbAE">DESCRIPTION</A><DD>
<DT id="10"><A HREF="#lbAF">SEE ALSO</A><DD>
<DT id="11"><A HREF="#lbAG">INSTALLATION</A><DD>
<DT id="12"><A HREF="#lbAH">BUGS AND LIMITATIONS</A><DD>
<DT id="13"><A HREF="#lbAI">AVAILABILITY</A><DD>
<DT id="14"><A HREF="#lbAJ">AUTHORS</A><DD>
<DT id="15"><A HREF="#lbAK">COPYRIGHT AND LICENSE</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:45 GMT, March 31, 2021
</BODY>
</HTML>