sytsereitsma / mdbook-plantuml

mdBook preprocessor to render PlantUML diagrams to png images in the book output directory
MIT License
76 stars 14 forks source link

Add experimental support of diagram generation through a pipe #55

Closed albenik closed 1 year ago

albenik commented 1 year ago

Added the ability of generating diagram through plantuml -pipe command without using temporary diagram source files generation.

Which allow us to use such kind of plantuml code with relative imports paths.

@startuml
!include diagram.puml
@enduml

Due to lack of tests to cover the edge cases of added implementation I hid this functional under the feature flag called exp-cmdline-pipe. Then enabled it's replaces the original shell command implementation with the new one.

sytsereitsma commented 1 year ago

Never looked further than the regular PlantUML commands, thanks. This is quite a nice feature, especially when starting plantuml only once and feeding it new images. I will need to investigate this further to see if the pipe option can be leveraged a bit further.

sytsereitsma commented 1 year ago

@albenik I was midway another refactoring and incorporated your work/idea in that.