html2text.pl - script for generating formatted text from HTML
html2text.pl <filename> cat <filename> | html2text.pl
html2text.pl generated simple formatted text from HTML. It uses HTML::Element to traverse an HTML tree built by HTML::TreeBuilder, and formats the output text using Text::Format. It is very simple at the moment. The type of things it does are:
All headings are underlined. <H1>s are double underlined. Headings are numbered, by using the heading levels, and previous heading levels.
Paragraph text is formatted with the paragraph method of Text::Format.
List items are indented by 4 spaces, and preceded with an asterisk.
<DT>s are intented by 4 spaces; <DD>s are indented by 8 spaces.
Text::Format HTML::TreeBuilder
any
Ave Wrigley <Ave.Wrigley@itn.co.uk>
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Web
To install html2text.pl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm html2text.pl
CPAN shell
perl -MCPAN -e shell install html2text.pl
For more information on module installation, please visit the detailed CPAN module installation guide.