this repo has no description
0
fork

Configure Feed

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

Use local or production DB depending on env

+11 -2
+6 -1
feeds/popular.py
··· 1 + import os 1 2 import math 2 3 import sqlite3 3 4 ··· 5 6 FEED_URI = 'at://did:plc:4nsduwlpivpuur4mqkbfvm6a/app.bsky.feed.generator/popular' 6 7 7 8 def __init__(self): 8 - self.db_cnx = sqlite3.connect('/dev/shm/feedgens/popular.db') 9 + if os.path.isdir('/dev/shm/feedgens/'): 10 + self.db_cnx = sqlite3.connect('/dev/shm/feedgens/popular.db') 11 + else: 12 + self.db_cnx = sqlite3.connect('db/popular.db') 13 + 9 14 self.db_cnx.create_function('exp', 1, math.exp) 10 15 with self.db_cnx: 11 16 self.db_cnx.executescript(
+5 -1
feeds/rapidfire.py
··· 1 + import os 1 2 import sqlite3 2 3 3 4 MAX_TEXT_LENGTH = 140 ··· 6 7 FEED_URI = 'at://did:plc:4nsduwlpivpuur4mqkbfvm6a/app.bsky.feed.generator/rapidfire' 7 8 8 9 def __init__(self): 9 - self.db_cnx = sqlite3.connect('/dev/shm/feedgens/rapidfire.db') 10 + if os.path.isdir('/dev/shm/feedgens/'): 11 + self.db_cnx = sqlite3.connect('/dev/shm/feedgens/rapidfire.db') 12 + else: 13 + self.db_cnx = sqlite3.connect('db/rapidfire.db') 10 14 with self.db_cnx: 11 15 self.db_cnx.executescript( 12 16 "pragma journal_mode = WAL;"