working
This commit is contained in:
parent
a385308f38
commit
9b0a20aa91
6 changed files with 275 additions and 69 deletions
53
main.py
53
main.py
|
|
@ -11,10 +11,63 @@ 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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue