about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrancois Perrad <francois.perrad@gadz.org>2010-10-31 10:01:18 +0100
committerFrancois Perrad <francois.perrad@gadz.org>2010-10-31 10:01:18 +0100
commit84ad429dc79644573cccb6c842f200b2c8828a29 (patch)
tree58bad46caa4f8a7378496ebb52179ac4d4c20485
parentOhloh: typo (diff)
downloadapi-description-84ad429dc79644573cccb6c842f200b2c8828a29.tar.gz
spore2dot: add note
-rw-r--r--utils/spore2dot.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/spore2dot.pl b/utils/spore2dot.pl
index 7c11555..63d15a8 100644
--- a/utils/spore2dot.pl
+++ b/utils/spore2dot.pl
@@ -77,6 +77,7 @@ foreach my $spec (@specs) {
         }
         print ")";
         print " &otimes;" if $desc->{authentication} || $spec->{authentication};
+        print " DEPRECATED" if $desc->{deprecated};
         print "\\l";
         if ($ENV{SPORE_DETAILS}) {
             print "&nbsp;&nbsp;&nbsp;", $desc->{method}, " ", $desc->{path}, "\\l";
@@ -91,6 +92,16 @@ foreach my $spec (@specs) {
         }
     }
     print "}\"];\n\n";
+
+    my $note = $spec->{description} || $spec->{meta}->{documentation};
+    if ($note && $ENV{SPORE_NOTES}) {
+        $note =~ s/\n/\\n/g;
+        print "    \"__note__", $name, "\"\n";
+        print "        [label=\"", $note, "\" shape=note];\n\n";
+
+        print "    \"", $name, "\" -> \"__note__", $name, "\"\n";
+        print "        [arrowhead = none, arrowtail = none, style = dashed];\n\n";
+    }
 }
 print "}\n";