From 257986fd5aaddad932002f6ddc9d2a14f2b99f9b Mon Sep 17 00:00:00 2001 From: Tangent Date: Wed, 6 Nov 2024 19:04:16 -0700 Subject: [PATCH] partial #24 it is default behavior, not optional --- make-epub.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/make-epub.lua b/make-epub.lua index 65df98b..b4b1545 100755 --- a/make-epub.lua +++ b/make-epub.lua @@ -282,9 +282,11 @@ end local function make_epub(config) utility.required_program("pandoc") + local output_dir = "All ePubs" + os.execute("mkdir " .. output_dir:enquote()) local base_file_name = get_base_file_name(config) - os.execute("pandoc --from markdown --to epub " .. (base_file_name .. ".md"):enquote() .. " -o " .. (base_file_name .. ".epub"):enquote() .. " --toc=true") + os.execute("pandoc --from markdown --to epub " .. (base_file_name .. ".md"):enquote() .. " -o " .. (output_dir .. path_separator .. base_file_name .. ".epub"):enquote() .. " --toc=true") end local function rm_html_files(config)