#!/usr/bin/env ruby lib = File.expand_path('../../lib/', __FILE__) $:.unshift(lib) unless $:.include?(lib) require 'fileutils' require 'slider' input = (ARGV[0] ||= 'slides') template = (ARGV[1] ||= 'basic') document = Slider::Document.new(input, template) slides = document.render File.open("#{input}.html", "w") do |file| file.write(slides) end unless File.exists?("#{input}-artefacts") FileUtils.cp_r(File.expand_path("../../templates/#{template}", __FILE__), "#{input}-artefacts") end