Abbreviate podcast to apod in handle derivation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
primal
2026-02-05 16:33:22 -05:00
parent 60d24e4a1e
commit b5ef522a7f
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -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",
}
+1 -1
View File
@@ -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"},
}