Merge branch 'main' of https://git.miaig.dev/mia/hafas-terminal-app
This commit is contained in:
commit
31c10e81b9
1 changed files with 33 additions and 0 deletions
|
|
@ -6,3 +6,36 @@ haTerm is a Terminal Based hafas client, using the ivb endpoint.
|
|||
Prompt_toolkit (https://github.com/prompt-toolkit/python-prompt-toolkit) will be used to render a terminal user interface (TUI).
|
||||
The application will provide routing information and station departures/arrivals.
|
||||
"""
|
||||
#routenplanung mit promt tool kit
|
||||
|
||||
import prompt_toolkit as pk
|
||||
import time
|
||||
from prompt_toolkit import Application
|
||||
from prompt_toolkit.buffer import Buffer
|
||||
from prompt_toolkit.layout.containers import HSplit, VSplit, Window
|
||||
from prompt_toolkit.layout.controls import BufferControl
|
||||
from prompt_toolkit.layout.layout import Layout
|
||||
from prompt_toolkit.key_binding import KeyBindings
|
||||
|
||||
kb = KeyBindings()
|
||||
startBuffer = Buffer()
|
||||
endBuffer = Buffer()
|
||||
|
||||
|
||||
root_container = HSplit(children=[
|
||||
HSplit(children=[
|
||||
Window(content=BufferControl(buffer=startBuffer, focusable=True)),
|
||||
Window(width=1, char='-', style="fg:#2A71D5"),
|
||||
|
||||
Window(content=BufferControl(buffer=endBuffer, focusable=True))
|
||||
]),
|
||||
Window(height=1, char=' ', style="bg:#2A71D5 fg:black"),
|
||||
#Window(content=BufferControl(buffer=userBuffer),height=4),
|
||||
])
|
||||
|
||||
layout = Layout(root_container)
|
||||
|
||||
app = Application(layout=layout, key_bindings=kb, full_screen=True)
|
||||
|
||||
app.run()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue