asciidoctor-kroki: [kroki-fetch-diagram] generated-file-name parameter not used
see #47 for my setup
My test presentation.adoc sets the imagesdir
and use generated-file-name
parameter to have all images with human readable names:
ifndef::imagesdir[:imagesdir: ./images]
== UML class diagram test with kroki
[plantuml, "diagram-classes", svg]
....
class BlockProcessor
class DiagramBlock
class DitaaBlock
class PlantUmlBlock
BlockProcessor <|-- DiagramBlock
DiagramBlock <|-- DitaaBlock
DiagramBlock <|-- PlantUmlBlock
....
It fetches the diagram and writes to images/210a0ebf2a7bb40669c4e3c895b2c9396f048327.svg
instead of images/diagram-classes.svg
like ascidoctor-diagram does.
It would be good to support the mandatory diagram parameters from asciidoctor-diagram.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 17 (17 by maintainers)
Commits related to this issue
- Use second optional positional attribute (target) as generated-file-name Closes #48 — committed to anb0s/asciidoctor-kroki by andboss 4 years ago
- Use second optional positional attribute (target) as generated-file-name Closes #48 — committed to anb0s/asciidoctor-kroki by anb0s 4 years ago
- resolves #48 use the target attribute as a prefix in the file name — committed to asciidoctor/asciidoctor-kroki by ggrossetie 2 years ago
- resolves #48 use the target attribute as a prefix in the file name — committed to asciidoctor/asciidoctor-kroki by ggrossetie 2 years ago
- resolves #48 use the target attribute as a prefix in the file name — committed to asciidoctor/asciidoctor-kroki by ggrossetie 2 years ago
- resolves #48 use the target attribute as a prefix in the file name (#374) — committed to asciidoctor/asciidoctor-kroki by ggrossetie 2 years ago
That’s a good idea! I wonder if it exists a better (shorter) hashing algorithm to make the filename more human-friendly? I did a quick search but I couldn’t find a good alternative.
I agree, let’s do that 👍🏻
The linked PR is closed, however this issue is still open. In my trials (using the RubyGem), it appears that the custom / human-readable name is still ignored (https://github.com/Mogztter/asciidoctor-kroki/blob/master/ruby/lib/asciidoctor/extensions/asciidoctor_kroki/extension.rb#L291). Is that accurate? If so, is the plan still to support the custom name, or is there a reason for always using the auto-generated name?
I’d be glad to help get this resolved.
That’s better! The failures are probably related to the path separator being
\
on Windows and not/
. I will add Windows on the CI to fix these issues.Edit: confirmed, I have the same result: https://github.com/Mogztter/asciidoctor-kroki/pull/66/checks?check_run_id=660834778. It’s related to new lines being
\n\r
on Windows 😵