mirror of
https://git.ari.lt/ari.lt/blog.ari.lt.git
synced 2025-02-04 09:39:25 +01:00
update @ Fri 11 Mar 15:48:17 EET 2022
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
parent
6de0c8103d
commit
f754c3b90b
1 changed files with 6 additions and 4 deletions
10
scripts/blog
10
scripts/blog
|
@ -18,8 +18,8 @@ from timeit import default_timer as code_timer
|
||||||
from typing import Dict, List, Tuple
|
from typing import Dict, List, Tuple
|
||||||
from warnings import filterwarnings as filter_warnings
|
from warnings import filterwarnings as filter_warnings
|
||||||
|
|
||||||
from css_html_js_minify import html_minify # type: ignore
|
from css_html_js_minify import (html_minify, # type: ignore
|
||||||
from css_html_js_minify import process_single_css_file
|
process_single_css_file)
|
||||||
from markdown import markdown # type: ignore
|
from markdown import markdown # type: ignore
|
||||||
from plumbum.commands.processes import ProcessExecutionError # type: ignore
|
from plumbum.commands.processes import ProcessExecutionError # type: ignore
|
||||||
from pyfzf import FzfPrompt # type: ignore
|
from pyfzf import FzfPrompt # type: ignore
|
||||||
|
@ -173,7 +173,7 @@ def pick_blog(config: Dict) -> str:
|
||||||
lambda key: f"{key} | {b64decode(config['blogs'][key]['title']).decode()!r}",
|
lambda key: f"{key} | {b64decode(config['blogs'][key]['title']).decode()!r}",
|
||||||
config["blogs"].keys(),
|
config["blogs"].keys(),
|
||||||
),
|
),
|
||||||
"--prompt='Pick blog'",
|
"--prompt='Pick blog: '",
|
||||||
)[0]
|
)[0]
|
||||||
.split()[0]
|
.split()[0]
|
||||||
)
|
)
|
||||||
|
@ -437,7 +437,9 @@ def edit(config: Dict) -> Tuple[int, Dict]:
|
||||||
return EXIT_ERR, config
|
return EXIT_ERR, config
|
||||||
|
|
||||||
try:
|
try:
|
||||||
hook: str = FzfPrompt().prompt(EDIT_HOOKS.keys(), "--prompt='What to edit'")[0]
|
hook: str = FzfPrompt().prompt(EDIT_HOOKS.keys(), "--prompt='What to edit: '")[
|
||||||
|
0
|
||||||
|
]
|
||||||
|
|
||||||
if hook not in EDIT_HOOKS:
|
if hook not in EDIT_HOOKS:
|
||||||
return log(f"Hook {hook!r} does not exist"), config
|
return log(f"Hook {hook!r} does not exist"), config
|
||||||
|
|
Loading…
Add table
Reference in a new issue