161 lines
4.1 KiB
HTML
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"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
HTML::FormatText - Format HTML as plaintext
|
|
<A NAME="lbAC"> </A>
|
|
<H2>VERSION</H2>
|
|
|
|
|
|
|
|
version 2.12
|
|
<A NAME="lbAD"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
use HTML::TreeBuilder;
|
|
$tree = HTML::TreeBuilder->new->parse_file("test.html");
|
|
|
|
use HTML::FormatText;
|
|
$formatter = HTML::FormatText->new(leftmargin => 0, rightmargin => 50);
|
|
print $formatter->format($tree);
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
or, more simply:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
use HTML::FormatText;
|
|
my $string = HTML::FormatText->format_file(
|
|
'test.html',
|
|
leftmargin => 0, rightmargin => 50
|
|
);
|
|
|
|
</PRE>
|
|
|
|
|
|
<A NAME="lbAE"> </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"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
|
|
HTML::Formatter
|
|
<A NAME="lbAG"> </A>
|
|
<H2>INSTALLATION</H2>
|
|
|
|
|
|
|
|
See perlmodinstall for information and options on installing Perl modules.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>BUGS AND LIMITATIONS</H2>
|
|
|
|
|
|
|
|
You can make new bug reports, and view existing ones, through the
|
|
web interface at <<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>>.
|
|
<A NAME="lbAI"> </A>
|
|
<H2>AVAILABILITY</H2>
|
|
|
|
|
|
|
|
The project homepage is <<A HREF="https://metacpan.org/release/HTML-Format">https://metacpan.org/release/HTML-Format</A>>.
|
|
<P>
|
|
|
|
The latest version of this module is available from the Comprehensive Perl
|
|
Archive Network (<FONT SIZE="-1">CPAN</FONT>). Visit <<A HREF="http://www.perl.com/CPAN/">http://www.perl.com/CPAN/</A>> to find a <FONT SIZE="-1">CPAN</FONT>
|
|
site near you, or see <<A HREF="https://metacpan.org/module/HTML::Format/">https://metacpan.org/module/HTML::Format/</A>>.
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="3">•<DD>
|
|
Nigel Metheringham <<A HREF="mailto:nigelm@cpan.org">nigelm@cpan.org</A>>
|
|
<DT id="4">•<DD>
|
|
Sean M Burke <<A HREF="mailto:sburke@cpan.org">sburke@cpan.org</A>>
|
|
<DT id="5">•<DD>
|
|
Gisle Aas <<A HREF="mailto:gisle@ActiveState.com">gisle@ActiveState.com</A>>
|
|
</DL>
|
|
<A NAME="lbAK"> </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"> </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>
|