Captain_s-Log/main.py
Vic Sergeev 9b0a20aa91 working
2026-07-04 16:14:16 +03:00

73 lines
No EOL
1.3 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.

#!/usr/bin/env python3
"""
Captain's Log - Приложение для быстрых заметок
"""
import sys
import os
# Добавляем текущую директорию в путь для импорта
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from app.ui.main_window import MainWindow
def create_gitignore():
"""Создать .gitignore если его нет"""
gitignore_path = os.path.join(os.path.dirname(__file__), '.gitignore')
if not os.path.exists(gitignore_path):
gitignore_content = """# Python
__pycache__/
*.py[cod]
*$py.class
*.so
*.egg-info/
dist/
build/
*.egg
# Виртуальное окружение
.venv/
venv/
ENV/
env/
# База данных и данные приложения
captains_log.db
*.db
# IDE
.idea/
.vscode/
*.swp
*.swo
*~
# Nuitka
*.build/
*.dist/
*.onefile-build/
# OS
.DS_Store
Thumbs.db
"""
try:
with open(gitignore_path, 'w') as f:
f.write(gitignore_content)
except:
pass # Игнорируем ошибки при создании .gitignore
def main():
"""Точка входа в приложение"""
# Создаем .gitignore при первом запуске
create_gitignore()
app = MainWindow()
app.mainloop()
if __name__ == "__main__":
main()