search for standard sites pub-search.waow.tech
search zig blog atproto
11
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add site.standard.* support for indexing

- Add `standardsite` platform enum with displayName() returning "standard.site"
- Add site.standard.document and site.standard.publication to TAP_COLLECTION_FILTERS
- Extractor already handles textContent field used by site.standard

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

zzstoatzz 0fae430a 1cf87942

+24 -2
+23 -1
backend/src/extractor.zig
··· 4 4 const Allocator = mem.Allocator; 5 5 const zat = @import("zat"); 6 6 7 - /// Detected platform from content.$type 7 + /// Detected platform from collection name 8 8 pub const Platform = enum { 9 9 leaflet, 10 10 pckt, 11 11 offprint, 12 + standardsite, 12 13 unknown, 13 14 14 15 pub fn fromCollection(collection: []const u8) Platform { 15 16 if (mem.startsWith(u8, collection, "pub.leaflet.")) return .leaflet; 16 17 if (mem.startsWith(u8, collection, "blog.pckt.")) return .pckt; 17 18 if (mem.startsWith(u8, collection, "app.offprint.")) return .offprint; 19 + if (mem.startsWith(u8, collection, "site.standard.")) return .standardsite; 18 20 return .unknown; 19 21 } 20 22 23 + /// Internal name (for DB storage) 21 24 pub fn name(self: Platform) []const u8 { 22 25 return @tagName(self); 26 + } 27 + 28 + /// Display name (for UI) 29 + pub fn displayName(self: Platform) []const u8 { 30 + return switch (self) { 31 + .standardsite => "standard.site", 32 + else => @tagName(self), 33 + }; 23 34 } 24 35 }; 25 36 ··· 230 241 try std.testing.expectEqual(Platform.offprint, Platform.fromCollection("app.offprint.document")); 231 242 } 232 243 244 + test "Platform.fromCollection: standardsite" { 245 + try std.testing.expectEqual(Platform.standardsite, Platform.fromCollection("site.standard.document")); 246 + try std.testing.expectEqual(Platform.standardsite, Platform.fromCollection("site.standard.publication")); 247 + } 248 + 233 249 test "Platform.fromCollection: unknown" { 234 250 try std.testing.expectEqual(Platform.unknown, Platform.fromCollection("something.else")); 235 251 try std.testing.expectEqual(Platform.unknown, Platform.fromCollection("")); ··· 239 255 try std.testing.expectEqualStrings("leaflet", Platform.leaflet.name()); 240 256 try std.testing.expectEqualStrings("pckt", Platform.pckt.name()); 241 257 try std.testing.expectEqualStrings("offprint", Platform.offprint.name()); 258 + try std.testing.expectEqualStrings("standardsite", Platform.standardsite.name()); 242 259 try std.testing.expectEqualStrings("unknown", Platform.unknown.name()); 243 260 } 261 + 262 + test "Platform.displayName" { 263 + try std.testing.expectEqualStrings("leaflet", Platform.leaflet.displayName()); 264 + try std.testing.expectEqualStrings("standard.site", Platform.standardsite.displayName()); 265 + }
+1 -1
tap/fly.toml
··· 9 9 TAP_BIND = ':2480' 10 10 TAP_RELAY_URL = 'https://relay1.us-east.bsky.network' 11 11 TAP_SIGNAL_COLLECTION = 'pub.leaflet.document' 12 - TAP_COLLECTION_FILTERS = 'pub.leaflet.document,pub.leaflet.publication' 12 + TAP_COLLECTION_FILTERS = 'pub.leaflet.document,pub.leaflet.publication,site.standard.document,site.standard.publication' 13 13 TAP_LOG_LEVEL = 'info' 14 14 TAP_RESYNC_PARALLELISM = '2' 15 15 TAP_IDENT_CACHE_SIZE = '10000'