Repository navigation
Added
-
joinPages()(@tomnio/rubric/pdf): joins per-page text fromextractPdfPages()into one document string while recording each page's span in it. The spans share the coordinate space of the chunk offsetscreateDocument()reports, so any merged value can be traced back to the page it came from:import { extractPdfPages, joinPages } from "@tomnio/rubric/pdf" const { pages } = await extractPdfPages(pdfBytes) const { text, spans } = joinPages(pages) const { chunks } = await createDocument(client, { document: text, ... }) const pageOf = (offset: number) => spans.find((s) => offset >= s.startOffset && offset < s.endOffset)?.number
Housekeeping
- CI:
actions/checkoutandactions/setup-nodebumped to v5.