Sha256: 494f14ffb444a672b388abd7151b5581572ac41e100de552f175aecb4e8098af
Contents?: true
Size: 683 Bytes
Versions: 1
Compression:
Stored size: 683 Bytes
Contents
require 'fileutils' def build(mode, chapter) sh "review-compile --target=#{mode} --footnotetext --singledirmode --stylesheet=style.css #{chapter} > tmp" mode_ext = {"html" => "html", "latex" => "tex", "idgxml" => "xml", "inao" => "inao"} FileUtils.mv "tmp", chapter.gsub(/re\z/, mode_ext[mode]) end def build_all(mode) sh "review-compile --all --target=#{mode} --footnotetext --singledirmode --stylesheet=style.css" end desc "build html (Usage: rake build re=target.re)" task :html do if ENV['re'].nil? puts "Usage: rake build re=target.re" exit end build("html", ENV['re']) end desc "build all html" task :html_all do build_all("html") end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
review-1.1.0 | test/sample-book/src/Rakefile |