Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
8c6dc4f5
Commit
8c6dc4f5
authored
Jan 07, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
graphmd: LR orientation
parent
d1bff333
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
bin/graphmd
bin/graphmd
+8
-0
No files found.
bin/graphmd
View file @
8c6dc4f5
...
...
@@ -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
"}"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment