mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2025-06-05 21:59:23 +02:00
Fix Docker setup
This commit is contained in:
@ -8,6 +8,7 @@ import bcrypt
|
||||
import tomli_w
|
||||
from markdown import markdown # type: ignore
|
||||
from prompt_toolkit import prompt
|
||||
from prompt_toolkit.key_binding import KeyBindings
|
||||
|
||||
from app.key import generate_key
|
||||
|
||||
@ -15,6 +16,15 @@ _ROOT_DIR = Path().parent.resolve()
|
||||
_KEY_PATH = _ROOT_DIR / "data" / "key.pem"
|
||||
|
||||
|
||||
_kb = KeyBindings()
|
||||
|
||||
|
||||
@_kb.add("c-@")
|
||||
def _(event):
|
||||
"""Save multi-line buffer on CTRL + space"""
|
||||
event.current_buffer.validate_and_handle()
|
||||
|
||||
|
||||
def main() -> None:
|
||||
print("Welcome to microblog.pub setup wizard\n")
|
||||
print("Generating key...")
|
||||
@ -52,8 +62,9 @@ def main() -> None:
|
||||
prompt(
|
||||
(
|
||||
"summary (short description, in markdown, "
|
||||
"press [ESC] then [ENTER] to submit):\n"
|
||||
"press [CTRL] + [SPACE] to submit):\n"
|
||||
),
|
||||
key_bindings=_kb,
|
||||
multiline=True,
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user