feat: add Atom feeds and JSON/CSV import/export

Phase 5 — Feeds & Import/Export:
- Atom feeds: global (/feed.xml), per-user (/u/{name}/feed.xml),
  per-tag (/tags/{name}/feed.xml). Uses gorilla/feeds.
- JSON export: all user's faves with tags, pretty-printed
- CSV export: standard format with header row
- JSON import: validates and creates faves with tags
- CSV import: flexible column mapping from header row
- Import/export pages with format documentation
- Feed items include enclosure for images, author info
- Limited-visibility profiles excluded from feeds

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2026-03-29 16:11:44 +02:00
commit 4e9db3f995
7 changed files with 463 additions and 0 deletions

View file

@ -0,0 +1,21 @@
{{define "content"}}
<h1>Eksporter favoritter</h1>
<p>Last ned alle favorittene dine i ønsket format.</p>
<div class="grid">
<article>
<header><strong>JSON</strong></header>
<p>Maskinlesbart format. Kan importeres tilbake.</p>
<footer>
<a href="{{basePath}}/export/json" role="button" class="outline" download>Last ned JSON</a>
</footer>
</article>
<article>
<header><strong>CSV</strong></header>
<p>Åpnes i regneark. Kan importeres tilbake.</p>
<footer>
<a href="{{basePath}}/export/csv" role="button" class="outline" download>Last ned CSV</a>
</footer>
</article>
</div>
{{end}}