-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TODO Items #8
Comments
Thanks for your plan. Just feel free to begin your work with following things noticed:
|
Hi - I have a Jupyter demo that wraps https://github.com/innovationOUtside/flowchart_js_jp_proxy_widget/ |
@psychemedia What a magic! A bit trouble to setup notwithstanding, it's useful. Here is the detailed way to setup:
$ pip install jp_proxy_widget
$ jupyter nbextension install --py --symlink --sys-prefix jp_proxy_widget
$ jupyter nbextension enable --py --sys-prefix jp_proxy_widget
$ jupyter labextension install @jupyter-widgets/jupyterlab-manager
$ jupyter labextension install jp_proxy_widget
$ pip install jp_flowchartjs
pip install pyflowchart
from jp_flowchartjs.jp_flowchartjs import *
from IPython.core.magic import register_cell_magic
from pyflowchart import Flowchart
@register_cell_magic
def flowchart_magic(line, cell):
"Send code to simulator."
return FlowchartWidget().charter(cell, embed=True)
@register_cell_magic
def pyflowchart_magic(line, cell):
"Generate flowchart code and send to flow charter."
fc = Flowchart.from_code(cell)
return FlowchartWidget().charter(str(fc.flowchart()), embed=True)
%%flowchart_magic
st=>start: Start
e=>end: End
op1=>operation: Generate
op2=>parallel: Evaluate
st(right)->op1(right)->op2
op2(path1, top)->op1
op2(path2, right)->e & %%pyflowchart_magic
import time
def demo(msg='demo'):
for i in range(10):
print(f'{msg} loopcount is {i}')
time.sleep(i) |
I just simplified the setup; now you should just need to install the package and in a notebook run |
It would be very handy indeed if there was a simple CLI for code->svg.
Flowchart.js is javascript (obviously), so how would you feel if I made a pull request that installed npm, and the npm 'diagrams' package? From there, it's really just a simple CLI interface once those 2 things are installed.
The text was updated successfully, but these errors were encountered: