Last active
March 26, 2021 10:54
-
-
Save meteozond/d816f113a9346074a6cbfc107240a7c0 to your computer and use it in GitHub Desktop.
Jupyter generated sequence diagram
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from IPython.core.display import display, HTML | |
from random import randint | |
def sequence_diagram(diagram): | |
d = randint(0,1000) | |
display(HTML(f''' | |
<script src="https://bramp.github.io/js-sequence-diagrams/js/webfont.js"></script> | |
<script src="https://bramp.github.io/js-sequence-diagrams/js/snap.svg-min.js"></script> | |
<script src="https://bramp.github.io/js-sequence-diagrams/js/underscore-min.js"></script> | |
<script src="https://bramp.github.io/js-sequence-diagrams/js/sequence-diagram-min.js"></script> | |
<div id="diagram{d}"></div> | |
<script> | |
var diagram = Diagram.parse(`{diagram}`); | |
diagram.drawSVG("diagram{d}", {{theme: 'simple'}}); | |
</script> | |
''')) |
Author
meteozond
commented
Mar 26, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment