myou-engine/doc/gendocs.sh
Alberto Torres 9af1322937 First commit.
* Incomplete port of myou-engine-js to nimskull, after many months of work, and
  a few extra features that weren't exactly necessary for a "first commit" to
  work. Excuse the lack of commit history up to this point.
* Bare bones structure of the documentation and the process to update it.
* Restructure of the whole project to have a more sensible organization.
* Making submodules of forks of larger libraries.
* README, licenses, AUTHORS.md.
2024-08-20 13:08:19 +02:00

39 lines
949 B
Bash
Executable file

#!/bin/sh
cd $(dirname $0)
[ $NIM ] || echo You may want to run "NIM=~/nimskull/bin/nim $0"
[ $NIM ] || NIM=nim
URL=https://git.myou.dev/MyouProject/myou-engine
BRANCH=main
COMMIT=branch/$BRANCH
# rm -fr htmldocs
cd ..
function start(){
false # git stash
}
function end(){
false # git stash pop
}
function error(){
end
exit 1
}
start
$NIM doc --project --index:on \
--git.url:$URL --git.devel:$BRANCH --git.commit:$COMMIT \
--outdir:doc/htmldocs src/bundle.nim || error
for p in doc/*.rst;do
$NIM rst2html --project --index:on \
--git.url:$URL --git.devel:$BRANCH --git.commit:$COMMIT \
--outdir:doc/htmldocs $p || error
done
cd -
$NIM r fixdocs.nim htmldocs/* htmldocs/**/* || error
find htmldocs/ -iname "*.html" -exec sed 's@theindex.html/FIXME/@@g' {} -i \;
grep "TYPES =" htmldocs/objects/mesh.html && (echo "FIXDOCS DIDN'T WORK!!!" ; error)
cp htmldocs/manual.html htmldocs/index.html
end
exit 0