-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmarkdown_vars.py
executable file
·60 lines (48 loc) · 1.34 KB
/
markdown_vars.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import base64
from datetime import date
from src.settings import stg
ASSETS = "./docs/assets"
IMAGES = f"{ASSETS}/images"
FOLDER = stg('folder')
def b64(name: str):
with open(f"./docs/assets/images/icons/{name}", "rb") as f:
return base64.b64encode(f.read()).decode("utf-8")
def todo():
str_repl = {
"TODO\n====": "## TODO",
}
with open(f"docs/TODO.md", "r") as file:
f = file.read()
for r in str_repl:
f = f.replace(r, str_repl[r])
return f
class Vars:
# Commons
# constants
project_name = "MangDL"
organization = project_name
user = "whinee"
site = "mdl.pages.dev"
email = "[email protected]"
dc_acc = "whi_ne#5135"
dc_link = "https://discord.com/users/867696753434951732"
dc_inv = "JbAtUxGcJZ"
dc_serv = 889508240495366184
codacy_id = "93418e488727439bb71f3f779860ced2"
python_ver = "3.10.0"
os = "Arch Linux"
# variables
repo_name = project_name.replace(" ", "-")
year = str(date.today().year)
# README.md
# constants
title = "MangDL"
# variables
TODO = todo()
# terminal.html
# constants
username = "whi~nyaan"
compname = "blackspace"
icons = ["issues", "forks", "stars", "contributors", "license", "code", "discord"]
for i in icons:
setattr(Vars, f"{i}_b64", b64(f"{i}.png"))