summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2012-06-09 01:22:00 +0200
committerHans Hagen <pragma@wxs.nl>2012-06-09 01:22:00 +0200
commitfe6468293b1c8149863f1e42ad25c404eeade182 (patch)
treea8f9d3ccd8df79180785204e56721357bc9b00ed /scripts
parent2b70a61c7a8cc5eb38d1af309887036117e60f56 (diff)
downloadcontext-fe6468293b1c8149863f1e42ad25c404eeade182.tar.gz
beta 2012.06.09 01:22
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-epub.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/context/lua/mtx-epub.lua b/scripts/context/lua/mtx-epub.lua
index 88e31ceee..6b7f7e718 100644
--- a/scripts/context/lua/mtx-epub.lua
+++ b/scripts/context/lua/mtx-epub.lua
@@ -31,7 +31,7 @@ mtxrun --script epub --make mydocument
local application = logs.application {
name = "mtx-epub",
- banner = "ConTeXt EPUB Helpers 0.11",
+ banner = "ConTeXt EPUB Helpers 0.12",
helpinfo = helpinfo,
}
@@ -197,9 +197,18 @@ function scripts.epub.make()
local language = specification.language or "en"
local creator = specification.author or "My Self"
local title = specification.title or "My Title"
+ local firstpage = specification.firstpage or ""
+ local lastpage = specification.lastpage or ""
-- identifier = gsub(identifier,"[^a-zA-z0-9]","")
+ if firstpage == "" then
+ images[firstpage] = firstpage
+ end
+ if lastpage == "" then
+ images[lastpage] = lastpage
+ end
+
identifier = "BookId" -- weird requirement
local epubname = name