Code Monkey home page Code Monkey logo

graphdown's Introduction

Graphdown

Markdown extension for embedding graphs.

Installation

$ gem install graphdown

Usage

CLI

$ graphdown sample.md

This command generates sample.html, which is parsed into HTML with graphs in format of SVG.

Redcarpet

require "redcarpet"
require "graphdown"

class BaseRenderer < Redcarpet::Render::HTML
  include Graphdown::Renderable
end

markdown = Redcarpet::Markdown.new(BaseRenderer, fenced_code_blocks: true)

Graph notation

Graphdown extends following notations for graphs.

  • [label name]: Node named "label name"
  • [label A], [label B], ...: Multiple nodes
  • ->: Unidirectional edge
  • <->: Bidirectional edge

Graphdown parses these notations into graph images in SVG format.

Examples

# Servers arrangement

[Load balancer] -> [Web server 1], [Web server 2], [Web server 3] -> [DB server], [Cache server]

Servers arrangement

# Path to naoty/graphdown on GitHub

[/] -> [/naoty] -> [/naoty/graphdown]
[/] -> [/search] -> [/naoty/graphdown]
[/] -> [/notifications] -> [/naoty/graphdown]

Path to graphdown

References

  • Kazuo Misue, Kouzou Sugiyama, On Automatic Drowing of Compound Graphs for Computer Aided Diagrammatical Thinking, Journal of Information Processing Society of Japan, 1989, Vol.30, No.10, p1324-1334.

graphdown's People

Contributors

naoty avatar mizchi avatar fukayatsu avatar

Stargazers

Daniel Batten avatar Maksym Kolotilkin avatar S. Suzuki avatar Indrajit Chakrabarty avatar Takuya Hashimoto avatar Hitoshi Tsuyuki avatar rochefort avatar griffin-stewie avatar Jeffrey Tumavitch avatar Cody Rayment avatar Satoru Mikami avatar mitto avatar sasezaki avatar Old account avatar Ryoji Miyazato avatar  avatar gong023 avatar KOMIYA Atsushi avatar がーみー avatar Y.Tsuyuzaki avatar Satoshi Ebisawa avatar Kazuhiro Serizawa avatar Tomohiro Taira avatar SHIMIZU Taku avatar taichi avatar OKAMURA Naoki aka nyarla / kalaclista avatar Masahiro Saito avatar YAMAOKA Hiroyuki avatar

Watchers

 avatar

Forkers

fukayatsu

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.