use groff html output!
This commit is contained in:
parent
29513a5863
commit
e4f683f219
@ -89,27 +89,10 @@ umask 77
|
|||||||
# !! Leave the following line unmodified !
|
# !! Leave the following line unmodified !
|
||||||
#ENDRECFILTCOMMONCODE
|
#ENDRECFILTCOMMONCODE
|
||||||
|
|
||||||
checkcmds groff sed awk iconv
|
checkcmds groff
|
||||||
|
|
||||||
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
|
# Note: the qt preview really likes to find an <html> tag at the top
|
||||||
# is an awk program
|
echo '<html>' && groff -man -Thtml < "$infile"
|
||||||
groff -man -Tutf8 < "$infile" | sed -e 's/.//g' -e 's/.//g' |\
|
|
||||||
awk 'BEGIN'\
|
|
||||||
' {
|
|
||||||
print "<html><head><title></title>"
|
|
||||||
print "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">"
|
|
||||||
print "</head>\n<body>\n<p>"
|
|
||||||
}
|
|
||||||
{
|
|
||||||
gsub(/&/, "\\&", $0)
|
|
||||||
gsub(/</, "\\<", $0)
|
|
||||||
gsub(/>/, "\\>", $0)
|
|
||||||
|
|
||||||
print $0 "<br>"
|
|
||||||
}
|
|
||||||
END {
|
|
||||||
print "</p></body></html>"
|
|
||||||
}' | iconv -f UTF-8 -t UTF-8 -c -s
|
|
||||||
|
|
||||||
# exit normally
|
# exit normally
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user