Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Andreas Huttenrauch
    @andreas-globi
    basic example
    <?php
    $data = <<<'EOT'
    graph TD
      A[ Anyone ] -->|Can help | B( Go to github.com/yuzutech/kroki )
      B --> C{ How to contribute? }
      C --> D[ Reporting bugs ]
      C --> E[ Sharing ideas ]
      C --> F[ Advocating ]
    EOT;
    
    $data = base64url_encode(gzcompress($data));
    $url = "https://kroki.io/mermaid/png/".$data;
    echo $url;
    
    
    function base64url_encode($data) {
        return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
    }
    Andreas Huttenrauch
    @andreas-globi
    Ahh - svg works - png does not
    And now I see your table of formats specifically says mermaid is svg only
    Shit. Gotta find another api for mermaid now
    Guillaume Grossetie
    @Mogztter
    yes but it should not return a 500, I will investigate
    I guess we could support png, feel free to open an issue at https://github.com/yuzutech/kroki
    Andreas Huttenrauch
    @andreas-globi
    done :-)
    Guillaume Grossetie
    @Mogztter
    Thanks :+1:
    Guillaume Grossetie
    @Mogztter
    gitlab-org/gitlab!44851 just got merged! Kroki is coming to GitLab 🎉
    danyill
    @danyill
    Nice work @Mogztter🎉💥💯, really enjoyed watching your MR track through. This is gonna be really nice for technical documentation and diagrams on issues 😃
    Andre Bossert
    @anb0s
    @Mogztter Congratulations, that is realy cool to have it @ GitLab!
    Guillaume Grossetie
    @Mogztter
    Thanks! It should be part of GitLab 13.7 (2020-12-22), I'm advocating for making Kroki available on gitlab.com as well :smile:
    Leif John Korshavn
    @korshavn
    Hi folks. Apologies if this is a question that has already been answered. My setup is Antora with Kroki extension using a local running kroki instance (docker). I want to have a shared skin for all the plantuml diagrams, and I got the impression that I could do that with the kroki-plantuml-include configuration option. But it doesn't seem to work for me. I don't get any error message from antora, the file I provide is just being ignored.
    Guillaume Grossetie
    @Mogztter
    Hi Leif, which version are you using of the Kroki extension? Could you please provide an example on how the kroki-plantuml-include attribute is configured?
    Leif John Korshavn
    @korshavn

    Hi Guillaume - the version is 0.9.2 (installed with npm install -g asciidoctor-kroki. The antora playbook is like this:

    ...
    asciidoc:
      attributes:
        kroki-server-url: http://localhost:8080
        kroki-fetch-diagram: true
        kroki-default-format: png
        kroki-plantuml-include: ./plantuml-config.txt
      extensions:
        - asciidoctor-kroki

    And the fileplantuml-config.txt is located in same folder as the playbook and it contains currently only a single modification of the skin:

    skinparam handwritten true
    Leif John Korshavn
    @korshavn
    Oh my goodness! It was the version - I hadn't discovered that this is supported from 0.10.0 !!! Thanks a lot! I love your work!
    Guillaume Grossetie
    @Mogztter
    Aha, excellent news :)
    I'm glad you are enjoying it, this feature was actually contributed by a community member!
    Marcel Stör
    @marcelstoer
    Guillaume Grossetie
    @Mogztter
    the error message in Asciidoctor Kroki is inaccurate, the response is empty but we should probably display the error code (400)
    Kroki returns a 400 Bad Request when there's a syntax error
    Joel Loewenstein
    @jlo2k:matrix.org
    [m]
    hallo, i just started with PlantUML, Asciidoc and docToolchain, which pointed me out to kroki. So pleas forgive me as this might be some kind of question that would not make sense to you: asciidoctor uses opal to transpile it to .js. was there ever the though to do a similar thing with kroki? Background is that there is an evolving converter asciidoctor-web-pdf that uses node.js and asciidoctor.js could then be used instead of the ruby or java version. And it would make sense in my opinion to then have kroki locally available on the same runtime, because you might not want your diagram content to pass the net. Of course in know you would use docker for this right now.
    ha, i just realized the author of asciidoctor-web-pdf has just posted above me. Makes me think it is the right forum.
    Guillaume Grossetie
    @Mogztter
    Hey Joel, I'm not sure I understand what you are asking
    Kroki is using diagram libraries written in a variety of programming languages (Go, Haskell, Java, JavaScript...)
    jlo2k
    @jlo2k:matrix.org
    [m]
    did the kroki project ever consider to tanspile kroki, so that you get a kroki.js?
    Guillaume Grossetie
    @Mogztter
    Are you talking about the Asciidoctor extension for Kroki?
    jlo2k
    @jlo2k:matrix.org
    [m]
    so the answer would be from the current viewpoint this is not a valid usecase due to the underlying tech...
    Guillaume Grossetie
    @Mogztter
    Indeed, Kroki is not a Ruby library but a server written in Java on top of Vert.x
    That's why we provide a Docker image, and I can confirm that Kroki (through the Asciidoctor extension) is working fine with Asciidoctor Web PDF
    jlo2k
    @jlo2k:matrix.org
    [m]
    i just wondered if... as a consumer if i can live on one runtime like node.js it is propably easier for me have the whole toolchain unter control. docToolchain intends to look at asciidoctor-web-pdf but is currently predominantely java based as well, ... gradle, asciidoctorj, asciidoctor-pdf in java as well if i recall correctly
    but it seems then the most easy options would have both on docker locally. ..
    currently it uses asciidoctor-diagram plugin
    Guillaume Grossetie
    @Mogztter
    As far as I know the latest version of Asciidoctor diagram can use Kroki
    jlo2k
    @jlo2k:matrix.org
    [m]
    but the asciidoctor-pdf as you surely know must be configuered a separated theme, using css for asciidoc-web-pdf and kroki could ease the use and allow more diagramming description languages to be used
    But the web services or local docker as well?
    Guillaume Grossetie
    @Mogztter
    If you don't want to start a Docker container or use Kroki you can also install PlantUML locally and use it through Asciidoctor diagram
    jlo2k
    @jlo2k:matrix.org
    [m]
    As mentioned i just started the topic a month ago much to learn...
    Guillaume Grossetie
    @Mogztter
    Eh eh, no worries, there are a lot of options 😉
    jlo2k
    @jlo2k:matrix.org
    [m]
    I obviously have to add a new topic to my to do list, thanks for pointing that out to me... the initial question was just something i wanted to have ask before going into the diretction with the docToolchain maintainer and then later finding out, that we could have had a total different approach...
    Guillaume Grossetie
    @Mogztter
    Unfortunately not all options are available on all runtime (Node.js, JVM, Ruby...) but we are srill trying to cover all the cases (for instance using Opal or JRuby) but sometimes it's just not possible
    Integrating Kroki in docToolchain would be great, and I'm open to make some adjustments to ease integration
    Joel Loewenstein
    @jlo2k:matrix.org
    [m]
    maybe it is due to my architectural background that i have a personal preference to one runtime, while developers are used to leveraging what is offered and combine it. but then of course leveraging docToolchain has a higer learning curve...
    thanks for quick reaction anyway...
    Guillaume Grossetie
    @Mogztter
    No worries, let me know if you have more questions ☺️
    Germo Görtz
    @germo:matrix.org
    [m]
    Is there a chart type supported by Kroki that can be used to define something like ER charts, but with relations not between entities, but between the individual columns of an entity? Or more generally, something like components or classes with sub-elements tabulated, with relations between those sub-elements?
    Guillaume Grossetie
    @Mogztter
    PlantUML class diagrams can do that: https://plantuml.com/fr/class-diagram#4829cb0f596c9350
    Germo Görtz
    @germo:matrix.org
    [m]
    @Mogztter: great! I didn't see this PlantUML example. I think, this is what I need.