Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Generate Documentation with OpenModelica

Generate Documentation with OpenModelica

Hello,
I would like to use OpenModelica to create a HTML documentaion just like the one that can be found here:
https://build.openmodelica.org/Documentation/
On the bottom of the page it says:
Generated using GenerateDoc.mos
https://build.openmodelica.org/Document … ateDoc.mos
but is not clear to me how to use that file.
As I did not find any button "Generate HTML documentation" I guess I should call omc from the command line, but what parameters/options would I have to pass?
Regards,
Matthis

Edited by: matth - Feb-10-15 10:30:05

Re: Generate Documentation with OpenModelica

Full script running daily:

Code:

#!/bin/bash -x


TMP=/tmp/build-doc/
DOC=ModelicaDocumentation.tar.xz
ZIP=ModelicaDocumentation.zip
DEST=/var/www/Documentation/

sudo -n apt-get -qq update || exit 1
sudo -n apt-get -qqy upgrade || exit 1
sudo -n apt-get -qqy install '^omlib-.*' || exit 1


rm -rf "$TMP"
mkdir -p "$TMP"
cd $TMP
omc /usr/share/doc/omc/testmodels/GenerateDoc.mos | tee log
test -f "OpenModelica.html" || exit 1
test -f "index.html" || exit 1
test -f "$DOC" || exit 1
test -f "$ZIP" || exit 1
cp "$DOC" "$DEST/$DOC"
cp "$ZIP" "$DEST/$ZIP"
cd "$DEST"
tar xJf "$DOC"

You might want to tweak the first few lines (loadModel(Modelica) and getAvailableLibraries() are used to generate documentation for all libraries; changing these lines to loadModel(MyPackage) will generate documentation only for this; genBuiltin and genMetaModelica can also be disabled to skip some OpenModelica-specific documentation)

There are 0 guests and 0 other users also viewing this topic
You are here: