DEFAULT_THEME_STYLE = ThemeStyle.LIGHT.value DEFAULT_THEME_PRIMARY_COLOR = { ThemeStyle.LIGHT: "#1d781d", # Green ThemeStyle.DARK: "#33ff00", # Purple } VERSION = (subprocess.check_output(["git", "describe", "--always"]).split()[0].decode("utf-8")) VERSION_DATE = (subprocess.check_output( ["git", "show", VERSION]).decode().splitlines()[2].split("Date:")[-1].strip()) DEBUG_MODE = strtobool(os.getenv("MICROBLOGPUB_DEBUG", "false")) HEADERS = [ "application/activity+json", "application/ld+json;profile=https://www.w3.org/ns/activitystreams", 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"', "application/ld+json", ] with open(os.path.join(KEY_DIR, "me.yml")) as f: conf = yaml.safe_load(f) USERNAME = conf["username"] NAME = conf["name"] DOMAIN = conf["domain"] SCHEME = "https" if conf.get("https", True) else "http"
def debug_mode(self) -> bool: return strtobool(os.getenv("MICROBLOGPUB_DEBUG", "false"))