naddison36 / sol2uml

Solidity contract visualisation tool
MIT License
1.11k stars 252 forks source link

Add PlantUML output option #9

Open naddison36 opened 4 years ago

naddison36 commented 4 years ago

Here's an example PlantUML file https://gitlab.com/oax/asset-gateway-poc/blob/master/doc/dappsys.puml Here's what it renders as https://miro.medium.com/max/3072/1*JsZItNqHas8XV4zWar7U1Q.png

maurelian commented 4 years ago

I would really like to have this in order to be able to manually edit, rearchitect, and change the level of detail in the generated image.

I looked into the code, and was surprised to see that at no point does it actually pass through the uml language. Where would be the right place to generate the uml? I'm thinking ./src/ts/converter.ts, in a similar manner to convertUmlClasses2Dot()?

naddison36 commented 4 years ago

The code to convert the parsed Solidity classes to dot format is in the dotUmlClass function on the UmlClass class. In hindsight, I should have separated the generation of the dot format from the in-memory representation of the Solidity classes. I'll give it a go this weekend.

aspiers commented 2 years ago

I would love to see this too. PlantUML output quality is a lot higher, even the added colour makes the result visually a lot easier to digest.