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).