From c5a3cb22d8ec9819d5e3ea0d312d00b3cd8905e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Baptiste=20H=C3=A9tier?= Date: Sun, 4 Oct 2026 08:27:31 +0200 Subject: [PATCH] Update description --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fc93c22..78c3d70 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# Marker generation + If you need to create a map on Wordpress with many markers, the following script should help you. The Python script will: @@ -80,8 +82,9 @@ A few practical details: The `permanent=True` setting in the script is intentional because the coordinates and Mapbox IDs are being saved into WordPress. If your Mapbox account does not support permanent geocoding, remove that setting only after confirming that your intended storage and use comply with Mapbox’s current terms. +# CSV split -I also needed a helper to split addresses as my initial file sometimes contrained two addresses on the same line. +I also needed a helper to split addresses as my initial file sometimes contained two addresses on the same line. The script will convent ```csv @@ -102,7 +105,7 @@ Title 3,Address 3 Run it like this: ```bash -python split_addresses.py addresses.csv addresses-normalized.csv +python split_addresses.py addresses.csv addresses-fixed.csv ``` The script pairs values by position: @@ -127,3 +130,5 @@ name,address ``` This assumes `/` is always your separator. If an address can legitimately contain a slash, such as `12 A/B Main Street`, that row would need a different delimiter or special handling. + +Note that the script also works if you have more than two columns (I also had phone numbers to split).