Skip to content

Commit 80d5586

Browse files
authored
docs(pdf): update demo and add sample JSON (#20)
1 parent f9dc2bf commit 80d5586

3 files changed

Lines changed: 21 additions & 3 deletions

File tree

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,14 @@ docker run -p 7860:7860 neurark/mcp-data-assistant
3838
# open http://localhost:7860
3939
```
4040

41-
**Demo** — open [`sample_docs/report-demo.pdf`](sample_docs/report-demo.pdf)
41+
**Demo** — open [`sample_docs/report-demo-new.pdf`](sample_docs/report-demo-new.pdf)
4242

4343
### Advanced PDF reports
44-
The PDF tool now supports a cover page with optional logo and summary box as
45-
well as styled charts. A minimal example:
44+
The PDF tool now supports additional fields:
45+
* `cover` – adds a logo to the first page
46+
* `summary` – short text displayed under the title
47+
* `chart_spec` – customize chart color and size
48+
A minimal example:
4649

4750
```json
4851
{
@@ -60,6 +63,7 @@ well as styled charts. A minimal example:
6063
}
6164
```
6265
Run `create_pdf` with this JSON to produce a multi-page report with a styled chart.
66+
The data used for this demo is available at [`sample_docs/report-demo.json`](sample_docs/report-demo.json).
6367

6468
## How it works
6569
The app launches Gradio with `mcp_server=True`.

sample_docs/report-demo-new.pdf

110 KB
Binary file not shown.

sample_docs/report-demo.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"title": "Demo Sales Report",
3+
"summary": "Results for Q1-Q2 2024",
4+
"cover": {"logo_path": "assets/logo.png"},
5+
"insights": ["Sales up 15% year over year"],
6+
"sections": [
7+
{"title": "Intro", "type": "paragraph", "text": "This report shows the new layout."},
8+
{
9+
"title": "Revenue",
10+
"type": "chart",
11+
"chart_spec": {"chart_type": "bar", "labels": ["Q1", "Q2"], "values": [10, 15], "color": "#ff8800"}
12+
}
13+
]
14+
}

0 commit comments

Comments
 (0)