2025-12-04 13:21:49 +01:00
|
|
|
"""
|
|
|
|
|
This is where the application is implemented.
|
|
|
|
|
"""
|
|
|
|
|
|
2025-12-26 18:53:14 +01:00
|
|
|
import logging
|
2025-12-04 19:25:18 +01:00
|
|
|
|
2025-12-26 18:53:14 +01:00
|
|
|
from textual.app import App
|
2025-12-28 21:56:57 +01:00
|
|
|
from textual.logging import TextualHandler
|
2025-12-04 13:21:49 +01:00
|
|
|
|
2026-02-14 18:51:37 +01:00
|
|
|
from .database import create_db_and_tables
|
2025-12-26 18:53:14 +01:00
|
|
|
from .tui import AddInventoryScreen
|
2025-12-04 13:21:49 +01:00
|
|
|
|
2025-12-28 21:56:57 +01:00
|
|
|
logging.basicConfig(
|
|
|
|
|
level="NOTSET",
|
|
|
|
|
handlers=[TextualHandler()],
|
|
|
|
|
)
|
2025-12-26 18:53:14 +01:00
|
|
|
logger = logging.getLogger(__name__)
|
2025-12-04 13:21:49 +01:00
|
|
|
|
|
|
|
|
|
2026-02-18 20:40:58 +01:00
|
|
|
class SammlerApp(App):
|
2026-02-07 02:44:59 +01:00
|
|
|
async def on_mount(self) -> None:
|
|
|
|
|
create_db_and_tables()
|
|
|
|
|
_ = self.push_screen(AddInventoryScreen())
|
|
|
|
|
|
|
|
|
|
|
2025-12-28 21:56:21 +01:00
|
|
|
app = SammlerApp()
|
|
|
|
|
|
|
|
|
|
|
2025-12-04 13:21:49 +01:00
|
|
|
def main() -> None:
|
|
|
|
|
app.run()
|
2025-12-26 18:53:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
main()
|