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

Try basic auto detection of plantuml executable #6

Open sytsereitsma opened 5 years ago

sytsereitsma commented 5 years ago

Simply try various options (query plantuml version) and use the first successful one.

jacobdr commented 1 year ago

Relevant code is here: https://github.com/sytsereitsma/mdbook-plantuml/blob/d1dd726c13671b80eae089cfb2f35c12548672d5/src/plantuml_backend_factory.rs#L15

jacobdr commented 1 year ago

I advocate for this or adding some alternates (a KISS approach to check also /usr/local/bin) as on OS X the System Integrity Protection makes it quite difficult to symlink into this location. I think my installation setup is pretty common for the plantuml binary (installed via homebrew). I hit this issue with creating the /usr/bin/plantuml symlink, but plantuml is on my PATH

For those arriving at this issue one workaround is to use the plantuml-cmd option like:

[preprocessor.plantuml]
plantuml-cmd="plantuml.exe"

but this might not be as portable

t-theunissen-moovd commented 5 months ago

i also vote this up. i've been trying for a long time to setup plantuml with mdbook but it takes litterly weeks before i give up. in the docs say the plantuml.EXE must be executable from the path. but almost nowhere there is a link to an .exe file of plantuml they only have .jar files. where are we supose to get it?