abcddb2vcard


Nameabcddb2vcard JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/relikd/abcddb2vcard
SummaryConvert AddressBook database (.abcddb) to Contacts VCards file (.vcf)
upload_time2024-01-27 16:08:52
maintainer
docs_urlNone
authorrelikd
requires_python>=3.5
licenseMIT
keywords abcddb abcd address book vcard contacts converter export backup
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # abcddb2vcard

This python script reads an AddressBook database file (`AddressBook-v22.abcddb`) and export its content to a vCard file (`.vcf`).

I created this script to automate my contacts backup procedure.
The output of this script should be exactly the same as dragging and dropping the “All Contacts” card.


### Usage

```sh
python3 abcddb2vcard.py backup/contacts_$(date +"%Y-%m-%d").vcf
```

> assuming db is located at "~/Library/Application Support/AddressBook/AddressBook-v22.abcddb"

#### Export into individual files

```sh
python3 abcddb2vcard.py outdir -s 'path/%{fullname}.vcf'
```

#### Extract contact images

```sh
python3 vcard2image.py AllContacts.vcf ./profile_pics/
```


### Supported data fields

`firstname`, `lastname`, `middlename`, `nameprefix`, `namesuffix`, `nickname`, `maidenname`, `phonetic_firstname`, `phonetic_middlename`, `phonetic_lastname`, `phonetic_organization`, `organization`, `department`, `jobtitle`, `birthday`, `[email]`, `[phone]`, `[address]`, `[socialprofile]`, `note`, `[url]`, `[xmpp-service]`, `image`, `iscompany`


### Limitations

The `image` field currently only supports JPG images.
I have honestly no idea where PNG images are stored.
For PNGs the database only stores a UUID instead of the file itself.
If you happen to know where I can find these, open an issue or pull request.


### Disclaimer

You should check the output for yourself before using it in a production environment.
I have tested the script with many arbitrary fields, however there may be some edge cases missing.
Feel free to create an issue for missing or wrong field values.

**Note:** The output of `diff` or `FileMerge.app` can be different to this output.
Apples does some weird transformations on vcf export that are not only unnecessary but in many cases break the re-import of the file.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/relikd/abcddb2vcard",
    "name": "abcddb2vcard",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.5",
    "maintainer_email": "",
    "keywords": "abcddb,abcd,address book,vcard,contacts,converter,export,backup",
    "author": "relikd",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/9f/fe/7835e1642830bcc0cc524f23c3b19e1f0ac873b8124464d1c0c881bc5518/abcddb2vcard-1.1.0.tar.gz",
    "platform": null,
    "description": "# abcddb2vcard\n\nThis python script reads an AddressBook database file (`AddressBook-v22.abcddb`) and export its content to a vCard file (`.vcf`).\n\nI created this script to automate my contacts backup procedure.\nThe output of this script should be exactly the same as dragging and dropping the \u201cAll Contacts\u201d card.\n\n\n### Usage\n\n```sh\npython3 abcddb2vcard.py backup/contacts_$(date +\"%Y-%m-%d\").vcf\n```\n\n> assuming db is located at \"~/Library/Application Support/AddressBook/AddressBook-v22.abcddb\"\n\n#### Export into individual files\n\n```sh\npython3 abcddb2vcard.py outdir -s 'path/%{fullname}.vcf'\n```\n\n#### Extract contact images\n\n```sh\npython3 vcard2image.py AllContacts.vcf ./profile_pics/\n```\n\n\n### Supported data fields\n\n`firstname`, `lastname`, `middlename`, `nameprefix`, `namesuffix`, `nickname`, `maidenname`, `phonetic_firstname`, `phonetic_middlename`, `phonetic_lastname`, `phonetic_organization`, `organization`, `department`, `jobtitle`, `birthday`, `[email]`, `[phone]`, `[address]`, `[socialprofile]`, `note`, `[url]`, `[xmpp-service]`, `image`, `iscompany`\n\n\n### Limitations\n\nThe `image` field currently only supports JPG images.\nI have honestly no idea where PNG images are stored.\nFor PNGs the database only stores a UUID instead of the file itself.\nIf you happen to know where I can find these, open an issue or pull request.\n\n\n### Disclaimer\n\nYou should check the output for yourself before using it in a production environment.\nI have tested the script with many arbitrary fields, however there may be some edge cases missing.\nFeel free to create an issue for missing or wrong field values.\n\n**Note:** The output of `diff` or `FileMerge.app` can be different to this output.\nApples does some weird transformations on vcf export that are not only unnecessary but in many cases break the re-import of the file.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Convert AddressBook database (.abcddb) to Contacts VCards file (.vcf)",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/relikd/abcddb2vcard"
    },
    "split_keywords": [
        "abcddb",
        "abcd",
        "address book",
        "vcard",
        "contacts",
        "converter",
        "export",
        "backup"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3f46df6d0c724f7b05be1be1afe1b8fce8c19a623d2a5b822b61154b93abb11d",
                "md5": "243e54ea61c7ae96a71af27efef54e1f",
                "sha256": "8097d5da149d3e65719362e44d7d1d12948b395e8768540c0ff303c1f1e57ab9"
            },
            "downloads": -1,
            "filename": "abcddb2vcard-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "243e54ea61c7ae96a71af27efef54e1f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.5",
            "size": 10867,
            "upload_time": "2024-01-27T16:08:50",
            "upload_time_iso_8601": "2024-01-27T16:08:50.629605Z",
            "url": "https://files.pythonhosted.org/packages/3f/46/df6d0c724f7b05be1be1afe1b8fce8c19a623d2a5b822b61154b93abb11d/abcddb2vcard-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9ffe7835e1642830bcc0cc524f23c3b19e1f0ac873b8124464d1c0c881bc5518",
                "md5": "a011f56f4b1ff53c222b6254e4473abf",
                "sha256": "0ae6643c0d2aa97e3baa9599472532429333e28972b7834b7b576aa1c5a01fa6"
            },
            "downloads": -1,
            "filename": "abcddb2vcard-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a011f56f4b1ff53c222b6254e4473abf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5",
            "size": 10044,
            "upload_time": "2024-01-27T16:08:52",
            "upload_time_iso_8601": "2024-01-27T16:08:52.929172Z",
            "url": "https://files.pythonhosted.org/packages/9f/fe/7835e1642830bcc0cc524f23c3b19e1f0ac873b8124464d1c0c881bc5518/abcddb2vcard-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-27 16:08:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "relikd",
    "github_project": "abcddb2vcard",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "abcddb2vcard"
}
        
Elapsed time: 0.18140s