Skip to content

jrobertson/mindmapdoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introducing the mindmapdoc gem

require 'logger'
require 'mindmapdoc'

s = "
breakfast
  porridge
  coffee
lunch
  pizza
dinner
  cheese burgers
"
mmd = MindmapDoc.new(s, root: 'today')
puts mmd.to_doc

Markdown document output

# Today

## Breakfast

### Porridge

### Coffee

## Lunch

### Pizza

## Dinner

### Cheese burgers
mmd.to_svg

SVG Output

<title>G</title> <title>today</title> today <title>breakfast</title> breakfast <title>today->breakfast</title> <title>lunch</title> lunch <title>today->lunch</title> <title>dinner</title> dinner <title>today->dinner</title> <title>porridge</title> porridge <title>breakfast->porridge</title> <title>coffee</title> coffee <title>breakfast->coffee</title> <title>pizza</title> pizza <title>lunch->pizza</title> <title>cheese burgers</title> cheese burgers <title>dinner->cheese burgers</title>

Importing a markdown document

s2 = "
# Today

## Breakfast

### Porridge

### Coffee

## Lunch

### Pizza

## Dinner

### Cheese burgers
"

mmd = MindmapDoc.new(s2)
mmd.root  #=> Today
mmd.to_s

Tree Output

Breakfast
  Porridge
  Coffee
Lunch
  Pizza
Dinner
  Cheese burgers

Resources

mindmap mindmapdoc gem

About

Transforms a markdown document into a mindmap or a mindmap into a markdown document

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages