joethei / obsidian-plantuml

Generate PlantUML Diagrams inside Obsidian.md
MIT License
395 stars 23 forks source link

Support using local shell command in settings #48

Closed vlaw closed 1 year ago

vlaw commented 1 year ago

Is your feature request related to a problem? Please describe.

First of all, I'm using plantuml installed by homebrew, which will create a shell command, not just a jar file.

$ brew info plantuml
==> plantuml: stable 1.2023.5 (bottled)
Draw UML diagrams
https://plantuml.com/
...

$ which plantuml
/usr/local/bin/plantuml

The problem is, every time I upgrade plantuml , the local jar file path will change, like /usr/local/Cellar/plantuml/1.2023.5/libexec/plantuml.jar, I have to update the "Local Jar" settings to the new path every time.

Describe the solution you'd like

support using shell command-line in 'Local JAR" setting, like /usr/local/bin/plantuml. If the value is not end with .jar, which means it's not a jar path, using the value as command directly.

Describe alternatives you've considered

Add a new setting for command-line plantuml, but there will be a priority issue.

Additional context