-
-
07 Dec 2016 09:14:05 UTC
- Distribution: HTML-Formatter
- Module version: 2.16
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (1)
- Testers (5682 / 12 / 2)
- Kwalitee
Bus factor: 1- 59.28% Coverage
- License: perl_5
- Perl: v5.8.0
- Activity
24 month- Tools
- Download (53.09KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Carp
- Data::Dumper
- Encode
- Font::Metrics::Courier
- Font::Metrics::CourierBold
- Font::Metrics::CourierBoldOblique
- Font::Metrics::CourierOblique
- Font::Metrics::Helvetica
- Font::Metrics::HelveticaBold
- Font::Metrics::HelveticaBoldOblique
- Font::Metrics::HelveticaOblique
- Font::Metrics::TimesBold
- Font::Metrics::TimesBoldItalic
- Font::Metrics::TimesItalic
- Font::Metrics::TimesRoman
- HTML::Element
- HTML::TreeBuilder
- IO::File
- base
- integer
- parent
- strict
- utf8
- warnings
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
HTML::FormatText - Format HTML as plaintext
VERSION
version 2.16
SYNOPSIS
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);
or, more simply:
use HTML::FormatText; my $string = HTML::FormatText->format_file( 'test.html', leftmargin => 0, rightmargin => 50 );
DESCRIPTION
HTML::FormatText is a formatter that outputs plain text. All character attributes (bold/italic/underline) are ignored. Formatting of HTML tables and forms is not implemented.
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.
You might specify the following parameters when constructing the formatter:
- leftmargin (alias lm)
-
The column of the left margin. The default is 3.
- rightmargin (alias rm)
-
The column of the right margin. The default is 72.
SEE ALSO
AUTHORS
Nigel Metheringham <nigelm@cpan.org>
Sean M Burke <sburke@cpan.org>
Gisle Aas <gisle@ActiveState.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2016 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install HTML::Formatter, copy and paste the appropriate command in to your terminal.
cpanm HTML::Formatter
perl -MCPAN -e shell install HTML::Formatter
For more information on module installation, please visit the detailed CPAN module installation guide.