You add course files on a course page. Kizuki keeps a copy, reads the text out of it, splits the text into passages that remember where they came from, adds them to search, and proposes concepts for you to review.
formatOf picks the reader from the file name's ending. FORMATS lists the formats.
| Ending | Reader | Sections come from | Each passage remembers |
|---|---|---|---|
.pdf |
extractPdf | The PDF's bookmarks (two levels deep) when it has them, otherwise one section per page, titled by the page's first line | The page number |
.pptx |
extractPptx | One section per slide, titled by the slide title, or "Slide N" | The slide number, and whether it is from the speaker notes |
.docx |
extractDocx | Paragraphs styled as headings (Title, Heading 1 to 6, or an outline level) | The heading above it and the paragraph number |
.xlsx |
extractXlsx | One section per sheet | The sheet name and the cell range, such as A1:D15 |
.csv |
extractCsv | One section named after the file | The cell range |
.md, .markdown |
extractMarkdown | # headings |
The heading above it |
.txt |
extractText | One section named after the file | The paragraph number |
Details that change what a quote looks like:
| between cells. Speaker notes become their own passages, marked as notes.|. formatNumber shows numbers the way the sheet shows them: dates as 2024-10-01, percentages with %, and fixed decimals, so a quote reads like the sheet."" for a quote mark inside a field.>), so quotes match the words alone. Code blocks are kept as text.Slides, Word files, and workbooks are zip files of XML. openZip unpacks only the XML parts and refuses a file whose text parts unpack past the ZIP_LIMITS, so a small file that unpacks to gigabytes cannot use up your computer's memory.
Jupyter notebooks (.ipynb), images, scanned PDFs, audio, video, .doc, .ppt, .xls, and other formats are refused when you add them, with "Kizuki can't read .ipynb files yet" and the list of formats it does read (addMaterial). To study a notebook today, export it to markdown or PDF first. Text recognition for images and scans is planned for a later version.
uploadAction, which calls addMaterial for each file. It refuses an unknown format and a file whose SHA-256 fingerprint matches a file already in the course (unless that one failed). It copies the bytes to files/<materialId><ending> in the data folder and records material.added in materials.jsonl.workflows/material/steps.ts and is safe to run twice: it checks the logs before it writes.passages.jsonl. A file with no readable text fails at once, without retries.The course page shows each file's status from MaterialStatus: waiting, reading the text, building search, finding concepts, ready for your review, suggesting links, done, or failed. A failure records its message (failMaterial) and the page offers "Try again". A file that has shown the same working status for more than 10 minutes gets "Stuck? Start again". Both start a new run, which skips the steps the logs show are done.