diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 030a520..108416c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,10 @@ name: Release # Bump VERSION in maplead/art.py, tag, push: -# git tag v1.2.0 && git push origin v1.2.0 +# git tag v1.3.0 && git push origin v1.3.0 +# +# A tag push builds the Linux AppImage only. The Windows job runs when the +# workflow is started by hand (workflow_dispatch). on: push: @@ -31,7 +34,9 @@ jobs: sudo apt-get update -qq sudo apt-get install -y --no-install-recommends \ libglib2.0-0 libegl1 libxkbcommon-x11-0 libxcb-cursor0 \ - libdbus-1-3 libfontconfig1 fuse libfuse2 desktop-file-utils + libdbus-1-3 libfontconfig1 fuse libfuse2 desktop-file-utils \ + libnss3 libnspr4 libxcomposite1 libxdamage1 libxrandr2 libxtst6 \ + libxkbfile1 libasound2 - name: build + smoke test run: ./build-appimage.sh --no-test @@ -62,20 +67,31 @@ jobs: tag_name: ${{ github.event.inputs.tag || github.ref_name }} name: ${{ steps.meta.outputs.name }} body: | - One AppImage for Linux, one portable .exe for Windows. Both are the whole - product: the desktop window and the terminal wizard in a single file. + **MAPLEAD 1.3.0 — bulk WhatsApp sender (Linux)** - **Highlights in 1.2.0** + The leads panel can now send your WhatsApp message to a whole filter of + leads by itself, one at a time, with safety pauses against blocks. - - Leads panel with one-click website, Maps, e-mail and social links. - - WhatsApp buttons with a saved first-message template (`{nome}`, - `{cidade}`, `{site}` and more resolved from the scraped lead). - - Explicit **Export** (`Ctrl+S`): a search never writes a file by itself. - - Export filenames follow the latest business + city, with accents - transliterated (`São Paulo` → `sao-paulo`). - - Dark → light → dark theme toggling fixed. + ![bulk send button](https://raw.githubusercontent.com/${{ github.repository }}/main/docs/screenshots/bulk-panel.png) - Full notes: https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md + **What's new** + + - **Bulk send** button in the leads panel: pick a filter (e.g. *No website*), + untick who you want to skip, preview each message, press *Start sending*. + - **WhatsApp Web inside the app**: scan the QR code once, the session is kept. + Numbers that are not on WhatsApp are detected and skipped. + - **Safety pauses** (editable): random 45–120 s between messages, 10 min rest + every 10, a *"may get blocked — continue? (Yes/No)"* question every 25 and a + 50-a-day limit. + - **Contact history**: leads already messaged are marked *Contacted* and + skipped next time; new *Not contacted* filter. + - Fix: WhatsApp numbers taken from the provider's `whatsapp` field no longer + get a doubled `+` in front. + + ![picker](https://raw.githubusercontent.com/${{ github.repository }}/main/docs/screenshots/bulk-picker.png) + + Full notes: https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md · + guide: https://github.com/${{ github.repository }}/blob/main/docs/GUIDE.md#bulk-whatsapp **Linux x86_64** @@ -89,24 +105,16 @@ jobs: `APPIMAGE_EXTRACT_AND_RUN=1` — it unpacks itself into `~/.maplead-runtime/` and runs from there. - **Windows 10/11 x64** - - Download `MAPLEAD-*-windows-x64.exe` and double-click it. Nothing to unpack, - nothing to install. The same file is the terminal wizard: - - ```powershell - .\MAPLEAD-*-windows-x64.exe --cli --demo # guided wizard, no key needed - .\MAPLEAD-*-windows-x64.exe --cli --doctor # host diagnostics - ``` - - The build is unsigned, so SmartScreen asks once: *More info → Run anyway*. + Windows: this release has no new `.exe`; keep using 1.2.0 for now. - The user guide covers the rest: - https://github.com/${{ github.repository }}/blob/main/docs/GUIDE.md + > Automated WhatsApp messages go against WhatsApp's terms of service. The + > pauses lower the risk of the number being restricted; they do not remove it. files: ${{ steps.meta.outputs.path }} windows: name: build Windows x64 + # 1.3.0 ships for Linux only; build Windows by starting the workflow by hand + if: github.event_name == 'workflow_dispatch' runs-on: windows-latest steps: - uses: actions/checkout@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 708dc40..766f857 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,11 @@ unchanged in this release. - `tools/bulk_test.py` — try the sender on your own numbers without a search (`--forget` removes them from the history afterwards). +### Fixed +- A WhatsApp number taken from the provider's `whatsapp` field (used when the + main phone is a landline) no longer gets the country code with a stray `+`, + which produced numbers like `++351…`. + ### Changed - The AppImage now bundles QtWebEngine (the browser engine that runs WhatsApp Web inside the app), so the file is bigger. `build-appimage.sh` installs the diff --git a/README.md b/README.md index 4258048..65b7e6b 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,11 @@ Open the **Leads panel**, pick a filter (e.g. *No website*) and press **Bulk sen Everyone you message is remembered, so the next search skips them. Details and the safety settings: [docs/GUIDE.md › Bulk WhatsApp](docs/GUIDE.md#bulk-whatsapp). +

