From 33aafd211fbf13befba46e4fbd56c14f7f7e624e Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Mon, 21 Feb 2022 13:00:05 +0000 Subject: [PATCH] Render HTML version of DAG with pan-and-zoom --- .gitignore | 1 + index.html | 8 ++++---- zcash-issue-dag.py | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 7b9579f..a75c702 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ __pycache__ +public/*.html public/*.svg github_schema.json diff --git a/index.html b/index.html index 7417363..d21d9a7 100644 --- a/index.html +++ b/index.html @@ -7,9 +7,9 @@

Zcash Developers Hub

Eventually this will be a common resource for development teams working on Zcash.

Currently this is just hosting DAGs showing dependencies between issues and PRs, for several Zcash teams.

-

ECC core team DAG

-

ECC wallet team DAG

-

ZF DAG

-

Halo2-focused DAG

+

ECC core team DAG

+

ECC wallet team DAG

+

ZF DAG

+

Halo2-focused DAG

diff --git a/zcash-issue-dag.py b/zcash-issue-dag.py index 3562688..5800f55 100755 --- a/zcash-issue-dag.py +++ b/zcash-issue-dag.py @@ -276,6 +276,42 @@ def main(): os.makedirs('public', exist_ok=True) ag.draw('public/zcash-%s-dag.svg' % DAG_VIEW) + # Render the HTML version! + with open('public/zcash-%s-dag.svg' % DAG_VIEW) as f: + svg_data = f.read() + svg_start = svg_data.find(' + + + Zcash %s DAG + + + + + + + + +
%s
+ + + + +''' % (DAG_VIEW, svg_data[svg_start:]) + with open('public/zcash-%s-dag.html' % DAG_VIEW, 'w') as f: + f.write(html_data) + if __name__ == '__main__': if GITHUB_TOKEN and ZENHUB_TOKEN: