update dev300-m58
[ooovba.git] / slideshow / qa / debug / nodetree.sh
bloba4ef1c107f7aa91a37739e015d653c455fa824f4
1 #!/bin/bash
3 # $Revision: 1.3 $
5 # Last changes: $Author: kz $ $Date: 2005-01-21 16:54:21 $
7 # Generate node tree from verbose logfile
9 # HOWTO USE
10 # =========
12 # First of all, you need to recompile modules slideshow and canvas
13 # with VERBOSE=t set in the environment, and debug=t defined at the
14 # build tool command line. Then run your slideshow and redirect stdout
15 # to a file.
17 # Then, call 'nodetree.sh trace-file > tree.ps' to generate a
18 # PostScript file for the AnimationNode tree generated during the show.
19 # Since these easily get pretty huge, use only one page, and try to
20 # limit the slide content (which have effects assigned, that is) to
21 # the bare minimum (to reproduce your bug, or whatever you need this
22 # for).
24 # The generated output will have all nodes color-coded with their state
25 # at the point when the tree was dumped (see colors.sh for the color
26 # codes)
28 # When looking for the mechanics that generate the relevant output,
29 # grep for the DEBUG_NODES_SHOWTREE macros in the slideshow source:
30 # Each such place dumps the current node tree to the trace output. Thus,
31 # if you need to check the tree state at other places or times, just add
32 # a DEBUG_NODES_SHOWTREE (or DEBUG_NODES_SHOWTREE_WITHIN, that is).
35 ###################################################
37 # Generate node tree
39 ###################################################
41 egrep "Node connection|Node state" $1 | \
42 sed -e '/Node state/ s/.*Node state.*: \(.*\)/\1/' \
43 -e '/Node connection/ s/.*Node connection.*: \(n.*\)/\1/' | \
45 awk 'BEGIN { print "digraph Event_network {" }; { print } END { print "}" }' | \
48 # fill a complete A1 page with graph output
49 dot -Gratio=fill -Gsize=23,33 -Tps
50 #dot -Gratio=fill -Gorientation=land -Tps