blockdiag generates block-diagram image from text
Project description
blockdiag generate block-diagram image file from spec-text file.
Features
Generate block-diagram from dot like text (basic feature).
Multilingualization for node-label (utf-8 only).
You can get some examples and generated images on blockdiag.com .
Setup
Use easy_install or pip:
$ sudo easy_install blockdiag Or $ sudo pip install blockdiag
If you want to export as PDF format, give pdf arguments:
$ sudo easy_install "blockdiag[pdf]"
Copy and modify ini file. example:
$ cp <blockdiag installed path>/blockdiag/examples/simple.diag . $ vi simple.diag
Please refer to spec-text setting sample section for the format of the simpla.diag configuration file.
spec-text setting sample
Few examples are available. You can get more examples at blockdiag.com .
simple.diag
simple.diag is simply define nodes and transitions by dot-like text format:
diagram admin { top_page -> config -> config_edit -> config_confirm -> top_page; }
screen.diag
screen.diag is more complexly sample. diaglam nodes have a alternative label and some transitions:
diagram admin { top_page [label = "Top page"]; foo_index [label = "List of FOOs"]; foo_detail [label = "Detail FOO"]; foo_add [label = "Add FOO"]; foo_add_confirm [label = "Add FOO (confirm)"]; foo_edit [label = "Edit FOO"]; foo_edit_confirm [label = "Edit FOO (confirm)"]; foo_delete_confirm [label = "Delete FOO (confirm)"]; bar_detail [label = "Detail of BAR"]; bar_edit [label = "Edit BAR"]; bar_edit_confirm [label = "Edit BAR (confirm)"]; logout; top_page -> foo_index; top_page -> bar_detail; foo_index -> foo_detail; foo_detail -> foo_edit; foo_detail -> foo_delete_confirm; foo_index -> foo_add -> foo_add_confirm -> foo_index; foo_index -> foo_edit -> foo_edit_confirm -> foo_index; foo_index -> foo_delete_confirm -> foo_index; bar_detail -> bar_edit -> bar_edit_confirm -> bar_detail; }
Usage
Execute blockdiag command:
$ blockdiag simple.diag $ ls simple.png simple.png
Requirements
Python 2.6, 2.7, 3.2, 3.3, 3.4
Pillow 2.2.1 or later
funcparserlib 0.3.6 or later
reportlab (optional)
wand and imagemagick (optional)
setuptools
License
Apache License 2.0
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 blockdiag-1.5.3.tar.gz
.
File metadata
- Download URL: blockdiag-1.5.3.tar.gz
- Upload date:
- Size: 2.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ea3501fca0ca40fbacccc6f4ca177750e4b610009e021faa4868c0f6480ae8b |
|
MD5 | 24c1de40066687a6e0f401a97197f43c |
|
BLAKE2b-256 | 5ffca977375277e22f9a90e04fe7bd61e49c556bb1c1d7c8065277c21ba2fef9 |
File details
Details for the file blockdiag-1.5.3-py2.py3-none-any.whl
.
File metadata
- Download URL: blockdiag-1.5.3-py2.py3-none-any.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 253657d90c00cef1adaca8385c7074fe1c05cae2786dd4e1c4b333762fbf6185 |
|
MD5 | e4ca7dcb239e22ea0d249c5403e02620 |
|
BLAKE2b-256 | 1c17653639940e2a4f20e42af1738ec3350e972a11d0209ecd65c6034876cf60 |