sunhwan / jupyter-kroki-magic

A Jupyter Notebook %%magic for drawing diagrams using kooky.io
MIT License
5 stars 2 forks source link

Add option to modify URL during install time to support self-hosted Kroki.io intances #1

Open tafkos opened 2 years ago

tafkos commented 2 years ago

There is a way to deploy Kroki.io instance as docker container, e.g. inside corporate, campus networks. So it would be great option to add '--install-option' support to specify certain 'url' for during install time:

https://github.com/sunhwan/jupyter-kroki-magic/blob/d2c3cc48d9b162fdcfb14b7cebb96ad36d8f52e1/krokimagic/krokimagic.py#L22

and if not specified then keep kroki.io by default.

$ pip install --install-option="--url='http://kroki.selfhosted.local:1888'" jupyter-kroki-magic
pgrund commented 1 year ago

I actually had a similiar idea, but utilizing os.env.get('KROKI_ENDPOINT') as kroki client et.al. are using already ...

pgrund commented 1 year ago

see https://github.com/sunhwan/jupyter-kroki-magic/pull/2