GithubHelp home page GithubHelp logo

antononcube / wl-mermaidjs-paclet Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 2.0 2.92 MB

Wolfram Language (aka Mathematica) paclet for obtaining Mermaid-JS images and graphics.

Home Page: https://resources.wolframcloud.com/PacletRepository/resources/AntonAntonov/MermaidJS/

License: MIT License

Mathematica 100.00%
mermaid-charting-language mermaid-cli mermaid-diagrams mermaidjs wolfram-language wolfram-mathematica

wl-mermaidjs-paclet's Introduction

MermaidJS WL paclet

Wolfram Language (aka Mathematica) paclet for obtaining Mermaid-JS images and graphics.

  • Mermaid lets you create diagrams and visualizations using text and code.

  • Mermaid has different types of diagrams: Flowchart, Sequence Diagram, Class Diagram, State Diagram, Entity Relationship Diagram, User Journey, Gantt, Pie Chart, Requirement Diagram, and others.

  • Mermaid-js is a JavaScript based diagramming and charting tool that renders Markdown-inspired text definitions to create and modify diagrams dynamically.

  • MermaidJS and MermaidInk are very similar; the main difference is in which environment the mermaid-js specifications are converted into images.

  • MermaidInk uses the Web API mermaid.ink.

  • MermaidJS uses a local installation of mermaid-cli via the shell program mmdc.

Here is an example:

MermaidInk["
classDiagram
    Animal <|-- Duck
    Animal <|-- Fish
    Animal <|-- Zebra
    Animal : +int age
    Animal : +String gender
    Animal: +isMammal()
    Animal: +mate()
    class Duck{
        +String beakColor
        +swim()
        +quack()
    }
    class Fish{
        -int sizeInFeet
        -canEat()
    }
    class Zebra{
        +bool is_wild
        +run()
    }
"]


Flowchart

Here is a diagram that clarifies the execution of MermaidInk:

graph TD
UI[/User input/]
MS{{Mermaid-ink server}}
WL{{Wolfram Language}}
WLnb>Notebook]
WLIC[[Input cell]]
WLOC[[Output cell]]
MI[MermaidInk]
UI --> WLIC -.- WLnb
WLIC --> MI -.- WL
MI --> |spec|MS
MS --> |image|MI
MI --> WLOC -.- WLnb
WLnb -.- WL

wl-mermaidjs-paclet's People

Contributors

antononcube avatar kirillbelovtest avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wl-mermaidjs-paclet's Issues

"Prolog" option duality

I use Linux with bash. So the hardcoded default "Prolog"->"~.zshrc" doesn't work well for me. Also, in order to have a nodejs that is not too old, I installed a fresh nodejs using nvm. In order for this to be recognized, I have found that I can provide a "Prolog" -> "source ~/.nvm/nvm.sh" option. The problem is that "Prolog" is also an option for Graphics so when I generate a diagram in "PDF" format, the option is also sent to the resulting Graphic resulting in a error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.