diff options
| author | Konstantin Kirik (snegovick) <snegovick@uprojects.org> | 2025-12-08 08:50:38 +0300 |
|---|---|---|
| committer | Konstantin Kirik (snegovick) <snegovick@uprojects.org> | 2025-12-08 08:50:38 +0300 |
| commit | 97e1ee5918222272056d6747735e39933f79011c (patch) | |
| tree | f6899798869007dfc6ad37dfe792819ac6ba405f /man/lib/tohtml.sh | |
| parent | efb56b311a59529196831da51ebbf21c20be665d (diff) | |
Add scripts and index page for html man pages
Diffstat (limited to 'man/lib/tohtml.sh')
| -rw-r--r-- | man/lib/tohtml.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/man/lib/tohtml.sh b/man/lib/tohtml.sh new file mode 100644 index 00000000..b3081a58 --- /dev/null +++ b/man/lib/tohtml.sh @@ -0,0 +1,34 @@ +#!/bin/bash +if [ -e output ]; then + rm output -rf +fi + +cwd=$(pwd) +echo "CWD: ${cwd}" +mkdir output +for d in $(ls); do + if [ -d $d ]; then + if [ x"$d" = x"output" ]; then + continue + fi + if [ x"$d" = x"lib" ]; then + continue + fi + echo "mkdir output/${d}" + mkdir output/${d} + pushd $d + for f in $(ls); do + name=$(basename -- "$f") + ext="${name##*.}" + if [ x"${ext}" = x"html" ]; then + echo "Remove ${f}" + rm $f + else + cat ${f} | mandoc -Thtml | python3 ${cwd}/mklinks.py -p /man/ -o ${cwd}/output/$d/$f.html + #cat ${f} | mandoc -Thtml > ${cwd}/output/$d/$f.html + echo "Processed ${d}/${f}" + fi + done + popd + fi +done |
