summaryrefslogtreecommitdiff
path: root/scripts/context/lua/mtx-epub.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-08-09 01:00:13 +0300
committerMarius <mariausol@gmail.com>2012-08-09 01:00:13 +0300
commit343077218254bccdd7e518c5cc74d473d0bbf605 (patch)
treeb3b58ac303f7513cb39e1695fb8f29e8fd960519 /scripts/context/lua/mtx-epub.lua
parente3f2891a6167e2efe5b9cee3b374eec103cbb526 (diff)
downloadcontext-343077218254bccdd7e518c5cc74d473d0bbf605.tar.gz
beta 2012.08.08 23:45
Diffstat (limited to 'scripts/context/lua/mtx-epub.lua')
-rw-r--r--scripts/context/lua/mtx-epub.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/context/lua/mtx-epub.lua b/scripts/context/lua/mtx-epub.lua
index 52a144c20..28a37fec2 100644
--- a/scripts/context/lua/mtx-epub.lua
+++ b/scripts/context/lua/mtx-epub.lua
@@ -136,7 +136,7 @@ local coverxhtml = [[
local function dumbid(filename)
-- return (string.gsub(os.uuid(),"%-%","")) -- to be tested
- return file.nameonly(filename) .. "-" .. file.extname(filename)
+ return file.nameonly(filename) .. "-" .. file.suffix(filename)
end
local mimetypes = {
@@ -275,7 +275,7 @@ function scripts.epub.make()
for k, v in table.sortedpairs(images) do
theimages[#theimages+1] = k
- if not lfs.isfile(k) and file.extname(k) == "svg" and file.extname(v) == "pdf" then
+ if not lfs.isfile(k) and file.suffix(k) == "svg" and file.suffix(v) == "pdf" then
local command = format("inkscape --export-plain-svg=%s %s",k,v)
application.report("running command '%s'\n\n",command)
os.execute(command)
@@ -284,7 +284,7 @@ function scripts.epub.make()
copythem(theimages)
- local idmaker = idmakers[file.extname(root)] or idmakers.default
+ local idmaker = idmakers[file.suffix(root)] or idmakers.default
container = format(container,
epubroot