Skip to content

bben92/vcftogpx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VCF 2 GPX

Objective

Convert the addresses contained in a VCARD file into waypoints in a GPX file.

How it Works

  • This tool takes as input a VCF file containing the contacts' VCARDs.

  • It generates as output a GPX file with waypoints named 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.

Installation

First install Python3. Then install dependencies :

python -m ensurepip
pip install -r requirements.txt

Example Usage

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

About

Script to convert the addresses contained in a vcard file into waypoints in a GPX file

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages