dgudim / obsidian-universal-renderer

Obsidian plugin to render latex, dot, blockdiag, ditaa and other graphs
GNU General Public License v3.0
21 stars 1 forks source link

plantuml rendering throws error #2

Open StefanD986 opened 5 months ago

StefanD986 commented 5 months ago

I can't seem to get the plantuml rendering to work.

Steps to reproduce:

  1. Embed this in a note:

```plantuml @startuml class Foo @enduml ```

  1. Switch to reading view

Expected result

Should display rendered diagram

Actual result

Following error message is shown:

Error: "plantuml -nbthread,auto,-failfast2,-tsvg,-nometadata,-overwrite,/run/user/1001/app/md.obsidian.Obsidian/obsidian-plantuml/28a60796cc94afbdab722fa2819a0f8f" failed, Error: spawn plantuml ENOENT

Note:

I think the problem is in the expansion of the parameter list. When I run the command as printed in the error message manually, it fails. But if I modify the command as follows:

plantuml -nbthread,auto,-failfast2,-tsvg,-nometadata,-overwrite /run/user/1001/app/md.obsidian.Obsidian/obsidian-plantuml/28a60796cc94afbdab722fa2819a0f8f

it works (note that now the filename is not appended to the comma separated list, but instead separated by a comma from the options list.

(I'm actually not even sure whether the options should be comma separated at all?)

dgudim commented 5 months ago

This is because the renderer appends and prepends some stuff by default (I should probably make this an option). It's specified in 'presets' section here -> https://github.com/dgudim/obsidian-universal-renderer#presets As for the parameters, they are just printed like that to the console, they are not comma-separated in reality, I should also probably change that :)

TLDR: remove the @startuml/@enduml