Initial commit

This commit is contained in:
2026-03-04 23:01:36 +00:00
commit 2b3d6a9ace
7 changed files with 114 additions and 0 deletions

14
config.py Normal file
View File

@@ -0,0 +1,14 @@
# config.py
# Fetches config from subreddit wiki page
import json
def fetch_config_from_wiki(reddit, subreddit_name, wiki_page):
subreddit = reddit.subreddit(subreddit_name)
try:
wiki = subreddit.wiki[wiki_page]
config_text = wiki.content_md
config = json.loads(config_text)
return config
except Exception as e:
print(f"Error fetching config from wiki: {e}")
return {'posts': []}