improve man page handling

This commit is contained in:
dockes 2009-06-26 09:25:05 +00:00
parent 88475dabca
commit dca89da13b
2 changed files with 16 additions and 2 deletions

View File

@ -92,7 +92,19 @@ umask 77
checkcmds groff
# Note: the qt preview really likes to find an <html> tag at the top
echo '<html>' && groff -man -Thtml < "$infile"
echo '<html>'
# Filter out some unwanted data when indexing
if test X$RECOLL_FILTER_FORPREVIEW = Xyes ; then
groff -man -Thtml < "$infile"
else
# When indexing we try to avoid adding terms for the section headers, which
# are unfortunately somewhat ill defined. We eliminate rather loosely
# lines containing likely section header words preceded by a tag.
groff -man -Thtml < "$infile" | \
egrep -v \
'>NAME|>SYNOPSIS|>DESCRIPTION|>OPTIONS|>DIAGNOSTICS|>SUPPORTED HARDWARE|>CONFIGURATION DETAILS|>AUTHOR|>BUGS|>REPORTING BUGS|>KNOWN BUGS|>COPYRIGHT|>SEE ALSO|>HISTORY|>ENVIRONMENT|>FILES'
fi
# exit normally
exit 0

View File

@ -136,3 +136,5 @@ recoll_noindex = .tar.gz .tgz .tar.bz2 .tbz .log.gz .md5 .map \
.6 = text/x-man
.7 = text/x-man
.8 = text/x-man
.n = text/x-man
.3pm = text/x-man