Skip to content

A simple python script to convert a list of VCard entries into CSV files

License

Notifications You must be signed in to change notification settings

kerem-kaya/vcf2csv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vCard to CSV Converter

This Python script provides functionality to convert vCard (.vcf) files into CSV files, enabling easier management of contact data.

Features

  1. Fix vCard files: The script handles vCard files that split long lines across multiple lines with an equals sign (=). It combines these lines into a single line in a new vCard file.

  2. Convert vCard to CSV: The script reads the fixed vCard file and writes the contact information into a CSV file. The CSV file includes columns for the contact's name, email address, phone number, and any other fields present in the vCard file.

How to Run

  1. Make sure you have the required Python packages installed by running:
    pip install vobject quopri chardet
  2. Run the script in a Python environment:
    python vcf2csv.py

Limitations and Possible Improvements

  • The script is currently hardcoded to process specific files. Consider modifying it to accept user input or command-line arguments for the filenames.
  • The script uses the ISO-8859-9 encoding to handle Turkish characters. If the vCard file contains characters from different languages, you may need to adjust the encoding.
  • The script currently ignores photos in the vCard file. If your vCard files include photos and you want to process them, you will need to extend the script.
  • The script assumes that fields like name, email, and phone number exist in the vCard file and are of a certain type. If your vCard files have different fields or data types, you may need to adjust the script.

Generated by GPT-4

About

A simple python script to convert a list of VCard entries into CSV files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages