Move settings to settings.py and read from a config file

This commit is contained in:
2021-12-12 21:59:27 +01:00
parent c8bf725780
commit 203525becb
4 changed files with 51 additions and 8 deletions

View File

@ -1,14 +1,12 @@
import os
import sys
import typer
from dhooks import Webhook
from reader import FeedExistsError, make_reader
reader = make_reader("db.sqlite")
from discord_rss_bot.settings import Settings
app = typer.Typer()
hook = Webhook("")
app = typer.Typer() # For CLI (https://typer.tiangolo.com/)
hook = Webhook(Settings.webhook_url) # For Webhooks (https://github.com/kyb3r/dhooks)
reader = make_reader(Settings.db_file) # For RSS (https://github.com/lemon24/reader)
@app.command()