ingest
diapason.tools.storage.ingest
¶
Document ingestion — file reading, type detection, directory walking.
DocumentMeta
dataclass
¶
Metadata about an ingested document.
detect_file_type(path)
¶
Map a file extension to one of: text, markdown, pdf, code.
ingest_path(path, *, config=None)
¶
Ingest a file or directory into chunks.
If path is a file, reads and chunks it. If path is a directory, recursively walks it (skipping hidden and common non-content directories) and chunks each file.