+ bulk send: pick the leads, preview, safety settings + bulk send: progress and activity log +

+ --- ## Terminal wizard diff --git a/docs/GUIDE.md b/docs/GUIDE.md index 120ec8b..cce9bb5 100644 --- a/docs/GUIDE.md +++ b/docs/GUIDE.md @@ -180,6 +180,8 @@ reading rather than for a spreadsheet: **Bulk send** in the panel header sends the saved message to every lead of the current filter and search (for example *No website*) that has a WhatsApp number. +![Bulk send in the leads panel](screenshots/bulk-panel.png) + 1. A checklist opens: untick anyone you want to leave out (leads already messaged come unticked), click a row to preview its message, and check the **Safety** settings. @@ -189,6 +191,13 @@ current filter and search (for example *No website*) that has a WhatsApp number. WhatsApp are marked and skipped. **Pause**, **Skip lead** and **Stop** work at any time. Keep the window open (minimising is fine). +![pick the leads, preview the message, safety settings](screenshots/bulk-picker.png) + +

+ progress and activity log + continue? question after 25 messages +

+ | Safety setting | default | what it does | |---|---|---| | Pause from / up to | 45 – 120 s | random wait between two messages | diff --git a/docs/screenshots/bulk-confirm.png b/docs/screenshots/bulk-confirm.png new file mode 100644 index 0000000..82df978 Binary files /dev/null and b/docs/screenshots/bulk-confirm.png differ diff --git a/docs/screenshots/bulk-panel.png b/docs/screenshots/bulk-panel.png new file mode 100644 index 0000000..8dfc78d Binary files /dev/null and b/docs/screenshots/bulk-panel.png differ diff --git a/docs/screenshots/bulk-picker.png b/docs/screenshots/bulk-picker.png new file mode 100644 index 0000000..e303710 Binary files /dev/null and b/docs/screenshots/bulk-picker.png differ diff --git a/docs/screenshots/bulk-sender.png b/docs/screenshots/bulk-sender.png new file mode 100644 index 0000000..c2a5fc7 Binary files /dev/null and b/docs/screenshots/bulk-sender.png differ diff --git a/maplead/contacts.py b/maplead/contacts.py index 1fb7bfb..f882586 100644 --- a/maplead/contacts.py +++ b/maplead/contacts.py @@ -127,7 +127,7 @@ def normalize_wa_number(value: Any, dial: str = "", iso: str = "") -> str: return "" iso = (iso or "").strip().lower() - dial_digits = digits_only(dial) or DIAL_BY_ISO.get(iso, "") + dial_digits = digits_only(dial) or digits_only(DIAL_BY_ISO.get(iso, "")) if raw.startswith("+"): return _drop_trunk_zero(digits, iso, dial_digits) diff --git a/maplead/gui/bulk_sender.py b/maplead/gui/bulk_sender.py index 8d8df6a..0511add 100644 --- a/maplead/gui/bulk_sender.py +++ b/maplead/gui/bulk_sender.py @@ -197,8 +197,8 @@ def __init__(self, leads: Sequence[Dict[str, Any]], palette: Palette, *, self.selected: List[outreach.OutreachItem] = [] self.setWindowTitle("MAPLEAD — bulk WhatsApp") - self.setMinimumSize(860, 640) - self.resize(980, 760) + self.setMinimumSize(900, 640) + self.resize(1120, 760) self.setSizeGripEnabled(True) root = QVBoxLayout(self) @@ -309,6 +309,7 @@ def __init__(self, leads: Sequence[Dict[str, Any]], palette: Palette, *, split.addWidget(side) split.setStretchFactor(0, 3) split.setStretchFactor(1, 2) + split.setSizes([640, 420]) root.addWidget(split, 1) # footer --------------------------------------------------------------- @@ -354,12 +355,14 @@ def _fill(self) -> None: check.setFlags(Qt.ItemIsUserCheckable | Qt.ItemIsEnabled | Qt.ItemIsSelectable) check.setCheckState(Qt.Unchecked if item.contacted else Qt.Checked) self.table.setItem(row, self.COL_CHECK, check) - self.table.setItem(row, self.COL_NAME, QTableWidgetItem(item.name)) + name_cell = QTableWidgetItem(item.name) + name_cell.setToolTip(item.name) + self.table.setItem(row, self.COL_NAME, name_cell) self.table.setItem(row, self.COL_NUMBER, QTableWidgetItem("+" + item.number)) entry = self.history.get(item.number) if entry and item.contacted: when = (entry.last_sent or entry.first_sent or entry.at)[:10] - text = f"Contacted {when}" + text = f"Contacted {when[8:10]}/{when[5:7]}" if len(when) == 10 else "Contacted" elif entry: text = outreach.STATUS_LABELS.get(entry.status, entry.status) else: