Skip to content
This repository has been archived by the owner on Jan 10, 2021. It is now read-only.

Add task to build biography and add rename task to jekyll #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand 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"
Expand 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"
Expand 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*"]
Expand All @@ -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*"]
Expand All @@ -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*"]
Expand All @@ -328,15 +326,13 @@ 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")
Rake::Task[:print].invoke("all")
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}")
Expand Down