boards/config.py

34 lines
870 B
Python

from bottle import Bottle
from bottle.ext import sqlite
import os
root = os.path.dirname(os.path.realpath(__file__))
default_user = "Anonymous"
invalid_nicknames = [default_user.lower(), "admin"]
secret = "fnord"
limit = 10
boards = {
"technology":"My printer don't work can you help me?",
"programming":"Hello World!",
"games":"Wait A Second Dingus",
"media":"General Media Sharing",
"library":"Hidden Boards Book Collection",
"gallery":"Hidden Boards Visual Media Collection",
"random":f"{limit} Random Threads",
"nsfw":"Nylon Sheets Feel Weird",
"requests":"Sugestions and Complaints"
}
host = '0.0.0.0'
port = 8080
db_path = f"{root}/.hidden/hiddenboards.db"
cert_path = f"{root}/.hidden/cert.pem"
key_path = f"{root}/.hidden/key.pem"
banner_dir = f"{root}/banners"
app = Bottle()
app.install(sqlite.Plugin(dbfile=db_path))