- PROCEDURAL SUBS
HTML::Clean::Human - html syntax cleaner and reformatter for human beings
This takes html like code and takes out the 'non important' stuff. This is NOT an HTML 2 TXT converter. This is is an html syntax filter/reformatter.
My initial temptation was to simply seek a solution such as html to text. But then I realized html code may have links and other ephemera that would be desireable to keep.
What I want it to get rid of; all the stupid html things such as inline font declarations etc.
This code is useful if you edit html, but you have to do it maybe from already existing html that some whacko wysiwyg junk spat out. Run it through this and voila.
So, if you have to 'remake' a stupid website somebody else made.. this is useful. You can just point it to the url and get the code down.
use HTML::Clean::Human; my $c = HTML::Clean::Human->new('http://leocharre.com'); # directly from the web! my $cleaned = $c->clean; my $original = $c->html_original;
Or use the provided script htmlclean
htmlclean http://leocharre.com > cleaned.html
Not exported by default. All of these take html string as argument and return filtered.
htmlclean - included command line interface
No doubt, please contact the AUTHOR.
Leo Charre leocharre at cpan dot org
Copyright (c) 2010 Leo Charre. All rights reserved.
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, i.e., under the terms of the "Artistic License" or the "GNU General Public License".
This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the "GNU General Public License" for more details.