public
Description: the wiki on wheels: a Ruby on Rails app for building dynamic, structured websites out of wiki cards
Homepage: http://www.wagn.org
Clone URL: git://github.com/wagn/wagn.git
Click here to lend your support to: wagn and make a donation at www.pledgie.com !
wagn / script / import
100755 8 lines (8 sloc) 0.303 kb
1
2
3
4
5
6
7
8
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require File.dirname(__FILE__) + '/../config/environment'
require 'lib/util/loader'
usage = "Usage: import <file> <format>"
file = ARGV[0] or raise(usage)
format = ARGV[1] || 'xml'
Wagn::Loader.new(file).send( "load_#{format}" )