change constants
This commit is contained in:
parent
d492b67dc1
commit
d7090b836a
2 changed files with 18 additions and 17 deletions
16
config.json
16
config.json
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
"workdir" : "where/your/sources/live",
|
"dir_assets" : "path/to/assets",
|
||||||
"dir_assets" : "assets",
|
"dir_gmi_content" : "path/to/content",
|
||||||
"dir_source" : "content",
|
"dir_gmi_helper" : "path/to/gmi-helper",
|
||||||
"dir_helper" : "html-parts",
|
"dir_html_helper" : "path/to/html-helper",
|
||||||
"dir_o_html" : "html-output",
|
"dir_html_out" : "path/to/web",
|
||||||
"rem_gmi" : "your/remote/gemini/path",
|
"rem_gmi" : "remote_server:path/to/gmi",
|
||||||
"rem_html" : "your/remote/html/path",
|
"rem_html" : "remote_server:path/to/gmi",
|
||||||
"port" : "1312"
|
"port" : "1312"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,14 @@ cfg_file = xdg_path if xdg_path.exists() else "config.json"
|
||||||
with open(cfg_file) as f:
|
with open(cfg_file) as f:
|
||||||
config = json.load(f)
|
config = json.load(f)
|
||||||
|
|
||||||
WORKDIR = Path(config["workdir"])
|
DIR_ASSETS = Path(config["dir_assets"])
|
||||||
DIR_ASSETS = WORKDIR / config["dir_assets"]
|
DIR_SOURCE = Path(config["dir_gmi_content"])
|
||||||
DIR_SOURCE = WORKDIR / config["dir_source"]
|
DIR_GMI_HELPER = Path(config["dir_gmi_helper"])
|
||||||
DIR_HELPER = WORKDIR / config["dir_helper"]
|
DIR_HELPER = Path(config["dir_html_helper"])
|
||||||
DIR_O_HTML = WORKDIR / config["dir_o_html"]
|
DIR_O_HTML = Path(config["dir_html_out"])
|
||||||
GMI_FOOTER = WORKDIR / "footer.gmi"
|
|
||||||
|
|
||||||
REM_HTML = config["rem_html"]
|
GMI_FOOTER = DIR_GMI_HELPER / "footer.gmi"
|
||||||
REM_GMI = config["rem_gmi"]
|
|
||||||
RPORT = config["port"]
|
REM_HTML = config["rem_html"]
|
||||||
|
REM_GMI = config["rem_gmi"]
|
||||||
|
RPORT = config["port"]
|
||||||
|
|
Loading…
Reference in a new issue