lib/bookmaker/generator.rb in bookmaker-0.5.5 vs lib/bookmaker/generator.rb in bookmaker-0.6.0
- old
+ new
@@ -2,29 +2,34 @@
class Generator < Thor::Group
include Thor::Actions
def self.source_root
File.dirname(__FILE__) + "/../../templates"
end
- def build_config_file
+ def build_config_file
@title = File.basename(destination_root).gsub('-', ' ')
@name = full_name
@uid = Digest::MD5.hexdigest("#{Time.now}--#{rand}")
@year = Date.today.year
template "config.erb", "_bookmaker.yml"
end
def copy_templates
copy_file "latex.erb", "templates/pdf/layout.erb"
copy_file "dp-logo.png", "images/dp-logo.png"
-
+
copy_file "html.erb", "templates/html/layout.erb"
copy_file "user.css", "templates/html/user.css"
copy_file "layout.css", "templates/html/layout.css"
copy_file "syntax.css", "templates/html/syntax.css"
-
- copy_file "cover.html", "templates/epub/cover.html"
+
+ copy_file "back.erb", "templates/epub/back.erb"
+ copy_file "copyright.erb", "templates/epub/copyright.erb"
+ copy_file "cover.erb", "templates/epub/cover.erb"
copy_file "epub.erb", "templates/epub/page.erb"
copy_file "epub.css", "templates/epub/user.css"
copy_file "cover.jpg", "images/cover.jpg"
+ copy_file "rakefile.rb", "Rakefile"
+ copy_file "extras.tex", "extras/characters.tex"
+ copy_file "extras.tex", "extras/dedicationls.tex"
end
def copy_sample_text
copy_file "sample.tex" , "text/01_First-Chapter/01-Welcome.tex"
end
def create_directories
\ No newline at end of file