mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
graphmd: LR orientation
This commit is contained in:
parent
d1bff333a5
commit
8c6dc4f5d3
@ -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 "}"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user