summaryrefslogtreecommitdiff
path: root/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'config.py')
-rw-r--r--config.py29
1 files changed, 29 insertions, 0 deletions
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 "<span class=\"green\">{}@{}</span> <span class=\"red\">{} $</span> {}".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)