File: htmlpre2txt

package info (click to toggle)
colorized-logs 2.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 152 kB
  • sloc: ansic: 883; perl: 132; makefile: 3; sh: 1
file content (15 lines) | stat: -rwxr-xr-x 222 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env perl
use warnings;

# Unfit for general use, of course.
undef $/;
$_=<>;
s|.*<pre|<|s;
s|</pre>.*||s;
s,\n<hr>\n,\f,sg;
s,<(?:[^>"]|"[^"]*")*>,,g;
s,&iexcl;,\a,g;
s,&lt;,<,g;
s,&gt;,>,g;
s,&amp;,&,g;
print;