jiaoqsh/dsh-document
Turns Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV and PDF files into paginated Markdown the model can read with one tool.
Gives the model a read_document tool that converts a document into line-numbered Markdown, which it then pages through with offset and limit like any other long text. It handles Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV and PDF. For PDFs you can pass a page selection — the README's example is "1-3,7" — and the output carries <!-- Page N --> markers plus per-page facts, so the model can cite where a passage came from. A mixed PDF gets an explicit warning that certain pages had no extractable text. Failures come back as tool errors in model terms rather than crashes: unsupported extension (pointing at read for plain text), pages on a non-PDF, a malformed page range, not found, not a regular file, over the size cap, encrypted, damaged, an engine resource limit, or a page past the end. PDF conversion runs in a fresh worker thread per call so cancellation terminates it and the event loop stays free, at roughly 50 ms of WASM start-up; office conversion runs on the libuv pool and cannot be cancelled once started.
Install
dsh plugin --profile web add @jiaoqsh/dsh-documentThe npm line, which the README calls the recommended route because the package ships built code and nothing runs at install time; releases are published from the repo's own release workflow with provenance attestations. A GitHub install is documented too, but the README warns that pnpm 10+ refuses to run the package's prepare build until you copy the exact key it prints into $DSH_HOME/profiles/<name>/pnpm-workspace.yaml and re-run the add — and that allowing the build means executing the package's code at install time. Remove with dsh plugin --profile web remove @jiaoqsh/dsh-document.
Compatibility
Conversion is entirely local: office formats go through @firecrawl/anydoc (Rust core with Node bindings) and PDFs through @firecrawl/pdf-inspector (a WASM build in a worker thread), so there is no API key, no network call and no external binary. dsh plugin prints missing-peer warnings for the @deepseek-ai/* packages; the README says that is expected, because profiles deliberately do not install peers and the dsh installation supplies them at runtime. Known limitation, stated by the README: there is no OCR — pages without a text layer are reported through pagesNeedingOcr and a <warning> line, and a fully scanned PDF is an error naming the cause rather than a silent empty read.
Details
- Repo: jiaoqsh/dsh-document
- Category: Files & Data
- Stars: 4
- Version: 0.1.3 (npm)
Alternatives
miaobuao/dsh-document-parser · randerous/dsh-turn-meta · Sqhao-O/dsh-docs