Convert the addresses contained in a VCARD file into waypoints in a GPX file.
-
This tool takes as input a
VCFfile containing the contacts'VCARDs. -
It generates as output a
GPXfile withwaypointsnamed with the contact names. -
To perform the conversion, this script :
- first uses GPS coordinates stored in the vCard
- then Mapbox to convert the address stored in the vCard into GPS coordinates (if no coordinates found in the vCard)
- then Nominatim OpenStreetMap (if the Mapbox conversion fails or if token was not provided)
-
To obtain the Mapbox token, go to https://console.mapbox.com/.
-
I have only tested this script with addresses exported from
Framagenda.
First install Python3. Then install dependencies :
python -m ensurepip
pip install -r requirements.txtpython3 vcf2gpx.py source.vcf destination.gpx [MAPBOX_TOKEN] [--debug]| Parameters | Description |
|---|---|
vcf2gpx.py |
Python script |
source.vcf |
Input file in VCF format |
destination.gpx |
Output file in GPX format |
pk.ey...jUA |
Mapbox token: optional. If not provided, conversion will use Nominatim only. |
--debug |
Enables debug mode (optional parameter) |