D'oh. Wrong silence code.
[uccvend-snackrom.git] / ROM-2002 / vend2viz.pl
1 #!/usr/bin/perl
2 #
3 #
4 #
5 $file = shift;
6
7 #
8 $curlabel = "";
9
10 print <<END;
11 digraph "Referer Graph" {
12   fontsize = 9;
13   ratio = auto;
14   rotate = 90;
15   page="8.2677165,11.692913" ; /* A4 page size */
16   margin="0,0" ; /* default margin is 0.5 inches */
17
18 END
19
20 open (F, $file);
21 while (<F>) {
22         ($address, $label, $rest) = split(/\t/,$_,3);
23         chomp $rest;
24
25         if ($label =~ /^(\w+):/) {
26                 $curlabel = $1;
27                 push @labellist, $curlabel;
28                 print " $curlabel [label=\"$curlabel\"];\n";
29         }
30
31 #       if ($rest =~ /(L\w\w\w\w)/) {
32 #               print "label $1 spotted in $curlabel\n";
33 #       }
34
35 }
36
37 close (F);
38
39 %fish = {};
40
41 open (F, $file);
42 while (<F>) {
43         ($address, $label, $rest) = split(/\t/,$_,3);
44         chomp $rest;
45
46         if ($label =~ /^(\w+):/) {
47                 $curlabel = $1;
48                 push @labellist, $label;
49 #               print "spotted label $curlabel\n";
50         }
51
52         if ($rest =~ /(L\w\w\w\w)/) {
53 #               print "label $1 spotted in $curlabel\n";
54                 print "$curlabel -> $1 [];\n";
55         }
56
57 }
58 close (F);
59
60 print "}\n";
61

UCC git Repository :: git.ucc.asn.au