Skip to content

Commit

Permalink
html manual with links to usage examples
Browse files Browse the repository at this point in the history
  • Loading branch information
gtheler committed Feb 27, 2025
1 parent 0e9aa3d commit f174138
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion doc/CODE_OF_CONDUCT.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ chaptersDepth: 1
codeBlockCaptions: false
cref: false
crossrefYaml: pandoc-crossref.yaml
date: 2025-02-06
date: 2025-02-27
eqLabels: arabic
eqnBlockInlineMath: false
eqnBlockTemplate: |
Expand Down
2 changes: 1 addition & 1 deletion doc/FAQ.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ chaptersDepth: 1
codeBlockCaptions: false
cref: false
crossrefYaml: pandoc-crossref.yaml
date: 2025-02-06
date: 2025-02-27
eqLabels: arabic
eqnBlockInlineMath: false
eqnBlockTemplate: |
Expand Down
2 changes: 1 addition & 1 deletion doc/feenox.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 3.2
.\"
.TH "FEENOX" "1" "2025\-01\-23" "FeenoX" "FeenoX User Manual"
.TH "FEENOX" "1" "2025\-02\-27" "FeenoX" "FeenoX User Manual"
.SH NAME
FeenoX \- a cloud\-first free no\-X uniX\-like finite\-element(ish)
computational engineering tool
Expand Down
4 changes: 2 additions & 2 deletions doc/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ echo " - functionals"
echo " - vector functions"
./reference.sh ../src/math/builtin_vectorfunctions.c fv > reference-fv.md

for i in laplace thermal mechanical neutron_sn; do
for i in laplace thermal mechanical neutron_diffusion neutron_sn; do
echo " - ${i}"
./reference.sh ../src/pdes/${i}/init.c pb_${i} > reference-${i}-pb.md
./reference.sh ../src/pdes/${i}/parser.c kw_${i} > reference-${i}-kw.md
Expand Down Expand Up @@ -124,7 +124,7 @@ for i in programming compilation FAQ CODE_OF_CONDUCT history; do
./md2.sh --plain ${i}
done

echo "PDF + HTML + Markdown + plain"
echo "PDF + HTML + plain"
for i in feenox-manual srs sds; do
echo ${i}
if [ ${pdf} = 1 ]; then
Expand Down
21 changes: 17 additions & 4 deletions doc/reference.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,10 @@ for kw in ${kws}; do
# usage
usage=$(grep "///${tag}+${kw}+usage" ${src} | cut -d" " -f2-)
if [ -n "${usage}" ]; then
# echo -n "\`${usage}\`"
# echo "::: {.usage}"
echo "~~~feenox"
grep "///${tag}+${kw}+usage" ${src} | cut -d" " -f2- | xargs -0 | tr \\n " " | tr @ \\n
echo
echo "~~~"
# echo ":::"
echo
fi

Expand Down Expand Up @@ -217,11 +214,27 @@ EOF
if [ -e ${svg} ]; then
echo "![${ex}](${svg}){width=90%}\ "
fi

echo

echo
echo
done


# examples
examples=$(find ../tests ../examples -type f -name "*.fee" | xargs grep ${kw} | cut -d: -f1 | sort | uniq)
if [ -n "${examples}" ]; then
echo ":::::::: {.only-in-format .html}"
echo "## Examples of usage {.unnumbered}"
echo
for i in ${examples}; do
lineno=$(grep -n ${kw} ${i} | head -n1 | cut -d: -f1)
echo " * [$(basename ${i}):${lineno}]($(echo ${i} | sed 's_.._https://github.com/seamplex/feenox/tree/main/_')#L${lineno})"
done
echo "::::::::"
echo
fi

done

echo
Expand Down

0 comments on commit f174138

Please sign in to comment.