import os.path import datetime class Config: ASSETS_IMPORT_PATH = "/assets" ASSETS_IMPORT_PATH_STATIC = "https://static.wazul.moe" RSS_FILE_NAME = "feed.xml" BLOG_ROOT_URL = "https://blog.wazul.moe" TIMEZONE = datetime.timezone(datetime.timedelta(hours=2)) __DIR = os.path.dirname(__file__) ASSETS_SOURCE_DIR = os.path.join(__DIR, "assets") TEMPLATES_SOURCE_DIR = os.path.join(__DIR, "templates") POST_SOURCE_DIR = os.path.join(__DIR, "posts") BLOG_HOSTNAME = "yggdrasil" BLOG_NAME = "@{}".format(BLOG_HOSTNAME) BLOG_SUBTITLE = "The chronicle of my works and learnings" BLOG_USER = "reader" BLOG_OWNER = "http" @staticmethod def get_prompt(path: str, cmd: str) -> str: return "{}@{} {} $ {}".format(Config.BLOG_USER, Config.BLOG_HOSTNAME, path, cmd) @staticmethod def get_tag_prompt(tag: str, cmd: str) -> str: return Config.get_prompt("~/tags/{}".format("" if tag == "" else tag + "/"), cmd)