Manim extension to generate UML sequence diagrams
Project description
Manim Sequence Diagrams
Installation
Following manim's guide on how to install plugins on this guide, but TL;DR is:
run
pip install manim-sequence-diagram
manim cfg write
this will generate a manim.cfg
file somewhere, you'll need to add to it this package
[CLI]
enable_wireframe = False
dry_run = False
tex_template =
plugins = manim_sequence_diagram
You'll know if you have it working if you run
manim plugins -l
and it shows something like
Manim Community v0.16.0.post0
Plugins:
• manim_sequence_diagram
Generate Examples
manim -pql docs/examples.py ClientRaceDatabaseNetwork
Although one day, we'd like to support proper sequence diagram syntax, for now, it's all in python.
Here's a quick example of how it works
from manim import *
from manim_sequence_diagram import *
class ClientRaceDatabaseNetwork(MovingCameraScene):
def construct(self):
actor_client = SeqActor(name="client")
actor_delivery = SeqActor(name="delivery")
actor_server = SeqActor(name="server")
actor_db = SeqActor(name="database")
for anime in SeqAction.introduce_actors(actor_client, actor_server, actor_delivery, actor_db):
self.play(anime)
# Move the camera yourself!
self.play(self.camera.frame.animate.move_to(DOWN * 3))
for anime in SeqAction.subject_gives_gift_to_target(
subject=actor_client,
gift=SeqObject(name="async getData"),
target=actor_delivery
):
self.play(anime)
Development
You'll need poetry to properly get this to work, checkout their guide here for how to install. Once you do, do the following to setup
make install
make dev
In order to generate examples, you'll need to setup your manim cfg
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file manim_sequence_diagram-0.1.0.tar.gz
.
File metadata
- Download URL: manim_sequence_diagram-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.8.13 Darwin/22.2.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34f228f4e12c8c22b76efd18e3ff10a1644c66ead93f00b48ecea1021583bb9a |
|
MD5 | c32cd9b3a3e2455fadc8ed30fa706116 |
|
BLAKE2b-256 | f1d655bbf25075d2f865d25985ef7e801fcb9f06d3568688b42a4840882e043a |
File details
Details for the file manim_sequence_diagram-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: manim_sequence_diagram-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.8.13 Darwin/22.2.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fad1c07cd8d4c0b61f5d1c27a764496bd358f49d9656f8581c5715d469cc423 |
|
MD5 | 5c458f8fa5558552013331ecc2db6c5b |
|
BLAKE2b-256 | 3cea2d636ed77675c8dda504be6f102de3d65f25da6f00dc889b6b91b99737a9 |