/[ldap]/ldif2dot
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /ldif2dot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Fri May 26 10:41:38 2000 UTC (21 years, 6 months ago) by dpavlin
Branch: MAIN
convert ldif file to graphviz dot

1 dpavlin 1.1 #!/usr/local/bin/perl -w
2    
3     print "digraph ldif {\n";
4    
5     while(<>) {
6     chomp;
7     if (/^dn: *(.*)/) {
8     @dn=split(/, */,$1);
9     undef $lval; # last value
10     foreach (@dn) {
11     ($el,$val) = split (/= */,$_);
12     next if ($el eq "uid");
13     if (!defined($exist{$val})) {
14     $exist{$val}++;
15     }
16     if ($lval && $conn{$val} ne $lval) {
17     print "\"$val\" -> \"$lval\";\n";
18     $conn{$val}=$lval;
19     }
20     $lval = $val;
21     }
22     }
23     }
24    
25     print "}\n";

  ViewVC Help
Powered by ViewVC 1.1.26