about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrancois Perrad <francois.perrad@gadz.org>2010-11-01 14:51:38 +0100
committerFrancois Perrad <francois.perrad@gadz.org>2010-11-01 14:51:38 +0100
commitdd7b7bbc243bfbaaaae33f48b2423f047b9b0572 (patch)
tree1e72a48bf01732cb3d33aeb6b01b9157d82e7e04
parentadd modularized CouchDB (diff)
downloadapi-description-dd7b7bbc243bfbaaaae33f48b2423f047b9b0572.tar.gz
spore2dot: split note & doc
-rw-r--r--utils/spore2dot.pl11
1 files changed, 10 insertions, 1 deletions
diff --git a/utils/spore2dot.pl b/utils/spore2dot.pl
index 63d15a8..f7e0e7e 100644
--- a/utils/spore2dot.pl
+++ b/utils/spore2dot.pl
@@ -93,7 +93,7 @@ foreach my $spec (@specs) {
     }
     print "}\"];\n\n";
 
-    my $note = $spec->{description} || $spec->{meta}->{documentation};
+    my $note = $spec->{description};
     if ($note && $ENV{SPORE_NOTES}) {
         $note =~ s/\n/\\n/g;
         print "    \"__note__", $name, "\"\n";
@@ -102,6 +102,15 @@ foreach my $spec (@specs) {
         print "    \"", $name, "\" -> \"__note__", $name, "\"\n";
         print "        [arrowhead = none, arrowtail = none, style = dashed];\n\n";
     }
+    my $doc = $spec->{meta}->{documentation};
+    if ($doc && $ENV{SPORE_NOTES}) {
+        $doc =~ s/\n/\\n/g;
+        print "    \"__doc__", $name, "\"\n";
+        print "        [label=\"", $doc, "\" shape=note];\n\n";
+
+        print "    \"", $name, "\" -> \"__doc__", $name, "\"\n";
+        print "        [arrowhead = none, arrowtail = none, style = dashed];\n\n";
+    }
 }
 print "}\n";