commit f49af0168c90dd6e69c0d8d1b522abe2d50c25e7
parent 97866f88a198885089d9b3b364a42ad8c9e71899
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 20 Feb 2023 15:58:29 +0100
Update the convert man script to handle conversion errors
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/convert_man.sh b/convert_man.sh
@@ -53,7 +53,10 @@ man_section=$(echo "${input}" \
| man2html -r \
| tail -n +10 \
| sed '/^<HR>$/,$d' \
- | sed '/\ /d' \
+ | sed 's/\(\ \)\{1,\}/\ /g' \
+ | sed 's/^<A NAME="[[:alpha:]]\{0,\}">\ <\/A>//g' \
+ | sed 's/<TT>//g' \
+ | sed 's/<\/TT>//g' \
| sed 's/<DL COMPACT>/<DL>/g' \
| sed '/^<PRE>$/{$!{N;s/<PRE>\n<DL><DT><DD>/<DL><DT><DD><PRE>/;t sub;P;D;:sub}}'
print_footer
@@ -79,4 +82,4 @@ sed\
mv "${tmp}" "${output}"
# Clean the html file generated by man2html and lint it if necessary
-#tidy --show-info no -m "${output}" > /dev/null 2>&1 || sh lint_html.sh "${output}"
+tidy --show-info no -m "${output}" > /dev/null 2>&1 || sh lint_html.sh "${output}"