Version: 3.0.1 (NexisUploader release)
_____ _ ____ ___ _ _ _ _ ___ ____ ___ _ ___
| ___/ \ | _ \ / / | | | || | | \ | \ \ / ___| / _ \| | / _ \
| |_ / _ \ | |_) | || |_| | || |_| \| || | \___ \| | | | | | | | |
| _/ ___ \| _ <| || _ |__ _| |\ || | ___) | |_| | |__| |_| |
|_|/_/ \_\_| \_\ ||_| |_| |_| |_| \_|| |___|____/ \___/|_____\___/
\_\ /_/_____|
TurnpointPurger (c) (Far)H4n_SOLO is a cinematic Selenium toolkit that logs into TurnPoint, extracts every client artefact, snapshots linked documents, and repackages everything under the sequential “NexisID” archive (PurgedClients/10000x …). It ships with both a CLI and a neon Tkinter UI (TurnpointPurger) that show live logs, a Nexix365 badge, purge history counters, and the NexisUploader hub for converting purged data into Nexis-ready worker and client payloads.
- Python 3.11+ for building/testing.
- Google Chrome installed locally (Selenium Manager fetches the matching driver automatically).
.envfile with:TP_USERNAME=... TP_PASSWORD=... PURGER_CONTACT_EMAIL=you@example.com # optional, shown inside the GUI TURNPOINT_BASE_ROOT=~/LOCALDB_TurnpointPG # optional, base for all runtime outputs- Optional: set
TP_OPERATORto prefill the operator codename used in logs/UI.
- Install dependencies once (this also sets up build helpers):
python -m venv .venv source .venv/bin/activate pip install --upgrade pip pip install -e . pip install pyinstaller
- Build the GUI app bundle (outputs to
dist/macos/TurnpointPurger.app):or runpyinstaller turnpoint_gui.spec
python build.py --guito install PyInstaller (when missing) and emit the.appinto the macOS-specific dist folder. - Create a DMG (optional) using
hdiutil create -fs HFS+ -volname "TurnpointPurger" turnpoint_purger.dmg dist/TurnpointPurger.app. - Share the
.app(or DMG) with macOS users. On first launch they may need to right-click → Open to bypass Gatekeeper.
- From an activated virtualenv with project deps installed (
pip install -e .), build both variants:or just run:pyinstaller turnpoint_gui.spec # windowed GUI (.app inside dist/windows on Win build hosts) pyinstaller turnpoint_cli.spec # console version
to have the helper install PyInstaller (if needed) and emit binaries underpython build.py --gui --cli
dist\windows\. - Each build creates a folder under the platform-specific dist directory (e.g.,
dist\windows\TurnpointPurger). Zip that folder to share with operators. - Recipients should:
- Extract the ZIP somewhere writable (e.g.,
C:\TurnpointPurger). - Place a
.envfile next to the EXE with their credentials. - Run
TurnpointPurger.exe(GUI) orTurnpointPurgerCLI.exe. - If SmartScreen warns, choose “More info” → “Run anyway”.
- Extract the ZIP somewhere writable (e.g.,
pip install -e .
turnpoint-purger-gui # launches UI
turnpoint-purger-cli # terminal workflow
turnpoint-budgeter # standalone budget export helper- Launches in full-screen (zoomed/maximized) mode and keeps a scrollable layout so the Directive Console, status panels, and log feed stay visible even on smaller displays.
- Client Discovery controls (Find Purgeable Clients + Bundle Download actions) stay hidden until valid credentials are configured, preventing accidental bundle jobs with empty credentials.
- Buttons reuse the existing logging/status system so you get toast + log updates as the purgeable dataset or bundles are generated.
- A Client Atlas panel loads
PDCC/package_manifest.csv, shows every client (order, ID, name, package) in a tree view, and color-codes rows: yellow for pending, red for already-purged IDs. Use the Collect Package Manifest button to crawl all packages fromclients.aspand regenerate the manifest, then hit Refresh Client Atlas to reload or recolor the table. - The NexisUploader tab converts
PurgedWorkerfolders into Nexis-ready payloads, generates combined worker CSV/JSON files for engineers, batches worker detail exports intoPurgedWorker/CLEANEDFORNEXIS, and exports/upgradesPurgedClients/FormatforClient(Nexis)/clients-data.csvfrom the per-client archives. Live preview panels show the JSON payload that will be uploaded to Nexis. - Bundle download buttons now open a package picker: select “All Packages” or click individual package buttons to queue bundle exports sequentially. Each run logs per-package outcomes and reuses the purgeable Excel snapshot saved under PDCC.
- Added a Purge All Clients workflow that reads every client ID from the manifest, purges sequentially, and enforces a configurable cooldown (enter the delay in seconds, minimum 20) to avoid TurnPoint 403 lockouts. A red “Override cooldown / Force next client” button lets you skip the wait mid-cycle, and the cooldown progress bar counts down every pause.
- Bundle + manifest actions now surface operational metadata: an indeterminate progress bar spins while bundles are downloading, and timestamp labels (“Bundle last run…”, “Manifest updated…”) let ops teams see when each dataset was last refreshed.
- Running
python importcsv.pystill prompts for a single client ID, but now the CLI stops when a duplicate purge is detected. Pass--force-duplicateto override the guard, or--no-duplicate-promptto fail fast without user input. - To automate multiple clients, provide a CSV manifest (
client_id,client_name,package). A template lives atclient_manifest.example.csv; copy it toclient_manifest.csvor pass the path via--manifest. - Process clients serially per package:
Packages are consumed in the order provided; each matching client is purged sequentially.
python importcsv.py --manifest nexis_clients.csv --package "Core Supports" --package "SIL"
- Purge everyone listed in the manifest (useful for the full 260+ client sweep):
python importcsv.py --manifest nexis_clients.csv --all-clients
- Batch runs respect the duplicate guard—clients with an existing purge history are skipped unless
--force-duplicateis set.
- Use
python importcsv.py --find-purgeable(or the new Find Purgeable Clients button in the UI) to log in, force the record limit to 10,000, apply the purgeable filter, and download the Excel dataset of every purgeable client. The workbook is stored atPurgedClients/Package Divided Client Credential (PDCC)/latest_purgeable_clients.xlsx. - Generate package exports via
python importcsv.py --bundle-downloador the Bundle Download button; each package detected in the workbook gets its own folder containing both.xlsxand.csvlists:PurgedClients/ Package Divided Client Credential (PDCC)/ NDIS - NDIA Managed/ NDIS_-_NDIA_Managed_clients.xlsx NDIS_-_NDIA_Managed_clients.csv ... - Restrict the bundle to specific packages with
--bundle-package "HCP L1" --bundle-package "SaH Level 4"; add--update-bundle(or use the Update package bundle to latest button—visible once credentials are configured) to re-download the dataset and replace every package export. - Bundle runs reuse the latest purgeable workbook when present and only re-download when
--update-bundleis supplied. - Set
PURGEABLE_CLIENTS_URL(and optionallyPDCC_ROOT) in.envif your TurnPoint tenant exposes the purgeable list at a different path or you prefer a custom export root. For one-off runs, pass--purgeable-url https://tp1.com.au/custom-client-list.aspto override without editing the environment. - Need a turnkey manifest of every client per package? Run
python importcsv.py --collect-packages(optionally combine with--package "NDIS - Plan Managed"to limit the crawl). The crawler logs in, iterates each package filter onclients.asp, and writesPurgedClients/Package Divided Client Credential (PDCC)/package_manifest.csvwith ordered rows (order, package, client id, client name, details url). The manifest will feed the upcoming UI tables. - For an even deeper dive (architecture, workflow, UML), refer to
docs/TurnpointPurger_Notes.md.
python -m venv .venv
.\.venv\Scripts\activatepip install --upgrade pippip install -e .pip install pyinstaller- (optional)
python Declutter.pyto remove previous build outputs plus cache/temp clutter (build/,dist/,htmlcov/,*.egg-info,__pycache__/,.pytest_cache/,.mypy_cache/,.ruff_cache/,.coverage*,.DS_Store,Thumbs.db, and common temp files). Usepython Declutter.py --skip-temp-filesto keep generic*.tmp/swap files. pyinstaller turnpoint_gui.spec→ GUI bundle (dist\windows\TurnpointPurger\)pyinstaller turnpoint_cli.spec→ CLI bundle (dist\windows\TurnpointPurgerCLI\)- Alternatively run
python build.py --gui --clito produce both in one shot. - Zip the
dist\windows\TurnpointPurger*folders and ship them with instructions to drop a.env(TP credentials + optional overrides) beside the EXE.
- All output folders now route under
~/LOCALDB_TurnpointPG/(override viaTURNPOINT_BASE_ROOT) with three domains:PurgedClients,PurgedWorker, andLineItemRates. - Duplicate client IDs are detected; the tool emits a
_duplicate_reports/<client>.csvledger showing the last purge timestamp before allowing a rerun. - Persistent stats are stored at
LineItemRates/_state/purger_state.jsonandLineItemRates/_state/worker_state.json. - The build helper writes intermediates to
build/and final binaries intodist/<platform>/. Clean them up between releases withpython Declutter.py(or inspect first withpython Declutter.py --dry-run).
Refer to PACKAGING.md for deeper build/customization steps.
- Upcoming work: appointments + invoices automation are next on the roadmap; hooks are being designed so future releases can pull those directly into Nexis alongside workers/clients.
