forked from 0xWheatyz/SPARC
Add PDF and CSV export for analysis reports #1416
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
Roadmap item: P3 -- Export analysis reports
Users currently cannot download analysis results. Adding export functionality would make SPARC more useful for sharing findings outside the dashboard.
What to do
GET /analyze/{job_id}/export?format=pdf|csv) that serialises the analysis result.csvmodule or pandas.weasyprintorreportlab.Acceptance criteria
Triage: Already resolved in main.
Both PDF and CSV export endpoints exist in
SPARC/api.py:GET /export/{company_name}/csv(around line 600) using Python csv moduleGET /export/{company_name}/pdf(lines 638-793) using reportlab with formatted title, summary table, and individual analysis sectionsBoth are auth-protected and return proper Content-Disposition headers for download. Closing as complete.