update @ Mon Oct 30 13:06:52 EET 2023

Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
Ari Archer 2023-10-30 13:06:52 +02:00
parent 23f12f0af8
commit 6e9f3cf0a9
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: A50D5B4B599AF8A2

View file

@ -582,7 +582,11 @@ def get_tmpfile(name: str) -> str:
def open_file(editor: typing.Sequence[str], path: str) -> None: def open_file(editor: typing.Sequence[str], path: str) -> None:
log(f"formatting and running {editor!r} with {path!r}") log(f"formatting and running {editor!r} with {path!r}")
subprocess.run([(token.replace("%s", path)) for token in editor])
try:
subprocess.run([(token.replace("%s", path)) for token in editor])
except Exception as e:
sys.exit(err(f"failed to run editor : {e}"))
def trunc(data: str, length: int, end: str = " ...") -> str: def trunc(data: str, length: int, end: str = " ...") -> str:
@ -908,6 +912,9 @@ def rm(config: dict[str, typing.Any]) -> int:
def build(config: dict[str, typing.Any]) -> int: def build(config: dict[str, typing.Any]) -> int:
"""build blog posts""" """build blog posts"""
if not config["posts"]:
return err("no posts to be built")
log("compiling regex") log("compiling regex")
web_mini.html.html_fns.compileall() web_mini.html.html_fns.compileall()