Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nikolay-martynov/eip-for-plantuml
Library of EIP sprites for PlantUML
https://github.com/nikolay-martynov/eip-for-plantuml
Last synced: 4 days ago
JSON representation
Library of EIP sprites for PlantUML
- Host: GitHub
- URL: https://github.com/nikolay-martynov/eip-for-plantuml
- Owner: nikolay-martynov
- License: mit
- Created: 2019-07-04T21:01:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-03T17:53:47.000Z (over 2 years ago)
- Last Synced: 2024-04-09T14:23:14.462Z (7 months ago)
- Size: 261 KB
- Stars: 3
- Watchers: 0
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - nikolay-martynov/eip-for-plantuml - Library of EIP sprites for PlantUML (Misc)
README
= EIP sprites for PlantUML
This is inspired by unofficial PlantUML EIP library
by _aheil_ https://github.com/aheil/EIP-PlantUMLThe difference is that it was kind of small in terms of
number of shapes and very buggy.
Mix of C#, bash and lack of build automation did not
allow to effectively fix the problems.Instead, this sprite library is based on
Enterprise Integration Pattern Shapes for Gliffy
https://github.com/comsysto/enterprise-integration-pattern-shapes-for-gliffyIt is a pure sprite library just as
standard Cloudinsight PlantUML sprites library
https://github.com/rabelenda/cicon-plantuml-spritesThe nice thing about sprite library vs macro/function library
is that you have much more control over appearance
when writing your diagram.== Usage
First of all, include sprite library into your diagram:
```
!includeurl https://raw.githubusercontent.com/nikolay-martynov/eip-for-plantuml/master/dist/eip-for-plantuml.puml
```
Instead of master head you can specify any tag existing on GutHub. You can also
just download the file and add it to your project resources.Once included, you can use any sprite from the library just as any other sprite.
You can read about sprites here: http://plantuml.com/spriteThe following example mimics splitter diagram from
https://www.enterpriseintegrationpatterns.com/patterns/messaging/Sequencer.htmlimage::https://nikolay-martynov.github.io/eip-for-plantuml/generated-examples/example.svg[]
```
@startuml
!includeurl https://raw.githubusercontent.com/nikolay-martynov/eip-for-plantuml/master/dist/eip-for-plantuml.puml
legend top
You can use sprite
anywhere you can use text.
Rectangle content is most
convenient.
endlegend
rectangle "<$EIP_MessageDouble>\nNew order" as newOrder
rectangle "<$EIP_Splitter>\nSplitter" as splitter
rectangle "<$EIP_MessageSingleGreen>\nOrder item 1" as item1
rectangle "<$EIP_MessageSingleOrange>\nOrder item 2" as item2
newOrder -> splitter
splitter -> item1
item1 -[hidden] item2
@enduml
```All sprites come in multiple sizes determined by sprite name
suffix:.Sprite sizes
|===
|Suffix|Size|Small|50
||100
|Large|200
|===image::https://nikolay-martynov.github.io/eip-for-plantuml/generated-examples/sizes.svg[]
== List of sprites
You can find description of each pattern here:
https://www.enterpriseintegrationpatterns.com/patterns/messagingThe following diagram shows all sprites available in the library
(you can click the image to copy name of sprite you need):image::https://nikolay-martynov.github.io/eip-for-plantuml/generated-examples/all-sprites.svg[]
== Building
The project uses
link:https://github.com/cosminpolifronie/gradle-plantuml-plugin[PlantUML Gradle plugin]
to generate example images hosted on GitHub. This means you'll
need link:https://www.graphviz.org/[GraphViz] to generate these images.Due to
link:https://github.com/cosminpolifronie/gradle-plantuml-plugin/issues/1[issue]
with PlantUML Gradle plugin, you'll have to run build twice:```bash
./gradlew
./gradlew
```This will generate link:dist/eip-for-plantuml.puml[]
as well as images in link:generated-examples[]
used for GitHub documentation. These have to be added/committed
to git.