From b7e2835c2ed4f90093a6e7b438f5ee1db167e73e Mon Sep 17 00:00:00 2001 From: tangent Date: Fri, 21 Aug 2026 09:21:41 -0600 Subject: [PATCH] rename conversion script & create directories on script run if they don't exist It's easier to use when the beginnings of script names aren't similar, and it's still obvious what this does. --- convert_ebook_to_txt.lua => ebook_to_txt.lua | 3 +++ 1 file changed, 3 insertions(+) rename convert_ebook_to_txt.lua => ebook_to_txt.lua (85%) diff --git a/convert_ebook_to_txt.lua b/ebook_to_txt.lua similarity index 85% rename from convert_ebook_to_txt.lua rename to ebook_to_txt.lua index 2383db2..5e58090 100755 --- a/convert_ebook_to_txt.lua +++ b/ebook_to_txt.lua @@ -9,6 +9,9 @@ if config and config.llm_covers and config.llm_covers.calibre_location then calibre_location = config.llm_covers.calibre_location end +os.execute("mkdir -p raw_ebooks" .. utility.commands.silence_output) +os.execute("mkdir -p extracted_texts" .. utility.commands.silence_output) + utility.ls("raw_ebooks", function(file_name) local _, name, extension = utility.split_path_components(file_name) if extension then