Commit 8c6dc4f5 authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

graphmd: LR orientation

parent d1bff333
......@@ -3,10 +3,18 @@
if [ "$#" -ne 1 ]; then
echo "usage: $0 <ipfs-path>..."
echo "output merkledag links in graphviz dot"
echo ""
echo "use it with dot:"
echo " $0 QmZPAMWUfLD95GsdorXt9hH7aVrarb2SuLDMVVe6gABYmx | dot -Tsvg"
echo " $0 QmZPAMWUfLD95GsdorXt9hH7aVrarb2SuLDMVVe6gABYmx | dot -Tpng"
echo " $0 QmZPAMWUfLD95GsdorXt9hH7aVrarb2SuLDMVVe6gABYmx | dot -Tpdf"
echo ""
exit 1
fi
fmt='<src> -> <dst> [label="<linkname>"];'
echo "digraph {"
echo " graph [rankdir=LR];"
ipfs refs -r --format="$fmt" "$@" | awk '{ print "\t" $0 }'
# ipfs refs -r --format="$fmt" "$@" | awk '{ print "\t" $0 }' | unflatten -l3
echo "}"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment