diff --git a/Rakefile b/Rakefile index c0ebe33..4f3fe5c 100644 --- a/Rakefile +++ b/Rakefile @@ -175,6 +175,7 @@ end task :jekyll do desc "Jekyll is muxing our markdown." system "bundle exec jekyll build" + Rake::Task[:rename].invoke end #### RENAME @@ -185,11 +186,16 @@ desc "Rename all .html files in _site to .md instead." end end +#### BIO +task :bio do +desc "Build biography latex temporary file and place it into Books folder" + system "pandoc --latex-engine=xelatex -o Books/bio.tex Source/_includes/bio.md" +end + #### EPUB task :epub, [:book] do |task, args| Rake::Task[:jekyll].invoke -Rake::Task[:rename].invoke desc "Create epub versions of our book(s)." if "#{args.book}" == "all" @@ -210,7 +216,6 @@ end task :smashwords, [:book] do |task, args| Rake::Task[:jekyll].invoke -Rake::Task[:rename].invoke desc "Create Smashwords epub versions of our book(s)." if "#{args.book}" == "all" @@ -231,7 +236,6 @@ end task :amazon, [:book] do |task, args| Rake::Task[:jekyll].invoke -Rake::Task[:rename].invoke desc "Create Amazon mobi versions of our book(s)." if "#{args.book}" == "all" @@ -258,9 +262,7 @@ task :print, [:book] do |task, args| desc "Create Smashwords epub versions of our book(s)." Rake::Task[:jekyll].invoke -Rake::Task[:rename].invoke - -system "pandoc --latex-engine=xelatex -o Books/bio.tex Source/_includes/bio.md" +Rake::Task[:bio].invoke if "#{args.book}" == "all" filelist = Rake::FileList["_site/*/*-pdf*"] @@ -281,9 +283,7 @@ task :print, [:book] do |task, args| desc "Create Smashwords epub versions of our book(s)." Rake::Task[:jekyll].invoke -Rake::Task[:rename].invoke -system "pandoc --latex-engine=xelatex -o Books/bio.tex Source/_includes/bio.md" if "#{args.book}" == "all" filelist = Rake::FileList["_site/*/*-pdf*"] @@ -304,9 +304,7 @@ task :pdf, [:book] do |task, args| desc "Create Smashwords epub versions of our book(s)." Rake::Task[:jekyll].invoke -Rake::Task[:rename].invoke - -system "pandoc --latex-engine=xelatex -o Books/bio.tex Source/_includes/bio.md" +Rake::Task[:bio].invoke if "#{args.book}" == "all" filelist = Rake::FileList["_site/*/*-pdf*"] @@ -328,7 +326,6 @@ desc "Create all versions of our book(s)." if "#{args.book}" == "all" Rake::Task[:jekyll].invoke - Rake::Task[:rename].invoke Rake::Task[:epub].invoke("all") Rake::Task[:smashwords].invoke("all") Rake::Task[:amazon].invoke("all") @@ -336,7 +333,6 @@ desc "Create all versions of our book(s)." Rake::Task[:pdf].invoke("all") else Rake::Task[:jekyll].invoke - Rake::Task[:rename].invoke Rake::Task[:epub].invoke("#{args.book}") Rake::Task[:smashwords].invoke("#{args.book}") Rake::Task[:amazon].invoke("#{args.book}")