hccccc01333/dsh-report-html ↗★ 1
dsh-report-html
Generate self-contained interactive HTML reports from Markdown, tables, and chart data
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:hccccc01333/dsh-report-html说明文档
阅读完整 README ↗dsh-report-html
Generate self-contained, interactive HTML reports from Markdown sections, structured tables, and bar/line/pie chart data. The report is a single HTML file with embedded CSS and SVG charts — no network, CDN, or JavaScript runtime is required to open it.
A DeepSeek Harness plugin bundle generated with the dsh plugin devkit workflow.
Install
dsh plugin --profile web add dsh-report-html
For local development, mount the source overlay:
dsh --profile web --patch ./cordis.yml
Usage
The plugin registers one tool: report_html. Give the model a Markdown report
or structured analysis data and ask it to write an HTML report; the tool
renders the content and writes the file.
It also registers report_analysis for automatic analysis: pass rows of JSON
data and the tool infers column types, computes statistics, detects trends,
aggregates categories, picks charts and KPIs, and returns a conversational
insights summary. Pass path to also write the full interactive HTML report;
omit it to get the analysis without touching the filesystem.
Analyze these rows and write a report to D:\reports\sales-analysis.html:
[{"month": "2026-01", "channel": "Online", "revenue": 120000}, ...]
Write an HTML report to D:\reports\sales.html titled "2026 Sales"
with a summary section, a monthly table, and a bar chart of revenue.
The tool accepts:
| Parameter | Type | Description |
|---|---|---|
path | string (required) | Absolute path of the HTML file to write. |
title | string (required) | Report title shown in the header and browser tab. |
subtitle | string | Optional one-line subtitle. |
theme | light | dark | Color theme; defaults to light. |
toc | boolean | Render a table-of-contents nav from section, table, and chart titles. |
kpis | array | { label, value, delta?, direction? } KPI cards above the body. |
sections | array | { heading, markdown } content sections. |
tables | array | { title?, columns, rows } sortable tables. |
charts | array | { type, title?, ... } SVG charts (see below). |
Markdown support: ATX headings, paragraphs, fenced code blocks, pipe tables,
unordered/ordered lists, blockquotes, horizontal rules, bold, italic,
strikethrough, inline code, http(s)/mailto links, and a small LaTeX-like math
subset ($...$ inline, $$...$$ blocks: \frac, \sqrt, Greek letters,
operators, ^/_ super/subscripts). Raw HTML is escaped, so report content
cannot inject scripts.
Chart types:
| Type | Extra fields | Rendering |
|---|---|---|
bar | stacked?: true | Grouped or stacked bars. |
line | — | Multi-series lines with points. |
area | stacked?: true | Plain or stacked filled areas. |
scatter | points: { x, y, label?, series? }[] | Numeric x/y scatter, colored by series. |
heatmap | columns: string[], data: number[][] | Row×column matrix with a blue scale. |
pie | — | Donut using the first dataset. |
map | mapData: { name, value }[] | China province choropleth; accepts short names like 广东. |
flow | flow: { nodes, edges } | Ranked-column flowchart with arrowheads and edge labels. |
funnel | — | Conversion funnel with stage and overall rates. |
gauge | gauge: { value, min?, max?, label? } | Single-value semicircle gauge. |
Viewer interactions: table headers are click-to-sort, legend items toggle a
series on and off, every table has a filter box, charts show a floating tooltip
on hover and an Expand button for fullscreen viewing, and the header buttons
switch between light and dark themes, open the viewer settings panel, or
print/save the report as PDF. The settings panel lets the reader choose theme
(auto/light/dark), font size, layout density, and whether the table of contents
and KPI cards are visible; choices persist in localStorage. Bar, line, and
area charts include a segmented control so the reader can switch the chart type
at runtime.
Any chart can declare drilldown: { columns, rows }; clicking a data point
toggles that detail table below the chart. Everything is embedded in the
single HTML file.
China map boundaries are projected from Aliyun DataV administrative areas
(100000_full); islets south of 16°N render as a bottom-right inset.
The tool returns { path, bytes, kpis, sections, tables, charts, warnings };
rows or series whose length does not match the declared columns/labels are
aligned and reported in warnings.
See examples/sample-report.html for a generated
demo report. Regenerate it with node scripts/generate-sample.mjs.
Permissions
The plugin declares dsh.permissions: ["fs:write"] in package.json because
report_html writes the report file. Extend that list when the plugin gains
network, process, environment, or read access.
Development
pnpm install --ignore-workspace
pnpm --ignore-workspace test
pnpm --ignore-workspace lint
pnpm --ignore-workspace doctor
(The --ignore-workspace flag keeps pnpm from treating the surrounding
DeepSeek Harness monorepo as the active workspace; outside the monorepo the
flag is harmless.)
License
MIT