this repo has no description
0
fork

Configure Feed

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

sdw: go shorter and no replies

+6 -1
+6 -1
feeds/sevendirtywords.py
··· 6 6 7 7 from . import BaseFeed 8 8 9 + SDW_REGEX = re.compile(r'^(shit|piss|fuck|cunt|cocksucker|motherfucker|tits)\W*$', re.I|re.A) 10 + 9 11 class SevenDirtyWordsFeed(BaseFeed): 10 12 FEED_URI = 'at://did:plc:4nsduwlpivpuur4mqkbfvm6a/app.bsky.feed.generator/sdw' 11 13 ··· 33 35 if record is None: 34 36 return 35 37 38 + if record.get('reply') is not None: 39 + return 40 + 36 41 # https://en.wikipedia.org/wiki/Seven_dirty_words 37 - if re.search(r'^.{0,16}\b(shit|shitting|piss|fuck|fucking|cunt|cocksucker|motherfucker|tits)\b.{0,16}$', record['text'], re.I) is not None: 42 + if SDW_REGEX.search(record['text']) is not None: 38 43 repo = commit['did'] 39 44 rkey = commit['rkey'] 40 45 post_uri = f'at://{repo}/app.bsky.feed.post/{rkey}'