diff --git a/.gitignore b/.gitignore index 833202d..695edac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,13 @@ build/ venv/ dist/ -inputFiles/ +IL_InputFiles/ __pycache__/ -2023/ *.spec *.log -*.xlsx \ No newline at end of file +*.xlsx +*.txt +*.md + +!todo.md \ No newline at end of file diff --git a/compile_gui b/compile_gui deleted file mode 100644 index 4e6afcf..0000000 --- a/compile_gui +++ /dev/null @@ -1 +0,0 @@ -pyinstaller -w --add-data "assets/extract.svg;." --add-data "assets/process.svg;." --add-data "assets/folder.svg;." --add-data "assets/copy.svg;." --add-data "settings.json;." -i assets/extract.ico -n "IL Extract" main.py \ No newline at end of file diff --git a/ile_installer.py b/ile_installer.py deleted file mode 100644 index c77096c..0000000 --- a/ile_installer.py +++ /dev/null @@ -1,118 +0,0 @@ -from os import system, getlogin -import os -from sys import exit -from zipfile import ZipFile -import win32com.client -from glob import glob -import re - -from itertools import cycle -from shutil import get_terminal_size -from threading import Thread -from time import sleep - -def error_exit(exception_info: str): - print(exception_info) - input("\nPress enter/return to exit") - exit(1) - - -class NoMatchingFile(Exception): - def __init__(self, search_file: str, found: list) -> None: - super().__init__(f"File: {search_file} was not found: {found}") - - -class Loader: - def __init__(self, desc="Loading...", end="Done!", timeout=0.1): - """ - A loader-like context manager - - Args: - desc (str, optional): The loader's description. Defaults to "Loading...". - end (str, optional): Final print. Defaults to "Done!". - timeout (float, optional): Sleep time between prints. Defaults to 0.1. - """ - self.desc = desc - self.end = end - self.timeout = timeout - - self._thread = Thread(target=self._animate, daemon=True) - self.steps = ["|", "/", "-", "\\",] - self.done = False - - def start(self): - self._thread.start() - return self - - def _animate(self): - for c in cycle(self.steps): - if self.done: - break - print(f"\r{self.desc} {c}", flush=True, end="") - sleep(self.timeout) - - def __enter__(self): - self.start() - - def stop(self): - self.done = True - cols = get_terminal_size((80, 20)).columns - print("\r" + " " * cols, end="", flush=True) - print(f"\r{self.end}", flush=True) - - def __exit__(self, exc_type, exc_value, tb): - # handle exceptions with those variables ^ - self.stop() - -ZIP_LOCATION = r"\\leafnow.com\public\Accounting Shared\ILE Apps" -APP_FOLDER = r"InfoLeaseExtract" - -try: - - user = getlogin() - install_folder = f"C:\\Users\\{user}\\AppData\\Local" - backup_install_folder = f"C:\\Users\\{user}\\Documents\\" - - print(f"Initalizing InfoLease Extract Installer\n#######################################") - # Find the newest version: - latest_version = glob(f"{ZIP_LOCATION}\\LATEST*") - if len(latest_version) == 0: - # Create Custom exception - raise NoMatchingFile(f"{ZIP_LOCATION}\\LATEST*", latest_version) - - latest_version: str = latest_version[0] - version = re.search("\d+\.\d+", latest_version).group() - print(f"Installing verion {version}...") - - with ZipFile(latest_version, 'r') as zipObj: - try: - with Loader("Setting up program files..."): - zipObj.extractall(install_folder) - except Exception as e: - error_exit(f"Failed to extract file ({latest_version}) to '{install_folder}' :\n{e}") - - print("Creating Desktop shortcut...") - try: - desktop = f"C:\\Users\\{user}\\OneDrive - LEAF Commercial Capital\\Desktop" - shell = win32com.client.Dispatch("WScript.Shell") - shortcut = shell.CreateShortCut(os.path.join(desktop, "IL Extract v3.10.lnk"),) - shortcut.Targetpath = f"{install_folder}\\IL Extract\\IL Extract.exe" - shortcut.IconLocation = f"{install_folder}\\IL Extract\\assets\\extract.ico" - shortcut.WorkingDirectory = f"{install_folder}\\IL Extract" - shortcut.save() - except: - try: - desktop = f"C:\\Users\\{user}\\Desktop" - shell = win32com.client.Dispatch("WScript.Shell") - shortcut = shell.CreateShortCut(os.path.join(desktop, "IL Extract v3.10.lnk"),) - shortcut.Targetpath = f"{install_folder}\\IL Extract\\IL Extract.exe" - shortcut.IconLocation = f"{install_folder}\\IL Extract\\assets\\extract.ico" - shortcut.WorkingDirectory = f"{install_folder}\\IL Extract" - shortcut.save() - except Exception as e: - error_exit(f"Failed to create shortcut. The application is still installed at:\n{install_folder}\\IL Extract.\nYou can manually create a shortcut if you would like.\n{e}") - - print(f"\nInstallation Completed Successfully!") - input("\nPress Enter/Return to exit.") -except Exception as e: - error_exit(f"High level exception:\n{e}") \ No newline at end of file diff --git a/src/assets/checkedCircle.svg b/src/assets/checkedCircle.svg new file mode 100644 index 0000000..e3afbdc --- /dev/null +++ b/src/assets/checkedCircle.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/copy.svg b/src/assets/copy.svg new file mode 100644 index 0000000..f23e8f2 --- /dev/null +++ b/src/assets/copy.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/excel.svg b/src/assets/excel.svg new file mode 100644 index 0000000..99c6cd6 --- /dev/null +++ b/src/assets/excel.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/assets/extract.ico b/src/assets/extract.ico new file mode 100644 index 0000000..faab094 Binary files /dev/null and b/src/assets/extract.ico differ diff --git a/src/assets/extract.svg b/src/assets/extract.svg new file mode 100644 index 0000000..c392432 --- /dev/null +++ b/src/assets/extract.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/fileSearch.svg b/src/assets/fileSearch.svg new file mode 100644 index 0000000..6e04a1c --- /dev/null +++ b/src/assets/fileSearch.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/folder.svg b/src/assets/folder.svg new file mode 100644 index 0000000..5488499 --- /dev/null +++ b/src/assets/folder.svg @@ -0,0 +1,2 @@ + + diff --git a/src/assets/maximize.svg b/src/assets/maximize.svg new file mode 100644 index 0000000..1d60cee --- /dev/null +++ b/src/assets/maximize.svg @@ -0,0 +1,24 @@ + + + + + + \ No newline at end of file diff --git a/src/assets/process.svg b/src/assets/process.svg new file mode 100644 index 0000000..e20b6ba --- /dev/null +++ b/src/assets/process.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/settings.svg b/src/assets/settings.svg new file mode 100644 index 0000000..4debab2 --- /dev/null +++ b/src/assets/settings.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/main.py b/src/il_extract.py similarity index 99% rename from main.py rename to src/il_extract.py index 20da80f..23a746f 100644 --- a/main.py +++ b/src/il_extract.py @@ -1,11 +1,11 @@ -from ILE_MainWindow import Ui_MainWindow +from ui_ile_main_window import Ui_MainWindow import sys import os import pandas as pd import json from PyQt5 import QtWidgets from datetime import datetime as dt -import ILExtract as ilx +import il_reports as ilx #TODO redo aliasing from logging import debug, DEBUG, basicConfig diff --git a/ILExtract.py b/src/il_reports.py similarity index 100% rename from ILExtract.py rename to src/il_reports.py diff --git a/settings.json b/src/settings.json similarity index 100% rename from settings.json rename to src/settings.json diff --git a/ILE_MainWindow.py b/src/ui_ile_main_window.py similarity index 100% rename from ILE_MainWindow.py rename to src/ui_ile_main_window.py diff --git a/todo.md b/todo.md new file mode 100644 index 0000000..1c382b1 --- /dev/null +++ b/todo.md @@ -0,0 +1,34 @@ +# Work List + +## Priority +- [ ] Bring back in consolidated reports + - [ ] ACH + - [ ] CHECKS_LIVE + - [ ] CREDIT + - [ ] LOCKBOX + - [ ] PAY BY PHONE + - [ ] WIRES + - [ ] RETURNS ACH + - [ ] RETURNS Portal *(new addition)* + +- [ ] Adjust pyinstaller spec for new file structure + +## Feature Goals +- [ ] Year Walkthrough report + +Generate monthly consolidated reports for each month in a year + - Must generate IL Extract report where nesseary + +- [ ] Users can add/create new reports + - This would be very complicated + +## Code Improvement +- [ ] Rework IL Report as an ABC and report types as sub-classes +- [ ] Rework config set up +- [ ] Simpify & standardize row/data parsing + + +## Completed last commit + + +--- \ No newline at end of file