mirror of
https://github.com/alhan/noteki.git
synced 2026-08-23 05:30:19 +00:00
- Modern sticky notes app for Windows - PySide6 full-screen transparent canvas - System tray integration, global Alt+N hotkey - Session management, undo/redo, auto-save - Custom color palette with dynamic contrast - Pin notes always-on-top, Tab navigation - Windows Named Mutex single-instance guard
52 lines
1.4 KiB
Python
52 lines
1.4 KiB
Python
"""
|
||
main.py — Sticky Canvas uygulama giriş noktası
|
||
"""
|
||
|
||
import sys
|
||
import os
|
||
|
||
|
||
def main() -> None:
|
||
# PySide6 yüklü mu?
|
||
try:
|
||
from PySide6.QtWidgets import QApplication
|
||
except ImportError:
|
||
print(
|
||
"PySide6 bulunamadı. Lütfen şu komutu çalıştırın:\n"
|
||
" pip install PySide6",
|
||
file=sys.stderr,
|
||
)
|
||
sys.exit(1)
|
||
|
||
# src paketinin konumunu path'e ekle
|
||
src_dir = os.path.dirname(os.path.abspath(__file__))
|
||
if src_dir not in sys.path:
|
||
sys.path.insert(0, src_dir)
|
||
|
||
try:
|
||
from src.app import StickyCanvasApp
|
||
app = StickyCanvasApp()
|
||
sys.exit(app.run())
|
||
except Exception as exc:
|
||
import logging
|
||
import traceback
|
||
logging.getLogger(__name__).critical("Kritik hata: %s", exc, exc_info=True)
|
||
# Kullanıcıya hata göster
|
||
try:
|
||
from PySide6.QtWidgets import QApplication, QMessageBox
|
||
q = QApplication.instance() or QApplication(sys.argv)
|
||
QMessageBox.critical(
|
||
None,
|
||
"Noteki — Kritik Hata",
|
||
f"Uygulama beklenmedik bir hatayla karşılaştı:\n\n{exc}\n\n"
|
||
"Detaylar için log dosyasını kontrol edin.",
|
||
)
|
||
except Exception:
|
||
print(f"KRITIK HATA: {exc}", file=sys.stderr)
|
||
traceback.print_exc()
|
||
sys.exit(1)
|
||
|
||
|
||
if __name__ == "__main__":
|
||
main()
|