Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jbn/iplantuml
A Python package which defines a PlantUML cell magic for IPython.
https://github.com/jbn/iplantuml
ipython jupyter-notebook plantuml uml uml-diagram
Last synced: about 8 hours ago
JSON representation
A Python package which defines a PlantUML cell magic for IPython.
- Host: GitHub
- URL: https://github.com/jbn/iplantuml
- Owner: jbn
- License: mit
- Created: 2016-04-19T19:18:27.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-03-13T10:58:42.000Z (almost 2 years ago)
- Last Synced: 2025-01-07T12:10:56.611Z (15 days ago)
- Topics: ipython, jupyter-notebook, plantuml, uml, uml-diagram
- Language: Python
- Size: 18.6 KB
- Stars: 98
- Watchers: 7
- Forks: 29
- Open Issues: 14
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
.. image:: https://travis-ci.org/jbn/IPlantUML.svg?branch=master
:target: https://travis-ci.org/jbn/IPlantUMLWhat is it?
===========This Python package defines a `PlantUML `__ cell
magic for IPython. It lets you generate UML diagrams as inline SVG in
your notebook. I'll add embellishments as needed. But, for now, I just
needed something that worked and existed as a package (in pypi).I based my code on `Steven Burke `__'s
`plantuml
gist `__.Installation
------------First, install IPlantuml with pip.
.. code:: sh
pip install iplantuml
Then, install plantuml. On Debian based system you can install plantuml
package. Otherwise you can download ``plantuml.jar`` and copy it to
``/usr/local/bin/plantuml.jar``... code:: sh
sudo apt install plantuml
Alternatively you can set a custom path for plantuml.jar during
installation.. code:: sh
git clone https://github.com/jbn/IPlantUML.git
cd IPlantUML
python setup.py install iplantuml --jarpath /my/custom/path/plantuml.jarUsage
-----In Ipython, first,
.. code:: python
import iplantuml
then, create a cell like,
::
%%plantuml --jar
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
@endumlThe output will be the generated SVG UML diagram using the plantuml.jar on your local system. To utilise remote rendering on plantweb omit the `--jar` argument:
::
%%plantuml
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
@endumlBy default, the magic removes the intermediate (``tmp.uml``) and target
(``tmp.svg``) files. However, if you enter a name in the ``%%plantuml``
line, it retains both files of ``$name.uml`` and ``$name.svg``. For
example,::
%%plantuml auth
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
@endumlgenerates and retains ``auth.uml`` and ``auth.svg``.