@cryptotaxi247 / kubo / commits / 37c32be10

bin graphmd for wonderful graphs

Juan Batiz-Benet committed Jan 7, 2015 at 13:44 UTC 37c32be10a4432dae36794a24dc25b4d5c9e1d8c
1 file changed +12
bin/graphmd new
+12
@@ -0,0 +1,12 @@
1 +#!/bin/sh
2 +
3 +if [ "$#" -ne 1 ]; then
4 + echo "usage: $0 <ipfs-path>..."
5 + echo "output merkledag links in graphviz dot"
6 + exit 1
7 +fi
8 +
9 +fmt='<src> -> <dst> [label="<linkname>"];'
10 +echo "digraph {"
11 +ipfs refs -r --format="$fmt" "$@" | awk '{ print "\t" $0 }'
12 +echo "}"