YaST/Development/Graphs of includes and imports

From openSUSE

I have created simple python script for creating graph of includes/imports from ycp scripts called ycp_graph. The script generates graph in dot format (see www.graphviz.org) and it can be transformed to a lot of formats (see man dot). Some basic usage is written in help (just run script without paramters).

Script can be downloaded from here: ycp_graph.

Some examples of graphs generated by this tool:

Media:bootloader-graph.png

Graph bootloader-graph.png was generated by command:

   $ ./ycp_graph /usr/share/YaST2/clients/bootloader.ycp 10 BootArch \
                 BootCommon BootELILO BootGRUB BootLILO Bootloader \
                 BootPOWERLILO BootZIPL > bootloader-graph.txt
   $ dot -Tpng -obootloader-graph.png bootloader-graph.txt    


Media:firewall-graph.png

Graph firewall-graph.png was generated by command:

   $ ./ycp_graph /usr/share/YaST2/clients/firewall.ycp 10 \
                 SuSEFirewallCMDLine SuSEFirewallUI SuSEFirewall \
                 SuSEFirewallServices SuSEFirewallExpertRules \
                 SuSEFirewallProposal > firewall-graph.txt
   $ dot -Tpng -ofirewall-graph.png firewall-graph.txt    

I hope it can help someone to cipher out some yast module as it helped me with bootloader :).