From b5ef522a7fb9bb38ea6170add4454f4cb2f5c06d Mon Sep 17 00:00:00 2001 From: primal Date: Thu, 5 Feb 2026 16:33:22 -0500 Subject: [PATCH] Abbreviate podcast to apod in handle derivation Co-Authored-By: Claude Opus 4.6 --- handle.go | 2 ++ handle_test.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/handle.go b/handle.go index 7781310..8275661 100644 --- a/handle.go +++ b/handle.go @@ -180,6 +180,7 @@ func deriveShortHandle(hostParts []string, path string, maxLen int) string { "environment": "env", "entertainment": "ent", "politics": "pol", + "podcast": "apod", } // Build subdomain @@ -233,6 +234,7 @@ func extractPathCategory(path string) string { abbrevs := map[string]string{ "technology": "tech", "business": "biz", "international": "intl", "environment": "env", "entertainment": "ent", "politics": "pol", + "podcast": "apod", "science-and-environment": "sci-env", "entertainment-and-arts": "ent-arts", } diff --git a/handle_test.go b/handle_test.go index b5202ac..4343552 100644 --- a/handle_test.go +++ b/handle_test.go @@ -21,7 +21,7 @@ func TestDeriveHandleFromFeed(t *testing.T) { // Canonical URLs from feed link (after crawler extracts them) // "podcast" differentiates podcast-only feeds from main feeds - {"calmchristmas.substack.com/podcast", "calmchristmas-substack-com-podcast.1440.news"}, + {"calmchristmas.substack.com/podcast", "calmchristmas-substack-com-apod.1440.news"}, {"calmchristmas.substack.com/feed", "calmchristmas-substack-com.1440.news"}, }