Add titles-only list export and Custom lists

Export
- GET /l/<list>/export?format=csv|txt downloads a list's titles in rank
  order, one per line, with no header or other fields (CSV gets a UTF-8
  BOM for Excel)
- Export menu in the list editor and, for the owner, on the public list
  page; hidden lists stay owner-only

Custom lists
- New "Custom" category for anything not built in (sports teams,
  drinks…): owner-named, slug from the title, entries added by hand or
  from an unfiltered Wikipedia search
- Per-list artwork shape (square or tall), stored in a new lists.art
  column (migration 2)
- Art can be uploaded while adding an entry, not only after

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cdnutterandClaude Opus 5.5 committed 2026-09-24 17:18:24 -07:00
1 parent e9a75a968a
commit 58a29b7339
23 files changed
+314 -37

No files matched your search

+26
View File
@@ -151,3 +151,29 @@ func BenchmarkMoveInLargeList(b *testing.B) {
s.MoveItem(ctx, first, 5000-(i%2)*4999)
}
}
func TestCustomList(t *testing.T) {
ctx := context.Background()
s := newTestStore(t)
l, err := s.CreateList(ctx, List{Title: "Favorite Sports Teams", Category: "custom", MaxItems: 10, Art: "poster"})
if err != nil {
t.Fatal(err)
}
if l.Slug != "favorite-sports-teams" {
t.Errorf("custom slug = %q, want it from the title", l.Slug)
}
if l.Aspect() != "poster" {
t.Errorf("aspect = %q, want the list's own choice", l.Aspect())
}
l.Art = "sideways"
if l, err = s.UpdateList(ctx, l); err != nil {
t.Fatal(err)
}
if l.Art != "" || l.Aspect() != "square" {
t.Errorf("invalid art should fall back to the category default, got art=%q aspect=%q", l.Art, l.Aspect())
}
m, _ := s.CreateList(ctx, List{Title: "Top 10 Movies", Category: "movie", MaxItems: 10})
if m.Aspect() != "poster" {
t.Errorf("movie aspect = %q", m.Aspect())
}
}