mirror of
https://github.com/Sea-Haven-Industries/stampli-bulk-editor.git
synced 2026-09-30 03:23:13 +00:00
Mac GUI app for bulk-editing Stampli invoice pay dates
- CSV export with Row ID and Amount columns (UTF-8 BOM for Excel) - CSV import: reimport edited pay dates, apply by invoice matching - Chrome profile support alongside Chromium persistent context - Settings dialog for browser mode and Chrome profile selection - Stop button to halt mid-run (skips filter/pay prompt) - Sequential invoice-matching edit flow for virtual scroll grid - Triple-click + type for Pikaday text date inputs - Post-edit audit pass to catch silently reverted edits - Debug logging to ~/Library/Application Support/Stampli Bulk Editor/ - Close Browser fully kills all pages and lingering processes - Optimized edit timing (~3 sec/edit, down from ~6 sec) |
||
|---|---|---|
| .gitignore | ||
| app_icon.icns | ||
| app_icon.png | ||
| edit_pay_dates.py | ||
| generate_icon.py | ||
| README.md | ||
| requirements.txt | ||
| scan_pending.py | ||
| stampli_core.py | ||
| stampli_gui.py | ||
| stampli_gui.spec | ||
Stampli Bulk Editor
Mac desktop app for bulk-editing invoice pay dates in Stampli. Uses Playwright to automate the Stampli web UI through a real Chromium browser session.
What It Does
Two operations, available via GUI or CLI:
- Edit Pay Dates — Scans the "Ready to Pay" grid, calculates the correct pay date for each invoice (5 business days before the due date), and bulk-updates any rows that differ. After editing, optionally filters to error-free rows, selects all, and clicks Pay Invoices.
- Scan Pending — Reads the "Pending Approval" grid and flags invoices where the pay date doesn't match the expected calculation.
Setup
# Create a virtual environment and install dependencies
uv venv && source venv/bin/activate
uv pip install -r requirements.txt
# Install Chromium for Playwright
playwright install chromium
Usage
GUI (recommended)
python stampli_gui.py
Select an operation, optionally enable Dry Run, and click Run. The app launches a persistent Chromium browser — log in to Stampli on first use and the session is saved for future runs.
CLI
# Preview changes without editing
python edit_pay_dates.py --dry-run
# Edit pay dates
python edit_pay_dates.py
# Only run the filter/select/pay step
python edit_pay_dates.py --filter-only
# Interactive inspect mode (debug)
python edit_pay_dates.py --inspect
# Scan pending approvals for incorrect dates
python scan_pending.py
Building the Mac App
pyinstaller stampli_gui.spec
The bundled .app is written to dist/Stampli Bulk Editor.app. It expects Playwright's Chromium to be installed at ~/Library/Caches/ms-playwright/ (the standard Playwright cache location).
Configuration
Config is stored at ~/Library/Application Support/Stampli Bulk Editor/config.json. Defaults:
| Key | Default | Description |
|---|---|---|
stampli_url |
Ready to Pay dashboard URL | Starting page for edit mode |
date_format |
%m/%d/%Y |
Date format used in the grid |
days_before_due |
5 |
Business days before due date to set pay date |
Project Structure
stampli_core.py # Shared logic: browser management, grid scanning, date calculation, editing
stampli_gui.py # tkinter GUI
edit_pay_dates.py # CLI for editing pay dates
scan_pending.py # CLI for scanning pending approvals
stampli_gui.spec # PyInstaller build spec (arm64 macOS)