parent
b0ef47e636
commit
ac8d5d62b6
|
@ -1,5 +1,5 @@
|
||||||
__pycache__
|
__pycache__
|
||||||
public
|
public/*.svg
|
||||||
|
|
||||||
github_schema.json
|
github_schema.json
|
||||||
github_schema.py
|
github_schema.py
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
svg .graph > polygon {
|
||||||
|
fill: #0d1117;
|
||||||
|
}
|
||||||
|
svg .node polygon {
|
||||||
|
stroke: #c9d1d9;
|
||||||
|
}
|
||||||
|
svg .node.open polygon {
|
||||||
|
fill: #057715;
|
||||||
|
}
|
||||||
|
svg .node.committed polygon {
|
||||||
|
fill: #1862b9;
|
||||||
|
}
|
||||||
|
svg .node.closed polygon {
|
||||||
|
fill: #b93b1e;
|
||||||
|
}
|
||||||
|
svg .node polyline {
|
||||||
|
stroke: #c9d1d9;
|
||||||
|
}
|
||||||
|
svg .edge path {
|
||||||
|
stroke: #c9d1d9;
|
||||||
|
}
|
||||||
|
svg .edge polygon {
|
||||||
|
fill: #c9d1d9;
|
||||||
|
stroke: #c9d1d9;
|
||||||
|
}
|
||||||
|
svg text {
|
||||||
|
fill: #c9d1d9;
|
||||||
|
}
|
||||||
|
}
|
|
@ -234,10 +234,13 @@ def main():
|
||||||
if n.title:
|
if n.title:
|
||||||
attrs['label'] = '\n'.join(['%s' % n] + wrap(n.title, 25))
|
attrs['label'] = '\n'.join(['%s' % n] + wrap(n.title, 25))
|
||||||
if n.state == 'closed':
|
if n.state == 'closed':
|
||||||
|
attrs['class'] = 'closed'
|
||||||
attrs['fillcolor'] = '#fad8c7'
|
attrs['fillcolor'] = '#fad8c7'
|
||||||
elif n.is_committed:
|
elif n.is_committed:
|
||||||
|
attrs['class'] = 'committed'
|
||||||
attrs['fillcolor'] = '#a6cfff'
|
attrs['fillcolor'] = '#a6cfff'
|
||||||
else:
|
else:
|
||||||
|
attrs['class'] = 'open'
|
||||||
attrs['fillcolor'] = '#c2e0c6'
|
attrs['fillcolor'] = '#c2e0c6'
|
||||||
attrs['penwidth'] = 2 if n in do_next else 1
|
attrs['penwidth'] = 2 if n in do_next else 1
|
||||||
attrs['shape'] = 'component' if n.is_pr else 'box'
|
attrs['shape'] = 'component' if n.is_pr else 'box'
|
||||||
|
@ -259,6 +262,7 @@ def main():
|
||||||
|
|
||||||
# Draw the result!
|
# Draw the result!
|
||||||
ag.graph_attr['rankdir'] = 'LR'
|
ag.graph_attr['rankdir'] = 'LR'
|
||||||
|
ag.graph_attr['stylesheet'] = 'zcash-dag.css'
|
||||||
ag.layout(prog='dot')
|
ag.layout(prog='dot')
|
||||||
os.makedirs('public', exist_ok=True)
|
os.makedirs('public', exist_ok=True)
|
||||||
ag.draw('public/zcash-%s-dag.svg' % DAG_VIEW)
|
ag.draw('public/zcash-%s-dag.svg' % DAG_VIEW)
|
||||||
|
|
Loading…
Reference in New Issue