Remove HTML-formatted man pages

This commit is contained in:
Yorhel 2016-10-03 20:04:23 +02:00
parent aa94548c71
commit 7e17853326
3 changed files with 6 additions and 1 deletions

View file

@ -125,6 +125,7 @@ sub addman {
my($enc, $dec) = decodeman($dat, $locale);
print "Invalid encoding or empty file: $path\n" and return if !$enc;
print "Ignoring HTML-formatted page: $path\n" and return if $dec =~ /^\s*<(?:html|head|\!DOCTYPE)/;
$db->do(q{INSERT INTO contents (hash, content) VALUES(decode(?, 'hex'),?)}, {}, $hash, $dec)
if !$db->selectrow_arrayref(q{SELECT 1 FROM contents WHERE hash = decode(?, 'hex')}, {}, $hash);