This commit is contained in:
2026-08-26 19:20:44 -06:00
commit 7c669bf353
4 changed files with 47 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
.DS_Store
+16
View File
@@ -0,0 +1,16 @@
This is heavily WIP.
I used the apply_margin script on a transcript downloaded from
https://www.youtube-transcript.io to correct the poor formatting,
then oops_all_code to add backticks to each line (because else
pandoc encodes all code in a single block no matter how poorly
that aligns with a page boundary when exporting epubs), then
pandoc --from markdown+hard_line_breaks input -o output to finally
have a functional epub that is legible.
This will probably fail with videos longer than an hour because
the export will be different enough to fuck up the margin fix.
I am really frustrated because pandoc doesn't support plain text.
I went through many tests and iterations before coming to even
this minimal start and it was extremely frustrating.
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env luajit
local a, b = arg[1], arg[2]
local file = io.open(b, "w")
assert(file, "Couldn't open \"" .. b .. "\"")
for line in io.lines(a) do
if not (line:sub(3, 3) == ":") then
file:write(string.rep(" ", 6))
end
file:write(line)
file:write("\n")
end
file:close()
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env luajit
local a, b = arg[1], arg[2]
local file = io.open(b, "w")
assert(file, "Couldn't open \"" .. b .. "\"")
for line in io.lines(a) do
file:write("`")
file:write(line)
file:write("`")
file:write("\n")
end
file:close()