# dsh-export-kit **Conversation Export Kit for DeepSeek Harness**: export conversations as Markdown / TXT / JSON / CSV / PNG long-image / PDF, copy formulas (LaTeX & Word-compatible MathML), and back up settings or archive all sessions. A zero-intrusion bundle plugin — no modifications to the Harness source required. - Version: v0.1.1 | License: MIT | Docs: [中文](./README.md) --- ## Features ### Conversation Export (6 formats) | Format | Description | |---|---| | Markdown | Keeps original Markdown structure and math delimiters | | TXT | Plain text, Markdown markers stripped | | JSON | Structured turn data for programmatic use | | CSV | Table format with BOM, Excel / WPS friendly | | PNG | Long-image export: themed header + text/image layout + rasterized formulas | | PDF | Browser-print "Save as PDF", selectable & searchable text, auto-pagination | The export dialog supports: - **Range**: all (auto-paged full history) or only visible content - **Timestamps**: include per-turn time, or not - **Theme**: light / dark / follow system (applies to PNG & PDF) - **Progress & cancel**: long exports can be cancelled anytime ### Formula Copy Click any formula in a conversation to open a menu and copy in multiple formats: - `$ LaTeX $` / `$$ LaTeX $$` / `\( LaTeX \)` / `\[ LaTeX \]` - `equation` / `align` / `display` environment templates - **MathML** (generic) and **Word MathML** (`mml:` namespace prefix — paste directly into Word) Formula source is extracted via a 4-level fallback: `data-math` → `annotation[encoding=application/x-tex]` → `.katex-mathml` → `data-latex`, compatible with the native DSH formula rendering. ### Backup & Archive - **Settings backup / restore**: one-click export all plugin preferences to a JSON file, restorable anytime - **Full-session archive**: iterate all sessions and collect each into a single JSON archive file ## Install ```bash # Install to the web profile (restart dsh afterwards for it to take effect) dsh plugin --profile web add /data/dsh-workspace/dsh-export-kit # Upgrade (re-run the same install command) dsh plugin --profile web add /data/dsh-workspace/dsh-export-kit # Uninstall dsh plugin --profile web remove dsh-export-kit ``` ## Usage 1. Open any conversation — an **Export** button appears in the header title bar (top right) 2. Click it, pick format / range / timestamps / theme, and start the export 3. Settings → Export Settings: adjust default format, formula copy format, theme and timestamp preferences, and find the backup / archive entry > **About PDF**: PDF is generated through the browser's print dialog — after clicking export, choose **Save as PDF** in the print dialog; no file is downloaded directly. ## Settings | Setting | Description | |---|---| | Default export format | Format preselected when opening the export dialog | | Formula copy format | Format pinned to the top of the formula menu | | Include timestamps | Whether exports include timestamps by default | | Export theme | Default PNG / PDF palette (auto follows the system) | ## Data & Privacy - All exports happen locally in the browser; nothing is uploaded - Session archive only collects content from sessions that have been loaded; unopened sessions are marked `skipped` in the archive file ## Development ```bash cd dsh-export-kit npm install npm run build # build client bundle (lib/client.js) + host half (lib/index.js) + type declarations (lib/types/) npm test # run unit tests npm run typecheck ``` ## History - Changelog: [CHANGELOG.md](./CHANGELOG.md) - License: [LICENSE](./LICENSE) (MIT)