Compare commits

..
2 Commits
Author SHA1 Message Date
tangent f1b5fbc615 Lua got confused by varargs 2026-09-16 17:59:24 -06:00
tangent f229e7331e finally found my stupid trip-up, writing modified files 2026-09-16 17:56:47 -06:00
3 changed files with 8 additions and 7 deletions

No files matched your search

+3 -2
View File
@@ -279,10 +279,11 @@ utility.read_file = function(file_name)
end) end)
end end
utility.write_file = function(file_name, text) utility.write_file = function(file_name, ...)
local text = table.concat{...}
return utility.open(file_name, "w", function(file) return utility.open(file_name, "w", function(file)
file:write(text) file:write(text)
file:write("\n") -- file:write("\n") -- I need to make sure /I/ handle this instead of trying to automate it
end) end)
end end
+4 -4
View File
@@ -23,11 +23,11 @@ if not config.models then
end end
log{ log{
-- info = true, info = true,
-- warning = true, warning = true,
-- debug = true, -- debug = true,
-- files = true, -- debugging why the wrong files are selected -- files = true, -- debugging why the wrong files are selected
sha = true, -- what the fuck is going on with sha sums? -- sha = true, -- what the fuck is going on with sha sums?
} }
local memory_path = "PRIVATE_DATA" .. utility.path_separator .. "memory" local memory_path = "PRIVATE_DATA" .. utility.path_separator .. "memory"
@@ -225,7 +225,7 @@ local refresh_sources = function()
local file_name = file_list[f] local file_name = file_list[f]
local function loop() local function loop()
local sha512sum = utility.sha512sum(file_name) 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 if embeddings.vectors[sha512sum] then
log("debug", file_name .. "\n has already been embedded, skipping.") log("debug", file_name .. "\n has already been embedded, skipping.")
-- add file reference if it was missing -- add file reference if it was missing
+1 -1
View File
@@ -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" output[#output + 1] = "## Scoring\n\n```json\n" .. json.encode(item.scoring, { indent = true, }) .. "\n```\n"
end 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\"") os.execute("pandoc \"PRIVATE_DATA/Ordered Synopses.md\" -o \"PRIVATE_DATA/Ordered Synopses.epub\"")
end end