All Projects → jihchi → mermaid.ink

jihchi / mermaid.ink

Licence: MIT license
Given a mermaid code (markdown-like), serve an image for you

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to mermaid.ink

Mermaid
Provides a parser function to generate diagrams and flowcharts with the help of the mermaid script language
Stars: ✭ 27 (-37.21%)
Mutual labels:  diagrams, flowchart
Flowy
The minimal javascript library to create flowcharts ✨
Stars: ✭ 8,636 (+19983.72%)
Mutual labels:  diagrams, flowchart
Grafana Flowcharting
Flowcharting, plugin for Grafana to create complexe visio's draws style like technical architectures, floorplan, diagrams, hierarchical schema based on draw.io
Stars: ✭ 463 (+976.74%)
Mutual labels:  diagrams, flowchart
Flowpoints.js
A developer-friendly library for creating flowcharts and diagrams.
Stars: ✭ 103 (+139.53%)
Mutual labels:  diagrams, flowchart
React Flow Chart
A flexible, stateless, declarative flow chart library for react.
Stars: ✭ 1,051 (+2344.19%)
Mutual labels:  diagrams, flowchart
Diagram Maker
A library to display an interactive editor for any graph-like data.
Stars: ✭ 2,086 (+4751.16%)
Mutual labels:  diagrams, flowchart
web-scraping
Web Scraping using puppeteer
Stars: ✭ 21 (-51.16%)
Mutual labels:  puppeteer
CrawlerSamples
This is a Puppeteer+AngleSharp crawler console app samples, used C# 7.1 coding and dotnet core build.
Stars: ✭ 36 (-16.28%)
Mutual labels:  puppeteer
Awesome-Retro-Docs
A curated collection of technical documentation for Arcades, Handhelds, Consoles, Computers and MCU’s.
Stars: ✭ 128 (+197.67%)
Mutual labels:  diagrams
macaca-puppeteer
Macaca puppeteer driver
Stars: ✭ 39 (-9.3%)
Mutual labels:  puppeteer
mkdocs-drawio-exporter
Exports your Draw.io diagrams at build time for easier embedding into your documentation
Stars: ✭ 50 (+16.28%)
Mutual labels:  diagrams
puppet-master
Puppeteer as a service hosted on Saasify.
Stars: ✭ 25 (-41.86%)
Mutual labels:  puppeteer
pdf-crawler
SimFin's open source PDF crawler
Stars: ✭ 100 (+132.56%)
Mutual labels:  puppeteer
Youtube-remove-copyright
A puppeteer script to trim copyrighted part from Youtube videos
Stars: ✭ 18 (-58.14%)
Mutual labels:  puppeteer
puppeteer-lambda
Module for using Headless-Chrome by Puppeteer on AWS Lambda.
Stars: ✭ 117 (+172.09%)
Mutual labels:  puppeteer
softest
Recording Browser Interactions And Generating Test Scripts.
Stars: ✭ 225 (+423.26%)
Mutual labels:  puppeteer
puppeteer-usage
基于puppeteer的实践和应用
Stars: ✭ 18 (-58.14%)
Mutual labels:  puppeteer
aws-pdf-textract-pipeline
🔍 Data pipeline for crawling PDFs from the Web and transforming their contents into structured data using AWS textract. Built with AWS CDK + TypeScript
Stars: ✭ 141 (+227.91%)
Mutual labels:  puppeteer
Whatsapp-Net
Generate a network graph of connections from your WhatsApp groups data
Stars: ✭ 75 (+74.42%)
Mutual labels:  puppeteer
docker-diagrams
An image for https://github.com/mingrammer/diagrams
Stars: ✭ 19 (-55.81%)
Mutual labels:  diagrams

mermaid.ink

GitHub CI

Getting Started

git clone https://github.com/jihchi/mermaid.ink.git
cd mermaid.ink
yarn
DEBUG=app:* yarn start

Open demo.html in your browser.

Demo

Given a mermaid code:

graph TD
  A[Christmas] -->|Get money| B(Go shopping)
  B --> C{Let me think}
  C -->|One| D[Laptop]
  C -->|Two| E[iPhone]
  C -->|Three| F[fa:fa-car Car]

Paste it onto mermaid-live-editor, you will get encoded string from the editor, for example:

eyJjb2RlIjoiZ3JhcGggVERcbkFbQ2hyaXN0bWFzXSAtLT58R2V0IG1vbmV5fCBCKEdvIHNob3BwaW5nKVxuQiAtLT4gQ3tMZXQgbWUgdGhpbmt9XG5DIC0tPnxPbmV8IERbTGFwdG9wXVxuQyAtLT58VHdvfCBFW2lQaG9uZV1cbkMgLS0-fFRocmVlfCBGW2ZhOmZhLWNhciBDYXJdXG4iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9fQ

Append the encoded string to the service URL, for example: https://mermaid.ink/img/<encoded_string>, you will get an image from the URL:

Flowchart

You could treat it as normal image and embed everywhere you want.

The images are generated with transparent background by default. To force a background color, append the query parameter ?bgColor=<color> to the URL. <color> is interpreted as hexadecimal by default. It is possible to use named colors by prefixing the color name with !:

  • https://mermaid.ink/img/<encoded_string>?bgColor=FF0000 will generate a JPEG with a red background.
    • By default, JPEG images are created. To create PNG or WEBP, append another query parameter type=<type>. https://mermaid.ink/img/<encoded_string>?bgColor=FF0000&type=png will generate a PNG with a red background.
  • https://mermaid.ink/svg/<encoded_string>?bgColor=!lightgray will generate an SVG with a light gray background.

Test

yarn test

Troubleshooting

I'm getting back HTTP 431 Request Header Fields Too Large error

Note that you may encounter DoS if you increase --max-http-header-size!

Thanks @ryepup for the analysis and work-arounds (#12)

  • If running locally, add --max-http-header-size to the start script in package.json

    • e.g. "start": "node --max-http-header-size=102400000 src/index.js"
  • If running via docker, use NODE_OPTIONS to increase --max-http-header-size

    • e.g. docker run --rm -it -e 'NODE_OPTIONS="--max-http-header-size=102400000"' -p 3000:3000 jihchi/mermaid.ink

Or, If running locally, run NODE_OPTIONS="--max-http-header-size=102400000" npm start to increase --max-http-header-size

Contributors

Many thanks for your help!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].