diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 12:06:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 12:06:34 +0000 |
commit | 5e61585d76ae77fd5e9e96ebabb57afa4d74880d (patch) | |
tree | 2b467823aaeebc7ef8bc9e3cabe8074eaef1666d /mantools/readme2html | |
parent | Initial commit. (diff) | |
download | postfix-5e61585d76ae77fd5e9e96ebabb57afa4d74880d.tar.xz postfix-5e61585d76ae77fd5e9e96ebabb57afa4d74880d.zip |
Adding upstream version 3.5.24.upstream/3.5.24
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | mantools/readme2html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/mantools/readme2html b/mantools/readme2html new file mode 100755 index 0000000..64b5111 --- /dev/null +++ b/mantools/readme2html @@ -0,0 +1,36 @@ +#!/bin/sh + +# Crude script to convert plain READMEs to HTML + +echo '<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/html4/loose.dtd"> + +<html> + +<head> + +<title>Title Here</title> + +<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> + +</head> + +<body> + +<h1>Title Here</h1>' + +sed ' + s/&/\&/g + s/</\</g + s/>/\>/g +' "$@" | awk ' +/^====+$/ { print "<h2>" line "</h2>"; line = ""; getline; next } +NF == 0 { print line; print $0; print "<p>"; line = $0; next } + { print line; line = $0 } +END { print line } +' + +echo ' +</body> + +</html>' |