HTML::FormatText(3pm)

HTML::FormatText3pm

Format html as plaintext

Usage

    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
        );

Version

version 2.16

Overview

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.

Releases

19 releases since Debian 1.1 (Buzz); the text changed 13 times.

  1. 1.1
  2. 1.2
  3. 1.3
  4. 2.0
  5. 2.1
  6. 2.2–3.0
  7. 3.1–4.0
  8. 5.0–6.0
  9. 7
  10. 8
  11. 9–10
  12. 11
  13. 12–13
  14. Arch