Man page wip

This commit is contained in:
Mike Farah
2021-10-15 09:51:42 +11:00
parent 4ce9433468
commit 0436b77d91
4 changed files with 74 additions and 2 deletions
+21
View File
@@ -0,0 +1,21 @@
#! /bin/bash
set -e
# note that this reqires pandoc to be installed.
cat ./pkg/yqlib/doc/headers/Main.md > man.md
printf "\n# HOW IT WORKS\n" >> man.md
cat ./pkg/yqlib/doc/aa.md >> man.md
for f in ./pkg/yqlib/doc/*.md; do
docNameWithExt="${f##*/}"
docName="${docNameWithExt%.*}"
docNameCap=$(echo $docName | tr [a-z] [A-Z])
if [ "$docName" != "aa" ]; then
printf "\n\n# ${docNameCap}\n" >> man.md
cat "$f" >> man.md
fi
done
pandoc --variable=title:"yq" --variable=author:"Mike Farah" --standalone --to man man.md -o yq.1