Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blockdiag/blockdiag
https://github.com/blockdiag/blockdiag
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/blockdiag/blockdiag
- Owner: blockdiag
- License: apache-2.0
- Created: 2018-05-03T07:36:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-08-13T08:23:51.000Z (over 1 year ago)
- Last Synced: 2024-10-02T14:18:09.143Z (2 months ago)
- Language: Python
- Size: 4.02 MB
- Stars: 219
- Watchers: 12
- Forks: 51
- Open Issues: 76
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - blockdiag/blockdiag - (others)
README
`blockdiag` generate block-diagram image file from spec-text file.
.. image:: https://github.com/blockdiag/blockdiag/actions/workflows/main.yml/badge.svg
:target: https://github.com/blockdiag/blockdiag/actions/workflows/main.yml
:alt: GitHub Action CI build status.. image:: https://img.shields.io/pypi/v/blockdiag
:target: https://pypi.python.org/pypi/blockdiag/
:alt: Latest PyPI version.. image:: https://img.shields.io/pypi/dm/blockdiag
:target: https://pypi.python.org/pypi/blockdiag/
:alt: Number of PyPI downloadsFeatures
========
* 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 pip::
$ sudo pip install blockdiag
If you want to export as PDF format, give pdf arguments::
$ sudo pip install "blockdiag[pdf]"
Copy and modify ini file. example::
$ cp /blockdiag/examples/simple.diag .
$ vi simple.diagPlease 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.pngRequirements
============
* Python 3.7 or later
* Pillow 3.0 or later
* funcparserlib 1.0.0a0 or later
* reportlab (optional)
* wand and imagemagick (optional)
* setuptoolsLicense
=======
Apache License 2.0