raghur / mermaid-filter

Pandoc filter for creating diagrams in mermaid syntax blocks in markdown docs
423 stars 75 forks source link

Need some help with this please #130

Open dnc77 opened 3 months ago

dnc77 commented 3 months ago

Hi There,

Thank you for providing the mermaid-filter. I think this is an awesome tool. I'm having trouble getting it to work though. I'm a techie but not a node person.

I got it installed and have managed to get a binary mermaid-filter which runs and accepts input. I also passed it through to pandoc as a filter with the -F parameter with no avail. I followed the instructions by Janik von Rotz at:

https://janikvonrotz.ch/2020/11/12/render-pdf-from-markdown-that-is-using-mermaid/ In summary, using the -F parameter to pass a markdown file.

In order to simplify things, I decided to pass to the mermaid-filter program a simple file as follows:

cat doc.mer | mermaid-filter

This reports an error. The document contains a mermaid diagram as follows:

sequenceDiagram
    Alice->>John: Hello John, how are you?
    John-->>Alice: Great!

Seems like mermaid-filter expects JSON but not sure what to give it. I have markdown files with diagrams and am using Ghostwriter and find myself having to use pandoc directly as it seems I'm not sure how to get Ghostwriter to support mermaid!

I am on Kubuntu. Any assistance would be greatly appreciated!

Thanks

Regards!!

Duncan

dnc77 commented 3 months ago

Just adding on to this. For the most part, this issue is solved. As per the comment by sunlin, attached below:

https://github.com/raghur/mermaid-filter/issues/125#issuecomment-2064322148

Basically, pupetteer being deprecated did not allow for the generation of the data and we need to set the environment variable to direct it to another app which can do that (chromium).

Now to get this working on ghostscript!

Thanks Sunlin.