View Source SayCheezEx.Graphs.Plantuml (say_cheez_ex v0.3.5)

PlantUML has an online server, e.g. this:

@startuml
Bob -> Alice : hello
@enduml

Will be translated into this:

https://www.plantuml.com/plantuml/svg/SoWkIImgAStDuNBAJrBGjLDmpCbCJbMmKiX8pSd9vt98pKi1IW80

So you don't need to have PlantUML installed.

Link to this section Summary

Functions

curl -oxxx.svg http://www.plantuml.com/plantuml/svg/~h407374617274756d6c0a416c6963652d3e426f62203a204920616d207573696e67206865780a40656e64756d6c
curl -oxxx.svg http://www.plantuml.com/plantuml/svg/~h407374617274756d6c0a416c6963652d3e426f62203a204920616d207573696e67206865780a40656e64756d6c

Should be possible without external dependencies

PlantUML allows simple encoding - makes URLs very long, but it's trivial to implement as described in https://plantuml.com/text-encoding

Link to this section Functions

Link to this function

as_plantuml_simple_url(payload, mode)

View Source
Link to this function

as_plantuml_url(payload, atom)

View Source
Link to this function

generate_content(uml_file)

View Source
curl -oxxx.svg http://www.plantuml.com/plantuml/svg/~h407374617274756d6c0a416c6963652d3e426f62203a204920616d207573696e67206865780a40656e64756d6c
Link to this function

generate_content_plantuml_http(recipe)

View Source
curl -oxxx.svg http://www.plantuml.com/plantuml/svg/~h407374617274756d6c0a416c6963652d3e426f62203a204920616d207573696e67206865780a40656e64756d6c
Link to this function

make_plantuml_url_deflated(s)

View Source

Should be possible without external dependencies

https://stackoverflow.com/questions/8742169/how-can-i-compress-a-list-with-zlib-in-erlang-and-decompress-it-back

Link to this function

make_plantuml_url_simple(s)

View Source

PlantUML allows simple encoding - makes URLs very long, but it's trivial to implement as described in https://plantuml.com/text-encoding

One can play along with different test cases with the online editor at https://www.plantuml.com/plantuml/uml/~h407374617274756d6c0a416c6963652d3e426f62203a204920616d207573696e67206865780a40656e64756d6c

E.g.

https://www.plantuml.com/plantuml/svg/~h407374617274756d6c0a416c6963652d3e426f62203a204920616d207573696e67206865780a40656e64756d6c

The text does not require the startuml / enduml tags.

Examples:

iex> Plantuml.make_plantuml_url_simple("SayCheezEx -> You : Elixir rocks")
"https://www.plantuml.com/plantuml/svg/~h536179436865657A4578202D3E20596F75203A20456C6978697220726F636B73"