this repo has no description

chore: Updating atmosphere_dev feed matcher to calc score

Signed-off-by: Nick Gerakines <12125+ngerakines@users.noreply.github.com>

+11 -5
+11 -5
etc/atmosphere_dev.rhai
··· 6 6 7 7 const BAIL = [ 8 8 // For obvious reasons, keep the feed to PG 9 - "nsfw", 9 + "nsfw", "porn", 10 10 // Used a lot with tags like "dogsofbluesky" 11 11 "ofbluesky", 12 12 "ofbsky", 13 13 ]; 14 14 15 + let score = 0; 16 + 15 17 const KEYWORDS = [ 16 18 ["atproto"], 17 19 ["feed", "generator"], 18 20 ["pds"], 19 21 ["jetstream"], 20 22 ["firehose"], 23 + ["bluesky", "infra"], 21 24 ]; 22 25 const TAGS = [ 23 26 ["atproto"], ··· 45 48 46 49 for needle in KEYWORDS { 47 50 if sequence_matches(needle, text_normalized) { 48 - return build_aturi(event); 51 + score += 1; 49 52 } 50 53 } 51 54 ··· 53 56 if !embed_external_url.is_empty() { 54 57 for needle in URLS { 55 58 if embed_external_url.starts_with(needle) { 56 - return build_aturi(event); 59 + score += 1; 57 60 } 58 61 } 59 62 } ··· 68 71 if !link.is_empty() { 69 72 for needle in URLS { 70 73 if link.starts_with(needle) { 71 - return build_aturi(event); 74 + score += 1; 72 75 } 73 76 } 74 77 } ··· 83 86 } 84 87 for needle in TAGS { 85 88 if sequence_matches(needle, tag_normalized) { 86 - return build_aturi(event); 89 + score += 1; 87 90 } 88 91 } 89 92 } ··· 92 95 } 93 96 } 94 97 98 + if score > 0 { 99 + return build_aturi(event); 100 + } 95 101 96 102 false