Skip to content

Commit

Permalink
summarize_sdf.bash: print quick file summary
Browse files Browse the repository at this point in the history
Print names of worlds, models, nested models, and
plugins in a file. Also print out the frame graph.

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Nov 21, 2023
1 parent 11205c9 commit e66c019
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tools/summarize_sdf.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

echo Summarizing content of $1
echo
echo Name of Root Model:
xmllint --xpath '//sdf/model/@name' $1
echo
echo Names of Worlds:
xmllint --xpath '//sdf/world/@name' $1
echo Names of Models contained by a World:
xmllint --xpath '//world/model/@name' $1
echo
echo Names of Nested models:
xmllint --xpath '//model/model/@name' $1
echo
echo Names and Filenames of Plugins:
echo Names:
xmllint --xpath '//plugin/@name' $1
echo Filenames:
xmllint --xpath '//plugin/@filename' $1
echo
echo Frame Graph:
gz sdf --graph frame $1

0 comments on commit e66c019

Please sign in to comment.