minicomic-backend/minicomic-backend.rb

30 lines
599 B
Ruby
Raw Normal View History

2009-04-01 01:00:19 +00:00
#!/usr/bin/ruby
require 'yaml'
require 'time'
2010-01-10 14:54:53 +00:00
THIS_FILE = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
2009-04-01 01:00:19 +00:00
2010-01-10 14:54:53 +00:00
%w(classes modules).each do |which|
p File.dirname(THIS_FILE) + "/#{which}/*.rb"
Dir[File.dirname(THIS_FILE) + "/#{which}/*.rb"].each do |file|
require file
end
end
2009-04-01 01:00:19 +00:00
2009-04-01 01:12:01 +00:00
if !ARGV[0]
puts "Usage: #{File.basename(__FILE__)} <path to YAML file>"
exit 0
end
2009-04-01 01:12:40 +00:00
if !File.exists?(ARGV[0])
puts "#{ARGV[0]} doesn't exist!"
exit 1
end
2010-01-10 14:54:53 +00:00
config_loader = ConfigLoader.new
config = config_loader.load(ARGV[0])
file_processor = FileProcessor.new(config)
file_processor.process