From 073e8f9feb008dd5da0c3db7ae438b3a884ec0b6 Mon Sep 17 00:00:00 2001 From: Jack Sweeney Date: Fri, 19 Feb 2021 00:28:37 +0000 Subject: [PATCH] Begin Restructure -main file is now __main__.py --- README.md | 4 ++-- __init__.py | 0 NotifyBotMulti.py => __main__.py | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 __init__.py rename NotifyBotMulti.py => __main__.py (97%) diff --git a/README.md b/README.md index 1cd113d..ee8c7a9 100644 --- a/README.md +++ b/README.md @@ -120,13 +120,13 @@ screen -R ### Start Program ```bash -python3 NotifyBotMulti.py +python3 plane-notify ``` ### TODO - General Cleanup -- Restructure project to make it proper currently random files because I didn't know how to properly structure a project before. +- Restructure project to make it proper currently random files because I didn't know how to properly structure a project before. (in progress) - Add requirments.txt file from pip freeze to create easy dependencies install - On data loss/gain calculate AGL ft above nearest airport and use that altitude instead of just using baro/geo alt from ADS-B which is MSL. diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/NotifyBotMulti.py b/__main__.py similarity index 97% rename from NotifyBotMulti.py rename to __main__.py index 86a8ab1..d406dd5 100644 --- a/NotifyBotMulti.py +++ b/__main__.py @@ -10,6 +10,10 @@ from planeClass import Plane from datetime import datetime import pytz import os +if 'plane-notify' not in os.getcwd(): + os.chdir('./plane-notify') +import sys +sys.path.extend([os.getcwd()]) required_files = [("Roboto-Regular.ttf", 'https://github.com/google/fonts/raw/master/apache/roboto/static/Roboto-Regular.ttf'), ('airports.csv', 'https://ourairports.com/data/airports.csv'), ('regions.csv', 'https://ourairports.com/data/regions.csv')] for file in required_files: file_name = file[0]