Files
noteki/main.py
git_alhan 9f3a599b79 Initial commit: Noteki v1.0
- 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
2026-05-21 04:13:45 +03:00

52 lines
1.4 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
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()