diff --git a/.gitignore b/.gitignore index 7b82e54..b42097e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -**/__pycache__/ -static/ \ No newline at end of file +**/__pycache__/ \ No newline at end of file diff --git a/app/routes.py b/app/routes.py index 3b71427..bdeefd2 100644 --- a/app/routes.py +++ b/app/routes.py @@ -7,6 +7,14 @@ import os import openpyxl import time +def get_uploads_path(): + path1 = 'C:/Users/Lenovo/Desktop/BudgetingApp/app/static/uploadable/' + path2 = '/home/yisroel2/Desktop/budgetingApp/app/static/uploadable/' + for p in [path1, path2]: + if os.path.exists(p): + path = p + break + return path @app.route('/') def home(): @@ -16,7 +24,7 @@ def home(): notes = db.session.execute(select(LineItem.note)).all() vendors = db.session.execute(select(Vendor)).all() budget_categories = db.session.execute(select(BudgetCategory)).all() - files = os.listdir('C:/Users/Lenovo/Desktop/BudgetingApp/app/static/uploadable') + files = os.listdir(get_uploads_path()) return render_template('index.html', files=files, notes=notes, @@ -26,7 +34,7 @@ def home(): @app.route('/upload_file/') def upload_file(filename): - file_path = 'C:/Users/Lenovo/Desktop/BudgetingApp/app/static/uploadable/' + filename + file_path = get_uploads_path() + filename xl = openpyxl.load_workbook(file_path, read_only=True) wb = xl.worksheets[0] diff --git a/app/static/Credit_Card_Statements/Export_10_2022.xls b/app/static/Credit_Card_Statements/Export_10_2022.xls new file mode 100644 index 0000000..506e7a7 Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_10_2022.xls differ diff --git a/app/static/Credit_Card_Statements/Export_10_2023.xls b/app/static/Credit_Card_Statements/Export_10_2023.xls new file mode 100644 index 0000000..0259aae Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_10_2023.xls differ diff --git a/app/static/Credit_Card_Statements/Export_11_2022.xls b/app/static/Credit_Card_Statements/Export_11_2022.xls new file mode 100644 index 0000000..a8e10e6 Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_11_2022.xls differ diff --git a/app/static/Credit_Card_Statements/Export_11_2023.xls b/app/static/Credit_Card_Statements/Export_11_2023.xls new file mode 100644 index 0000000..78cdfd3 Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_11_2023.xls differ diff --git a/app/static/Credit_Card_Statements/Export_12_2022.xls b/app/static/Credit_Card_Statements/Export_12_2022.xls new file mode 100644 index 0000000..75b00d0 Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_12_2022.xls differ diff --git a/app/static/Credit_Card_Statements/Export_12_2023.xls b/app/static/Credit_Card_Statements/Export_12_2023.xls new file mode 100644 index 0000000..e7f72cd Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_12_2023.xls differ diff --git a/app/static/Credit_Card_Statements/Export_1_2023.xls b/app/static/Credit_Card_Statements/Export_1_2023.xls new file mode 100644 index 0000000..a43f973 Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_1_2023.xls differ diff --git a/app/static/Credit_Card_Statements/Export_1_2024.xls b/app/static/Credit_Card_Statements/Export_1_2024.xls new file mode 100644 index 0000000..85f583c Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_1_2024.xls differ diff --git a/app/static/Credit_Card_Statements/Export_2_2023.xls b/app/static/Credit_Card_Statements/Export_2_2023.xls new file mode 100644 index 0000000..35fb9e6 Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_2_2023.xls differ diff --git a/app/static/Credit_Card_Statements/Export_2_2024.xls b/app/static/Credit_Card_Statements/Export_2_2024.xls new file mode 100644 index 0000000..c8539c0 Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_2_2024.xls differ diff --git a/app/static/Credit_Card_Statements/Export_3_2023.xls b/app/static/Credit_Card_Statements/Export_3_2023.xls new file mode 100644 index 0000000..0974be0 Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_3_2023.xls differ diff --git a/app/static/Credit_Card_Statements/Export_3_2024.xls b/app/static/Credit_Card_Statements/Export_3_2024.xls new file mode 100644 index 0000000..308380c Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_3_2024.xls differ diff --git a/app/static/Credit_Card_Statements/Export_4_2023.xls b/app/static/Credit_Card_Statements/Export_4_2023.xls new file mode 100644 index 0000000..38e382b Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_4_2023.xls differ diff --git a/app/static/Credit_Card_Statements/Export_4_2024.xls b/app/static/Credit_Card_Statements/Export_4_2024.xls new file mode 100644 index 0000000..3f9f5d0 Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_4_2024.xls differ diff --git a/app/static/Credit_Card_Statements/Export_5_2023.xls b/app/static/Credit_Card_Statements/Export_5_2023.xls new file mode 100644 index 0000000..7e7a289 Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_5_2023.xls differ diff --git a/app/static/Credit_Card_Statements/Export_5_2024.xls b/app/static/Credit_Card_Statements/Export_5_2024.xls new file mode 100644 index 0000000..975be71 Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_5_2024.xls differ diff --git a/app/static/Credit_Card_Statements/Export_6_2023.xls b/app/static/Credit_Card_Statements/Export_6_2023.xls new file mode 100644 index 0000000..e7a9649 Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_6_2023.xls differ diff --git a/app/static/Credit_Card_Statements/Export_6_2024.xls b/app/static/Credit_Card_Statements/Export_6_2024.xls new file mode 100644 index 0000000..c7b7e57 Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_6_2024.xls differ diff --git a/app/static/Credit_Card_Statements/Export_7_2023.xls b/app/static/Credit_Card_Statements/Export_7_2023.xls new file mode 100644 index 0000000..bb1e4f8 Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_7_2023.xls differ diff --git a/app/static/Credit_Card_Statements/Export_7_2024.xls b/app/static/Credit_Card_Statements/Export_7_2024.xls new file mode 100644 index 0000000..32461d5 Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_7_2024.xls differ diff --git a/app/static/Credit_Card_Statements/Export_8_2023.xls b/app/static/Credit_Card_Statements/Export_8_2023.xls new file mode 100644 index 0000000..43a69fd Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_8_2023.xls differ diff --git a/app/static/Credit_Card_Statements/Export_8_2024.xls b/app/static/Credit_Card_Statements/Export_8_2024.xls new file mode 100644 index 0000000..02e585c Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_8_2024.xls differ diff --git a/app/static/Credit_Card_Statements/Export_9_2022.xls b/app/static/Credit_Card_Statements/Export_9_2022.xls new file mode 100644 index 0000000..0fedafc Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_9_2022.xls differ diff --git a/app/static/Credit_Card_Statements/Export_9_2023.xls b/app/static/Credit_Card_Statements/Export_9_2023.xls new file mode 100644 index 0000000..9504d9c Binary files /dev/null and b/app/static/Credit_Card_Statements/Export_9_2023.xls differ diff --git a/app/static/uploadable/Updated_Bank_Statement_Two_Years.xlsx b/app/static/uploadable/Updated_Bank_Statement_Two_Years.xlsx new file mode 100644 index 0000000..79b45f0 Binary files /dev/null and b/app/static/uploadable/Updated_Bank_Statement_Two_Years.xlsx differ diff --git a/instance/site.db b/instance/site.db index 2398e2c..8dcb7fe 100644 Binary files a/instance/site.db and b/instance/site.db differ diff --git a/pythonFiles/playground.py b/pythonFiles/playground.py index 8904127..94b7c2e 100644 --- a/pythonFiles/playground.py +++ b/pythonFiles/playground.py @@ -6,10 +6,10 @@ import os def engineer(): path1 = 'C:/Users/Lenovo/Desktop/BudgetingApp/instance/site.db' - # path2 = '' + path2 = '/home/yisroel2/Desktop/budgetingApp/instance/site.db' # path3 = '' - for p in [path1]: + for p in [path1, path2]: if os.path.exists(p): path = p break