lacspace-leads 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -36,17 +36,50 @@ npx lacspace-leads [type] [options]
36
36
  | `--city <text>` | City, e.g. `Kathmandu` |
37
37
  | `--area <text>` | Area / neighbourhood, e.g. `Baneshwor` |
38
38
  | `-q, --query <text>` | Raw query, used verbatim (overrides city/area/type) |
39
- | `--fields <list>` | Comma list: `name,category,rating,reviews,address,phone,website,plusCode,hours,mapsUrl` |
39
+ | `--fields <list>` | Columns: `name,category,rating,reviews,priceLevel,address,phone,website,email,facebook,instagram,whatsapp,plusCode,latitude,longitude,hours,mapsUrl` |
40
40
  | `-f, --format <fmt>` | `json` · `csv` · `xlsx` (default `json`) |
41
41
  | `-o, --out <file>` | Output file (default: a slug + date) |
42
+ | `--sheet <name>` | Excel sheet name (default `Leads`) |
42
43
  | `-n, --limit <n>` | Max listings to collect (default `60`) |
43
44
  | `--no-details` | Skip opening each listing — names + Maps URLs only, much faster |
44
45
  | `--delay <ms>` | Pause between listings (default `700`) |
46
+ | `--max-time <s>` | Stop collecting after n seconds |
45
47
  | `--headless` | Run the browser without a visible window |
46
48
  | `-y, --yes` | Skip prompts and the browser-open confirmation |
47
49
 
50
+ **Enrichment** (visits each business website — slower, opt-in):
51
+
52
+ | Option | Meaning |
53
+ | --- | --- |
54
+ | `--emails` | Also find an email from each website |
55
+ | `--socials` | Also find Facebook / Instagram / WhatsApp |
56
+ | `--enrich` | Both of the above |
57
+
58
+ **Filters** (drop leads that don't qualify):
59
+
60
+ | Option | Meaning |
61
+ | --- | --- |
62
+ | `--min-rating <n>` | Keep only ratings ≥ n |
63
+ | `--min-reviews <n>` | Keep only ≥ n reviews |
64
+ | `--has-phone` | Only leads with a phone |
65
+ | `--has-website` | Only leads with a website |
66
+ | `--has-email` | Only leads with an email (implies `--emails`) |
67
+ | `--dedupe <key>` | `website` · `phone` · `name` · `none` (default `website`) |
68
+
48
69
  Run with no arguments for an interactive walkthrough.
49
70
 
71
+ ## Convert anything (JSON ↔ CSV ↔ Excel)
72
+
73
+ A general converter is built in — it works on any tabular file, not just leads:
74
+
75
+ ```bash
76
+ npx lacspace-leads convert leads.json -f xlsx # JSON → Excel
77
+ npx lacspace-leads convert data.csv -o data.json # CSV → JSON
78
+ npx lacspace-leads convert sheet.xlsx -f csv # Excel → CSV
79
+ ```
80
+
81
+ Programmatically: `convertFile(input, { format, out, sheetName })`, or `readRows(file)` + `serializeRows(rows, format)`.
82
+
50
83
  ### Examples
51
84
 
52
85
  ```bash