FHIR Chat · check-plantumlfiles ?? · IG creation

Stream: IG creation

Topic: check-plantumlfiles ??


view this post on Zulip Jean Duteau (Dec 10 2020 at 03:43):

There is a heading in the publisher run that is 'check-plantumlfiles'. Does this do anything? Am I able to put plantuml files somewhere in the input and have them turned into images?

view this post on Zulip Elliot Silver (Dec 10 2020 at 03:51):

@Jose Costa Teixeira ?

view this post on Zulip Lloyd McKenzie (Dec 10 2020 at 03:56):

Yes - see the HRex IG for an example

view this post on Zulip Lloyd McKenzie (Dec 10 2020 at 03:56):

(Stick them with a .plantuml extension into input/images-source)

view this post on Zulip Jean Duteau (Dec 10 2020 at 03:58):

well, that solves a problem I solved a different way :)

view this post on Zulip Jean Duteau (Dec 10 2020 at 04:04):

hmm, do they have to be listed in the ImplementationGuide resource in some way?

view this post on Zulip Jean Duteau (Dec 10 2020 at 04:06):

because nothing happened when I put them there

view this post on Zulip Lloyd McKenzie (Dec 10 2020 at 04:13):

Nope. You'll have to do a {% include %} to reference them.

view this post on Zulip Jean Duteau (Dec 10 2020 at 04:14):

sure, but I don't see the images actually get generated. do they only get generated if I include them?

view this post on Zulip Lloyd McKenzie (Dec 10 2020 at 04:14):

They're generated as include files

view this post on Zulip Lloyd McKenzie (Dec 10 2020 at 04:14):

.svg

view this post on Zulip Lloyd McKenzie (Dec 10 2020 at 04:15):

They don't propagate to the output unless their included in something.

view this post on Zulip Jean Duteau (Dec 10 2020 at 04:15):

do I need to have an include directory? because they literally are not being generated at all

view this post on Zulip Lloyd McKenzie (Dec 10 2020 at 04:16):

They're not showing up in the temp folder?

view this post on Zulip Jean Duteau (Dec 10 2020 at 04:16):

ah, in temp/pages/_includes

view this post on Zulip Jean Duteau (Dec 10 2020 at 04:16):

(wasn't looking deep enough)

view this post on Zulip John Moehrke (Dec 10 2020 at 13:33):

but this only works if your input narrative is in html... I use markdown, so want it for markdown.

view this post on Zulip Jose Costa Teixeira (Dec 10 2020 at 14:31):

It's in my backlog

view this post on Zulip Jean Duteau (Dec 10 2020 at 16:03):

@John Moehrke it worked for me in my markdown. I have profile intro notes in markdown and added the include and it added my class diagram to the profile page like I expected

view this post on Zulip Jose Costa Teixeira (Dec 10 2020 at 16:11):

@Jean Duteau CI Build or local build?

view this post on Zulip Jean Duteau (Dec 10 2020 at 16:19):

Hmm it worked locally and I did not get any errors so I assumed it worked on CI build but the image that was generated says that graphviz wasn’t installed.

view this post on Zulip Jose Costa Teixeira (Dec 10 2020 at 16:20):

correct, that is a known limitation. I was surprised when you mentioned class diagrams

view this post on Zulip John Moehrke (Dec 10 2020 at 17:08):

I can confirm that this does work for markdown.

<div>
{%include usecase1-processflow.svg%}
</div>

view this post on Zulip John Moehrke (Dec 10 2020 at 17:09):

as long as it is a sequence diagram, not all PlantUML... thanks

view this post on Zulip Eric Haas (Jan 01 2021 at 02:19):

can we update the publisher do something like this directly in the markdown too?

{% plantuml %}
Bob -> Alice : Hello, how are you
Alice -> Bob : Fine, thank you, and you?
{% endplantuml %}

view this post on Zulip Eric Haas (Jan 01 2021 at 02:40):

Realistically instead of waiting for the IG to publish you are going to edit the diagram offline in a real time editor. So would be easier to just cut and paste the source inline.

view this post on Zulip Eric Haas (Jan 01 2021 at 02:46):

using the jekyll-plantuml-base64 plugin maybe

view this post on Zulip Jose Costa Teixeira (Jan 02 2021 at 15:56):

I think that is a good idea - I don't know how to add jekyll plugins to the template. I'd need help with that

view this post on Zulip Lloyd McKenzie (Jan 04 2021 at 17:13):

I don't see a reason to introduce a plugin here. I would think we'd want the graphics defined in a separate file from the text the graphics are embedded in...

view this post on Zulip Eric Haas (Jan 04 2021 at 17:27):

Introducing an inline version emulates tools like stackedit and hackmd. Editors will likely use an online editor anyway to create a diagram then copy and paste into the markdown directly make sense.

view this post on Zulip Jose Costa Teixeira (Jan 04 2021 at 17:32):

why would editors likely use an online editor? I make my diagrams in VisualStudio, using a plugin, which allows me to work with styles, use the correct version of plantuml...

view this post on Zulip Jose Costa Teixeira (Jan 04 2021 at 17:33):

still, a plugin could make it easier to put the content inline (a separate file is good if you want to reuse pictures, other than that I see no advantages).

view this post on Zulip Eric Haas (Jan 04 2021 at 18:00):

I meant any editor to get real time feedback

view this post on Zulip Lloyd McKenzie (Jan 04 2021 at 18:23):

If they're going to copy and paste, why not copy and paste into a separate file? It's cleaner to have SVGs behave the same regardless of how they're authored.

view this post on Zulip Lloyd McKenzie (Jan 04 2021 at 18:23):

Having them separate allows cleaner control (and management) over what's changed

view this post on Zulip Eric Haas (Jan 04 2021 at 18:39):

I see it as more overhead with little benefit. If you want reuse or to compartmentalized the diagrams you can always split out as an include.

view this post on Zulip Lloyd McKenzie (Jan 04 2021 at 18:52):

The benefit is keeping the markdown file as containing markdown and separating images into separate files so that if we ever need to transform or update imaging files, it's very obvious where they all are. Also, the people who know how to make plantuml diagrams and those who know how to do markdown aren't necessarily the same set of folks. If we have off-the-shelf editors that do both, then we might look at it. Otherwise, I see zero benefit to adding custom plugins. It's just more complexity for the tool and encourages mixing things that don't have a good reason to be mixed.

view this post on Zulip Jose Costa Teixeira (Jan 04 2021 at 18:53):

(there goes my very good excuse for someone to teach me how to add jekyll plugins)


Last updated: Apr 12 2022 at 19:14 UTC