Commit Graph

12 Commits

Author SHA1 Message Date
James 405a6f697f feat: add GET /api/search?q=...&format=md for AI/LLM consumption
New endpoint returns all matching documents as concatenated plain-text
markdown, one section per document separated by ---.

Format:
  # Document: {title}
  ID: {id} | Category: {category} | Date: {date} | Vendor: {vendor}

  {full_text or summary}

  ---

Parameters:
  q      - search query (required)
  format - must be 'md' (required; distinguishes from HTML search)

Uses same FTS5 search as existing endpoints, limit raised to 200.
Falls back to LIKE search if FTS5 fails. Returns text/markdown content type.
POST /api/search (HTML partial) unchanged.
2026-03-23 13:58:47 -04:00
James 63d4e5e5ca chore: auto-commit uncommitted changes 2026-02-28 06:01:28 -05:00
James 9d6ad09b53 Use proper content-type for downloads to avoid Chrome insecure download block 2026-02-12 17:53:51 -05:00
James a1d156bbd5 Fix download: serve file manually to avoid http.ServeFile header conflicts 2026-02-12 17:50:12 -05:00
James f59c12e25c Add download link with pretty filename from document title
- servePDF now supports ?download=1 query param
- Looks up document title and uses it as the Content-Disposition filename
- Download button on document page triggers actual download (not tab open)
- Added sanitizeFilename helper for safe Content-Disposition values
2026-02-12 17:27:12 -05:00
James 6adfefff7a Change processed date format to 'Jan 02, 2006 3:04 PM EST' 2026-02-10 04:09:35 -05:00
James dabd97e13c Dashboard: formatted timestamps (MM/DD/YYYY HH:MM TZ), inline category edit dropdown 2026-02-10 03:52:46 -05:00
James 3a6aa8cbda Dashboard: narrower categories column, show scan time in recent docs, add inou/sophia categories 2026-02-10 03:48:20 -05:00
James 5445b294cb Share links now use .pdf extension and Content-Disposition header for Android compatibility 2026-02-10 00:33:13 -05:00
James 9f0bac5783 Add document sharing with expiring links
- Share table with random tokens and optional expiry (default 7 days)
- Public /s/{token} endpoint serves PDF directly
- Share/revoke UI on document page with copy-to-clipboard
- Caddy reverse proxy configured at docs.jongsma.me
2026-02-09 11:28:21 -05:00
James a73ae5c03e fix: delete document cleans up store files and embeddings 2026-02-08 03:55:42 -05:00
James 00d0b0a0d7 Initial commit 2026-02-04 13:37:26 -05:00