π« The Pain Point
Your contact list has phone numbers in 10 different formats: β0901234567β, β84-90-123-4567β, β+84 90 123 4567β, β090 123 4567β. You need them all standardized for SMS marketing.
π Agentic Solution
A Phone Number Normalizer that converts all formats to your standard.
Key Features:
- Format Options: E.164 (+84901234567), National (0901234567), Spaced.
- Validation: Check if numbers are valid.
- Country Detection: Auto-detect or force country code.
βοΈ Phase 1: Commander (Quick Fix)
For quick formatting.
Prompt:
βI have an Excel
contacts.xlsxwith column βPhoneβ containing Vietnamese phone numbers in various formats. Write a Python script using phonenumbers library to:
- Parse: Assume Vietnam (+84) if no country code.
- Format: Standardize to
84xxxxxxxxx(no plus, no spaces).- Validate: Mark invalid numbers in a new column.
- Output: Save as
contacts_fixed.xlsx.Print count of valid/invalid numbers.β
Result: Clean phone list ready for bulk SMS.
ποΈ Phase 2: Architect (Permanent Tool)
For Sales/Marketing Teams.
Engineering Prompt:
**Role:** Python GUI Developer (PyQt6 Specialist)
**Task:** Create "Phone Number Formatter" Desktop App
**Objective:** A tool to standardize contact lists into E.164 or national formats.
**Tech Stack:**
* Language: Python 3.10+
* GUI Library: PyQt6 (Cross-platform)
* Library: phonenumbers
* Packaging: PyInstaller
**Functional Requirements:**
1. **UI Layout (PyQt6):**
* **Input:** Excel File Selector + Phone Column Dropdown.
* **Rules:** Default Country ISO (e.g., VN, US).
* **Format:** Output style (International +84, National 090, No-Space).
* **Action:** "Normalize" button.
2. **Core Logic:**
* Parse raw strings with `phonenumbers`.
* Validate existence/possibility.
* Format to target style.
* **Threading:** Process large lists in background.
3. **Deliverables:**
* `main.py`: Complete source code.
* `requirements.txt`: Dependencies.
* **Build Instructions:**
* Windows: `pyinstaller --onefile --noconsole main.py`
* macOS: `pyinstaller --windowed --noconsole main.py`
π§ Prompt Decoding
- phonenumbers library: Googleβs library that handles all international formats.
π οΈ Instructions
- Install:
pip install phonenumbers - Copy Prompt β Run.