jeremylightsmith / cards

a card wall generator - it reads a story map from excel, numbers, csv and generates a graphical view of it in visio, omnigraffle, or dot

Jeremy Lightsmith & Wes Maldonado (author)
Tue Mar 31 11:36:59 -0700 2009
cards / win / excel2visio.rb
100644 23 lines (18 sloc) 0.644 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$:.unshift File.expand_path(File.dirname(__FILE__)) + '/excel'
$:.unshift File.expand_path(File.dirname(__FILE__)) + '/visio'
require 'requirements_map'
require 'visio_generator'
require 'default_card_layout'
 
if (ARGV.size == 0)
    puts "usage : ruby excel2visio.rb <my excel file>"
    exit
end
 
include Visio
 
excel_file = ARGV[0]
map = RequirementsMap.new
map.load_from_excel(excel_file)
 
visio_file = excel_file.index('.xls') ? excel_file.gsub('.xls', '.vsd') : excel_file + '.vsd'
generator = VisioGenerator.new
layout = DefaultCardLayout.new
puts "creating #{visio_file}"
generator.create(map, visio_file, layout)