Color up your mind-map
Posted by Okke Harsta at around evening time: March 31, 2007
And now for something completely different: how to mind-map in color with a little help from ruby?
I like to mind-map and the tool I use is FreeMind. You can add icons to your nodes, import pictures etc.etc. You can also add some color to your mind-map; select a node and change the color. For some -strange- reason I wanted to have all my nodes in different colors and after one minute of selecting nodes, changing colors I already abandoned that idea => too tedious. Ruby to the rescue: Freemind stores your mind-maps in XML format and this little ruby script turns your boring mind-map into something colorful:
[ruby]
require 'rexml/document'
include REXML
def traverse_element(element)
element.elements.each('node') do |e|
e.attributes['COLOR']= ("#%06x" % rand(0xffffff))
traverse_element(e)
end
end
doc = Document.new(File.new("original_boring_mindmap.mm"))
traverse_element(doc.root)
out = File.new("new_colorful_mindmap.mm","w")
out.write(doc)
[/ruby]
Nerdy? You bet ya.....
Filed under: General
June 17th, 2007 at 7:15 am
[…] “this little ruby script turns your boring mind-map into something colorful” […]