summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2014-09-06 20:59:00 +0200
committerHans Hagen <pragma@wxs.nl>2014-09-06 20:59:00 +0200
commit02d4d3cbde5e1e94e056cdf3b732145a37413fdb (patch)
tree8a3e330fcb80df51ac91b317e7c96bf7ccad122d /scripts
parent9ae8cd92650ca8d0153d663b8fdba4c04c7fd588 (diff)
downloadcontext-02d4d3cbde5e1e94e056cdf3b732145a37413fdb.tar.gz
beta 2014.09.06 20:59
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-epub.lua14
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/context/lua/mtx-epub.lua b/scripts/context/lua/mtx-epub.lua
index 2af21990d..a15058e4d 100644
--- a/scripts/context/lua/mtx-epub.lua
+++ b/scripts/context/lua/mtx-epub.lua
@@ -133,6 +133,8 @@ local t_toc = [[
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
<head>
+ <meta charset="utf-8" />
+
<meta name="generator" content="ConTeXt MkIV" />
<meta name="dtb:uid" content="%identifier%" />
<meta name="dtb:depth" content="2" />
@@ -165,6 +167,7 @@ local t_navtoc = [[
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
+ <meta charset="utf-8" />
<title>navtoc</title>
</head>
<body>
@@ -188,6 +191,7 @@ local t_coverxhtml = [[
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
+ <meta charset="utf-8" />
<title>cover page</title>
</head>
<body>
@@ -489,8 +493,16 @@ function scripts.epub.make()
lfs.chdir("..")
+ local treefile = file.join(epubpath,epubfile)
+
+ os.remove(epubfile)
+ file.copy(treefile,epubfile)
+ if lfs.isfile(epubfile) then
+ os.remove(treefile)
+ end
+
if done then
- application.report("epub archive made using %s: %s",done,file.join(epubpath,epubfile))
+ application.report("epub archive made using %s: %s",done,epubfile)
else
local list = { }
for i=1,#zippers do