home
/
code
/
khome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3cfc001
)
Improve tracking and showing init and final
author
Siraaj Khandkar
<siraaj@khandkar.net>
Mon, 21 Sep 2020 19:18:56 +0000
(15:18 -0400)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Mon, 21 Sep 2020 20:17:35 +0000
(16:17 -0400)
home/bin/seq2dot
patch
|
blob
|
blame
|
history
diff --git
a/home/bin/seq2dot
b/home/bin/seq2dot
index
d91e45b
..
ac42323
100755
(executable)
--- a/
home/bin/seq2dot
+++ b/
home/bin/seq2dot
@@
-4,17
+4,39
@@
# highlighting frequencies of pairings.
#
# highlighting frequencies of pairings.
#
-BEGIN {print "digraph {"}
-
{
{
- prev = prev ? prev : "--"
curr = $0
curr = $0
+}
+
+NR == 1 {
+ init = curr
+}
+
+NR > 1 {
++nlinks[prev]
++nlinks_to[prev, curr]
++nlinks[prev]
++nlinks_to[prev, curr]
+}
+
+{
prev = curr
}
END {
prev = curr
}
END {
+ final = curr
+ print "digraph {"
+ if (init == final) {
+ printf \
+ "\"%s\" [penwidth=10, style=filled, fillcolor=tomato , fontcolor=white, color=yellowgreen];\n", \
+ init
+ } else {
+ printf \
+ "\"%s\" [penwidth=0, style=filled, fillcolor=yellowgreen, fontcolor=white];\n", \
+ init
+ printf \
+ "\"%s\" [penwidth=0, style=filled, fillcolor=tomato , fontcolor=white];\n", \
+ final
+ }
+
for (src_dst in nlinks_to) {
split(src_dst, sd, SUBSEP);
src = sd[1]
for (src_dst in nlinks_to) {
split(src_dst, sd, SUBSEP);
src = sd[1]
This page took
0.027285 seconds
and
4
git commands to generate.