@ -1,10 +1,13 @@ |
|||||||
build/ |
build/ |
||||||
venv/ |
venv/ |
||||||
dist/ |
dist/ |
||||||
inputFiles/ |
IL_InputFiles/ |
||||||
__pycache__/ |
__pycache__/ |
||||||
2023/ |
|
||||||
|
|
||||||
*.spec |
*.spec |
||||||
*.log |
*.log |
||||||
*.xlsx |
*.xlsx |
||||||
|
*.txt |
||||||
|
*.md |
||||||
|
|
||||||
|
!todo.md |
||||||
@ -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 |
|
||||||
@ -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}") |
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 477 B |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 819 B |
|
After Width: | Height: | Size: 512 B |
|
After Width: | Height: | Size: 568 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
@ -1,11 +1,11 @@ |
|||||||
from ILE_MainWindow import Ui_MainWindow |
from ui_ile_main_window import Ui_MainWindow |
||||||
import sys |
import sys |
||||||
import os |
import os |
||||||
import pandas as pd |
import pandas as pd |
||||||
import json |
import json |
||||||
from PyQt5 import QtWidgets |
from PyQt5 import QtWidgets |
||||||
from datetime import datetime as dt |
from datetime import datetime as dt |
||||||
import ILExtract as ilx |
import il_reports as ilx #TODO redo aliasing |
||||||
from logging import debug, DEBUG, basicConfig |
from logging import debug, DEBUG, basicConfig |
||||||
|
|
||||||
|
|
||||||
@ -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 |
||||||
|
|
||||||
|
|
||||||
|
--- |
||||||