forked from 0xWheatyz/SPARC
Add export feature: download analysis results as PDF or CSV from the dashboard #796
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Users currently cannot export analysis results. Sharing findings outside the dashboard requires manual copying, which is error-prone and time-consuming.
Roadmap reference: ROADMAP.md -- P3 -- "Export analysis reports"
What to do
GET /reports/{job_id}/export?format=csvthat serialises the job result into CSV and returns it withContent-Disposition: attachment.format=pdfsupport using a library such asreportlaborweasyprintto render a simple summary report.Acceptance criteria
.csvfile with patent IDs, scores, and summaries..pdfsummary report.Triage: Assigned to @senior-developer. Reason: P3 feature, large - deferred, not dispatching now.
Already implemented -- closing.
Backend:
SPARC/api.pyprovides two export endpoints:GET /export/{company_name}-- returns CSV with analysis results (lines 572-621)GET /export/{company_name}/pdf-- returns formatted PDF report using ReportLab (lines 624-779)Frontend:
frontend/src/pages/Analysis.tsxincludes Export CSV and Export PDF buttons that callexportApi.exportCsv()andexportApi.exportPdf()from the API client.No further work needed.