Admin CSV export (sources snapshot + audience time-series)
Per Codex v1 — boring-in-the-best-way: inspect/archive operational data outside the app. Admin-gated, Python csv module, text/csv + attachment disposition. * GET /api/admin/export/sources.csv — current-state snapshot per source: name, feed/homepage, status, visible, served/accepted/total, acceptance/duplicate/ accepted-dup/image-coverage %, last success/error, retry-after, review. * GET /api/admin/export/audience.csv?days= — summary block (visitors, returning, accounts, feedback, shares) + a blank line + the daily visits/opens series; range applies to audience, sources is a snapshot. * source_health now also returns feed_url/homepage. Small download links on the Sources + Audience tabs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -295,7 +295,7 @@ def source_health(conn: sqlite3.Connection) -> list[dict]:
|
||||
rows = conn.execute(
|
||||
"""
|
||||
SELECT
|
||||
s.id, s.name, s.default_category AS category, s.active,
|
||||
s.id, s.name, s.feed_url, s.homepage_url, s.default_category AS category, s.active,
|
||||
s.status, s.content_visible, s.retry_after_at,
|
||||
s.consecutive_failures AS failures, s.review_flag, s.review_reason,
|
||||
s.poll_interval_minutes AS interval_minutes,
|
||||
|
||||
Reference in New Issue
Block a user