Metadata-Version: 2.4
Name: vcf2ldif
Version: 0.1.0
Summary: This tool is designed to convert *.vcf (vCard) contact files to *.ldif file, for further creation of shared phone books on LDAP server.
Author-email: Katulos <123748719+Katulos@users.noreply.github.com>
Maintainer-email: Katulos <123748719+Katulos@users.noreply.github.com>
License: MIT
Project-URL: Documentation, https://github.com/katulos/vcf2ldif/tree/master#readme
Project-URL: Home, https://github.com/katulos/vcf2ldif
Project-URL: Source, https://github.com/katulos/vcf2ldif
Project-URL: Tracker, https://github.com/katulos/vcf2ldif/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.1.8
Requires-Dist: phonenumbers>=9.0.17
Requires-Dist: vobject>=0.9.9
Dynamic: license-file

# vCard to ldif converter

![PyPI - Wheel](https://img.shields.io/pypi/wheel/vcf2ldif?logo=pypi)
![PyPI - Version](https://img.shields.io/pypi/v/vcf2ldif?logo=pypi)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/vcf2ldif?logo=pypi)
![PyPI - License](https://img.shields.io/pypi/l/vcf2ldif?logo=pypi)
![release](https://github.com/Katulos/vcf2ldif/actions/workflows/on_release.yml/badge.svg)
![develop](https://github.com/Katulos/vcf2ldif/actions/workflows/on_develop.yml/badge.svg?branch=develop)
[![codecov](https://codecov.io/gh/Katulos/vcf2ldif/graph/badge.svg?token=XG6VSRHY3B)](https://codecov.io/gh/Katulos/vcf2ldif)

This tool is designed to convert `*.vcf` (vCard) contact files to `*.ldif` file, for further creation of shared phone books on `LDAP` server.

## Installation
`pip install vcf2ldif`

## Usage
```
vcf2ldif \
    --input-file path/to/input_file.vcf \
    --root-dn ou=adressbook,dc=example,dc=com \
    --output-file path/to/output_file.ldif
```
You can import the resulting ldif file into your LDAP server (e.g. OpenLDAP) with the following command:
```
 ldapmodify -c -D "cn=admin,dc=example,dc=com" -W -f path/to/output_file.ldif
```
When converting, you can also format phone numbers according to the following standards:

* e164 (e.g.: `+18868886421`) by adding the option `--format-number e164`
* international (e.g.: `+1 886-888-6421`) by adding the option `--format-number international`
* national (e.g.: (e.g.: `(886) 888-6421`) by adding the option `--format-number national`

You can learn more by invoking the command with the `--help` option
```
vcf2ldif --help
```


