From bea80928f694671010bc99493d31879df7d42836 Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Wed, 4 Sep 2024 20:05:51 +0200 Subject: initial commit --- config.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 config.py (limited to 'config.py') diff --git a/config.py b/config.py new file mode 100644 index 0000000..2e57f6f --- /dev/null +++ b/config.py @@ -0,0 +1,29 @@ +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) -- cgit v1.2.3-70-g09d2