Skip to content

Commit

Permalink
Hasty Commit: 2019-07-06 12:02:35
Browse files Browse the repository at this point in the history
  • Loading branch information
Merovex committed Jul 6, 2019
1 parent e511a1b commit 0092a53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion templates/epub.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"$if(lang)$ xml:lang="$lang$"$endif$>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="generator" content="Verkilo (pandoc)" />
<title>$pagetitle$</title>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
h1,h2,h3,h4{font-family: sans-serif;}
$if(quotes)$
q { quotes: "“" "”" "‘" "’"; }
$endif$
Expand Down
9 changes: 6 additions & 3 deletions verkilo
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def makeProductionFile(action, target)
end

action = ARGV.shift.gsub('/','')
target = ARGV.shift.gsub('/','')
target = ARGV.shift.gsub('/','') unless ARGV.empty?

images_dir = "./#{target}/images/"
templates_dir = "#{Dir.home}/.verkilorc/templates/"
Expand All @@ -33,7 +33,7 @@ HEREDOC

@build_flags[:epub] = <<-HEREDOC
--css=#{templates_dir}style.css \
--epub-cover-image=#{images_dir}cover.png \
--epub-cover-image=#{images_dir}epub-cover.png \
--template=#{templates_dir}epub.html \
--webtex
HEREDOC
Expand All @@ -59,7 +59,10 @@ HEREDOC
# Actions are the various output formats that we create.
actions = %w(pdf docx epub html)

if actions.include?(action)
if action == 'clean'
puts "Removing Build files."
FileUtils.rm_rf Dir.glob("build/*") if Dir.exist?('build')
elsif actions.include?(action)
makeProductionFile(action, target)
elsif (action == 'book')
makeProductionFile('epub', target)
Expand Down

0 comments on commit 0092a53

Please sign in to comment.