0.2.0 • Published 3 years ago
@deathbeds/jupikchr v0.2.0
jupickhr
| docs | install | extend | demo |
|---|---|---|---|
pikchr text-based diagrams for JupyterLab, etc.
features
- supports writing and rendering
pikchrin:pikchrfenced code blocks in.ipynbcells and.mddocuments- rich display for the
text/x-pikchrMIME type - Open With... ⯈ Pikchr for
.pikchrtext documents jupickhr.widget.Pikchrfor live updating
- generates:
- portable
imgtags (with fixed up special entities and fonts)- these can be drag-and-dropped directly into other tools, like ipydrawio
- inline SVG
- portable
- light, dark and autodetected themes
install
pip install jupikchr "jupyterlab>=3.4,<4"or
mamba install -c conda-forge jupikchr "jupyterlab>=3.4,<4"or
conda install -c conda-forge jupikchr "jupyterlab>=3.4,<4"If you want to integrate with, or just hack on,
jupikchritself, try the development installation steps.
how it works
- in the browser
pikchrsource and metadata is found:- in Markdown by jupyterlab-markup
- in
text/x-pikchrrich display outputs - in the Jupyter widget
- a WebWorker is started which loads the
pickchrC executable, compiled to WebAssembly- these are vendored directly from fossil's pikchrshow
- the resulting HTML is either displayed directly, or embedded inside a portable
imgtag- in the case of rich outputs, the
text/htmldisplay type is also stored inside the output as a fallback, e.g. fornbconvert
- in the case of rich outputs, the