]> git.armaanb.net Git - lightcards-http.git/blobdiff - convert
Add manpages
[lightcards-http.git] / convert
diff --git a/convert b/convert
new file mode 100755 (executable)
index 0000000..7252a0a
--- /dev/null
+++ b/convert
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+curl -O https://git.sr.ht/~armaan/lightcards/blob/main/man/lightcards.1
+curl -O https://git.sr.ht/~armaan/lightcards/blob/main/man/lightcards-config.5
+
+find . -type f -name 'lightcards**' -not -name '*min*' | \
+       while read i; do
+               groff -mandoc -Thtml ${i} > ${i}.html
+               minify ${i}.html > ${i}.min.html
+               rm ${i}.html
+       done
+
+minify index.html > index.min.html
+rm lightcards.1 lightcards-config.5