mirror of
https://git.ari.lt/ari.lt/blog.ari.lt.git
synced 2025-02-04 17:49:24 +01:00
update @ Mon Oct 30 13:06:52 EET 2023
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
parent
23f12f0af8
commit
6e9f3cf0a9
1 changed files with 8 additions and 1 deletions
|
@ -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}")
|
||||||
|
|
||||||
|
try:
|
||||||
subprocess.run([(token.replace("%s", path)) for token in editor])
|
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()
|
||||||
|
|
Loading…
Add table
Reference in a new issue