finally found my stupid trip-up, writing modified files
This commit is contained in:
+3
-3
@@ -279,10 +279,10 @@ utility.read_file = function(file_name)
|
||||
end)
|
||||
end
|
||||
|
||||
utility.write_file = function(file_name, text)
|
||||
utility.write_file = function(file_name, ...)
|
||||
return utility.open(file_name, "w", function(file)
|
||||
file:write(text)
|
||||
file:write("\n")
|
||||
file:write(table.concat{...})
|
||||
-- file:write("\n") -- I need to make sure /I/ handle this instead of trying to automate it
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
+1
-1
@@ -225,7 +225,7 @@ local refresh_sources = function()
|
||||
local file_name = file_list[f]
|
||||
local function loop()
|
||||
local sha512sum = utility.sha512sum(file_name)
|
||||
log("sha", file_name, sha512sum, tostring(embeddings.vectors[sha512sum]))
|
||||
log("sha", file_name, sha512sum, "\n Sum present? " .. tostring(embeddings.vectors[sha512sum]))
|
||||
if embeddings.vectors[sha512sum] then
|
||||
log("debug", file_name .. "\n has already been embedded, skipping.")
|
||||
-- add file reference if it was missing
|
||||
|
||||
@@ -108,7 +108,7 @@ local export_ordered_list_of_prompts = function()
|
||||
output[#output + 1] = "## Scoring\n\n```json\n" .. json.encode(item.scoring, { indent = true, }) .. "\n```\n"
|
||||
end
|
||||
|
||||
utility.write_file("PRIVATE_DATA/Ordered Synopses.md", table.concat(output, "\n"))
|
||||
utility.write_file("PRIVATE_DATA/Ordered Synopses.md", table.concat(output, "\n"), "\n")
|
||||
os.execute("pandoc \"PRIVATE_DATA/Ordered Synopses.md\" -o \"PRIVATE_DATA/Ordered Synopses.epub\"")
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user