]> git.codecow.com Git - Monocypher.git/commitdiff
Generating an html version of the manual
authorLoup Vaillant <loup@loup-vaillant.fr>
Tue, 3 Oct 2017 22:05:18 +0000 (00:05 +0200)
committerLoup Vaillant <loup@loup-vaillant.fr>
Tue, 3 Oct 2017 22:05:18 +0000 (00:05 +0200)
Now the users will be able to enjoy a readable manual even without the
man pages.

One hassle though: I expected links between the pages, and I se none.
Limitation of the converter, or bug in my script?

.gitignore
doc/html/style.css [moved from doc/man/man3/style.css with 100% similarity]
doc/man2html.sh [new file with mode: 0755]

index e694a006cbfcb52a6e1b108f5f6224c22032b152..4f20c93c1f7b1f848d480db0b63f11be164909ce 100644 (file)
@@ -10,5 +10,5 @@
 *.profraw
 *.profdata
 tests/formal-analysis/*
-man/3monocypher/*.html
+doc/html/*.html
 tests/vectors.h
similarity index 100%
rename from doc/man/man3/style.css
rename to doc/html/style.css
diff --git a/doc/man2html.sh b/doc/man2html.sh
new file mode 100755 (executable)
index 0000000..bc18dcd
--- /dev/null
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+mkdir -p html
+
+for name in $(ls -1 "man/man3/" | sed 's/.3monocypher//' | grep -v "style.css")
+do
+    mandoc                         \
+        -Oman=%N.%S.html           \
+        -Ostyle=style.css \
+        -Thtml man/man3/$name.3monocypher > html/$name.html
+done
+