blockdiag generate block-diagram image file from spec-text file.
- 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 .
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.
Few examples are available. You can get more examples at blockdiag.com .
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 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; }
Execute blockdiag command:
$ blockdiag simple.diag $ ls simple.png simple.png
- Python 2.6, 2.7, 3.2, 3.3
- Pillow 2.2.1
- funcparserlib 0.3.6
- setuptools
Apache License 2.0
- Fix bugs
- Fix bugs
- Support python 3.2 and 3.3 (thanks to @masayuko)
- Drop supports for python 2.4 and 2.5
- Replace dependency: PIL -> Pillow
- Fix bugs
- Fix bugs
- Fix bugs
- Add external imagedraw plugin supports
- Add node attribute: label_orientation*
- Fix bugs
- Optimize algorithm for rendering shadow
- Add options to docutils directive
- Fix bugs
- Add --ignore-pil option
- Fix bugs
- Add diagram attribute: shadow_style
- Add font path for centos 6.2
- Add a setting 'antialias' in the configuration file
- Fix bugs
- Support for readthedocs.org
- reST directive supports :caption: option
- Fix bugs
- Embed source code to SVG document as description
- Fix bugs
- Add new edge.hstyles: oneone, onemany, manyone, manymany
- Add edge attribute: description (for build description-tables)
- Fix bugs
- Add new edge type for data-models (thanks to David Lang)
- Add --no-transparency option
- Fix bugs
- Support font-index for TrueType Font Collections (.ttc file)
- Allow to use reST syntax in descriptions of nodes
- Fix bugs
- Add node attribute: href (thanks to @r_rudi!)
- Fix bugs
- Add shape: square and circle
- Add fontfamily attribute for switching fontface
- Fix bugs
- Add plugin: attributes
- Change plugin syntax; (cf. plugin attributes [attr = value, attr, value])
- Fix bugs
- Fix bugs
- Add group attribute: shape
- Fix bugs
- Add node attribute: linecolor
- Rename diagram attributes:
- fontsize -> default_fontsize
- default_line_color -> default_linecolor
- default_text_color -> default_textcolor
- Add docutils extention
- Fix bugs
- Add node attribute: fontsize
- Add edge attributes: thick, fontsize
- Add group attribute: fontsize
- Change color of shadow in PDF mode
- Add class feature (experimental)
- Add handler-plugin framework (experimental)
- node.style supports dashed_array format style
- Fix bugs
- Add node attributes: width and height
- Fix bugs
- Fix bugs
- Replace SVG core by original's (simplesvg.py)
- Refactored
- Fix bugs
- Add node attribute: textcolor
- Add group attribute: textcolor
- Add edge attribute: textcolor
- Add diagram attributes: default_text_attribute
- Fix beginpoint shape and endpoint shape were reversed
- Fix bugs
- Add diagram attributes: default_node_color, default_group_color and default_line_color
- Fix bugs
- Add icon attribute to node
- Make transparency to background of PNG images
- Fix bugs
- Fix bugs
- Fix bugs
- Fix bugs
- Support Pillow as replacement of PIL (experimental)
- Fix bugs
- Allow dot characters in node_id
- Fix bugs
- Fix bugs
- Support input from stdin
- Fix bugs
- Add node.stacked
- Add node shapes: dots, none
- Add hiragino-font to font search list
- Support background image fetching from web
- Add diagram.edge_layout (experimental)
- Fix bugs
- Change license to Apache License 2.0
- Fix bugs
- Add --separate option and --version option
- Fix bugs
- Update layout engine
- Update requirements: PIL >= 1.1.5
- Update parser for tokenize performance
- Add --nodoctype option
- Fix bugs
- Add many testcases
- Fix bugs
- Add new layout manager for portrait edges
- Fix bugs
- Support multiple nodes relations (cf. A -> B, C)
- Support node group declaration at attribute of nodes
- Fix bugs
- Fix bugs
- Use UTF-8 characters as Name token (by @swtw7466)
- Fix htmlentities included in labels was not escaped on SVG images
- Fix bugs
- Add default_shape attribute to diagram
- Fix edge has broken with antialias option
- Support node shape
- Change noderenderer interface to new style
- Render dashed ellipse more clearly (contributed by @cocoatomo)
- Support PDF exporting
- Support diagram.shape_namespace
- Add new node shapes; mail, cloud, beginpoint, endpoint, minidiamond, actor
- Support plug-in structure to install node shapes
- Fix bugs
- Support node shape (experimental)
- Fix bugs
- Fix bugs
- Fix bugs
- Implement 'folded' attribute for edge
- Refactor layout engine
- Support nested groups.
- Specify direction of edges as syntax (->, --, <-, <->)
- Fix bugs.
- Remove debug codes.
- Support NodeGroup.label.
- Implement --separate option (experimental)
- Fix right-up edge overrapped on other nodes.
- Support configration file: .blockdiagrc
- Fix unicode errors for UTF-8'ed SVG exportion.
- Refactoring codes for running on GAE.
- Fix license text on diagparser.py
- Update layout engine.
- Support background-image of node (SVG)
- Support labels for edge.
- Fix bugs.
- Support background-color of node groups.
- Draw edge has jumped at edge's cross-points.
- Fix bugs.
- Fix bugs.
- Support SVG exporting.
- Support dashed edge drawing.
- Support background image of nodes (PNG only)
- Fasten anti-alias process.
- Fix text was broken on windows.
- Add --antialias option.
- Fix bugs.
- Fix edge bugs.
- Fix bugs.
- Fix package style.
- Update layout engine.
- Support group { ... } sentence for create Node-Groups.
- Support numbered badge on node (cf. A [numbered = 5])
- first release