mirror of
https://github.com/kristoferssolo/LU-bookstore.git
synced 2026-02-04 05:22:03 +00:00
29 lines
483 B
Python
Executable File
29 lines
483 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
from pathlib import Path
|
|
|
|
from bookstore.inventory import Inventory
|
|
|
|
from loguru import logger
|
|
from ui.app import App
|
|
|
|
# Set up logging
|
|
logger.add(
|
|
Path("logs", "bookstore.log"),
|
|
format="{time} | {level} | {message}",
|
|
level="INFO",
|
|
rotation="1 MB",
|
|
compression="zip",
|
|
)
|
|
|
|
|
|
@logger.catch
|
|
def main() -> None:
|
|
db_path = Path("db.sqlite3")
|
|
inventory = Inventory(db_path)
|
|
App(inventory).run()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|