cleaned up processing of metadata from diverse origins (doc,extattrs,localfields)

This commit is contained in:
Jean-Francois Dockes
2013-01-29 14:33:57 +01:00
parent e5543b144f
commit d3631b5ddf
9 changed files with 83 additions and 47 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ $headAndBody = 1;
sub xapianTag {
my $imgtag = shift;
while ( ( $tagre, $xapiantag) = each %{$tagMap} ) {
return $xapiantag if $imgtag =~ /$tagre/i;
return $xapiantag if $imgtag =~ /^$tagre$/i;
}
return undef;
}
+7 -1
View File
@@ -132,7 +132,13 @@ awk 'BEGIN'\
gsub(/>/, "\\>", mid)
mid = "<title>" mid "</title>"
$0 = part1 mid part2
}
}
# Recoll treats "Subject" as a "title" element (based on emails). The PDF
# "Subject" metadata field is more like an HTML "description"
if(doescape == 0 && $0 ~ /<meta ?name="Subject"/){
gsub(/="Subject"/, "=\"Description\"", $0)
}
if ($0 == "<pre>"){
# Begin of body text. need to escape some chars from now on as