No release in over 3 years
Low commit activity in last 3 years
A library that takes a ruby description of a mind map and outputs a graphviz dot file
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

ruby-graphviz-mindmap

So this actually isn't using the ruby GraphViz library right now, but I mean to make it do so. It mostly just generates dot format files at the moment.

Installation

You need graphviz installed. On ubuntu it's just sudo apt-get install graphviz

Then gem install ruby-graphviz-mindmap

Usage

Create a script in which you layout your mind map:

require 'ruby-graphviz-mindmap'
map = GraphViz::MindMap.build "foo", overlap: false
map.node 'baz', color: :red, shape: :box do
  node 'bar' do
    node 'ha'
  end 

  node 'two', color: :blue do
    inherit!
    node 'three' do
      node 'Four And'
      node 'ha', color: :green
    end 
  end 
end 

File.open('output.dot', 'wb'){|f| f << map.to_dot }

That will output a dot file ready for processing with a graphviz command. I like neato for this (documentation on neato):

neato -Tjpeg output.dot -o output.jpg

You'll get something that looks like this:

output.jpg

Contributing to ruby-graphviz-mindmap

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright (c) 2018 Jessica Szmajda. See LICENSE.txt for further details.