Add main entry point for Blurb Photo Book Editor
- Implemented the main function to launch the editor. - Added error handling for missing PySide6 dependency. - Included instructions for installing required packages.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
"""Launch the Blurb Photo Book Editor."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
def main() -> int:
|
||||
try:
|
||||
from blurb_editor import run
|
||||
except ImportError as exc:
|
||||
if exc.name and exc.name.startswith("PySide6"):
|
||||
raise SystemExit(
|
||||
"PySide6 is not installed in this Python environment. "
|
||||
"Run .\\.venv\\Scripts\\python.exe -m pip install -r requirements.txt first."
|
||||
) from exc
|
||||
raise
|
||||
return run()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user