Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ jobs:
pip install gitpython
pip install requests
python ${{ github.workspace }}/SofaDocGenerator/script/pipeline.py ${{ github.workspace }}/SofaDocGenerator/doc ${{ github.workspace }}/sofa/share/sofa/examples ${{ github.workspace }}/sofa/plugins

python ${{ github.workspace }}/SofaDocGenerator/script/title_metadata.py ${{ github.workspace }}/SofaDocGenerator/doc

python ${{ github.workspace }}/SofaDocGenerator/script/scene_check.py ${{ github.workspace }}/SofaDocGenerator/doc/15_Using_SOFA/10_SceneChecking.md

echo "Starting the export of plugin lists"
# Export plugin lists into the merged doc
Expand Down
27 changes: 27 additions & 0 deletions script/scene_check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""
Append the table composed of the list of SceneCheck to a file
"""

import sys

def main():

if len(sys.argv) < 2:
print('Usage: scene_check.py <output_file>')
exit(1)

import Sofa
import SofaRuntime

SofaRuntime.importPlugin("SceneChecking")

table = "| Name | Description |\n"
table += "| ---- | ----------- |\n"
for scene_check in Sofa.Simulation.SceneCheckMainRegistry.getRegisteredSceneChecks():
table += f"| {scene_check.getName()} | {scene_check.getDesc()} |\n"

with open(sys.argv[1], 'a', encoding="utf-8") as output_file:
output_file.write(table)

if __name__ == '__main__':
main()