Fix Docker setup
This commit is contained in:
parent
dda4d22880
commit
b5b8162cfa
4 changed files with 24 additions and 8 deletions
|
@ -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,
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue