Fix UML toc generation for docs

This commit is contained in:
Arjan Molenaar 2021-01-26 22:26:51 +01:00
parent 7fc0b928d4
commit 614f3fe91a
No known key found for this signature in database
GPG Key ID: BF977B918996CB13
2 changed files with 18 additions and 21 deletions

View File

@ -131,7 +131,7 @@ doctest:
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
models: models/core.rst models/uml.rst models/sysml.rst
models: models/core.rst models/uml.rst models/sysml/Profiles/SysML.rst
models/core.rst: ../models/Core.gaphor
gaphorconvert --format=svg --dir=models/core --use-underscores $< && \
@ -141,6 +141,6 @@ models/uml.rst: ../models/UML.gaphor
gaphorconvert --format=svg --dir=models/uml --use-underscores $< && \
./modeldoc.sh uml
models/sysml.rst: ../models/SysML.gaphor
models/sysml/Profiles/SysML.rst: ../models/SysML.gaphor
gaphorconvert --format=svg --dir=models/sysml --use-underscores $< && \
./modeldoc.sh sysml/Profiles/SysML

View File

@ -44,26 +44,23 @@ $H1
EOF
fi
find models/"$M" | while read -r PACKAGE
find "models/${M}" -mindepth 1 -type d -printf "%P\n" | sort | while read -r PACKAGE
do
if test -d models/"$M"/"$PACKAGE"
then
echo " $(basename "$M")/${PACKAGE}" >> models/"$M".rst
echo " ${M}/${PACKAGE}" >> "models/${M}.rst"
{
echo "${PACKAGE//_/ }"
echo $H1
{
echo "${PACKAGE//_/ }"
echo $H1
echo
find "models/${M}/${PACKAGE}" -mindepth 1 -printf "%P\n" | sort | while read -r DIAGRAM
do
name=${DIAGRAM%.svg}
echo "${name//_/ }"
echo $H2
echo
find models/"$M"/"${PACKAGE}" | while read -r DIAGRAM
do
name=${DIAGRAM%.svg}
echo "${name//_/ }"
echo $H2
echo
echo ".. thumbnail:: ${PACKAGE}/${DIAGRAM}"
echo " :group: ${PACKAGE}"
echo
done
} > models/"$M"/"${PACKAGE}".rst
fi
echo ".. thumbnail:: ${PACKAGE}/${DIAGRAM}"
echo " :group: ${PACKAGE}"
echo
done
} > models/"$M"/"${PACKAGE}".rst
done