Browse Source

Clean config template and provide readme

IamTheFij 3 years ago
  1. 37
  2. 48


@ -0,0 +1,37 @@
# Google Photo to VCard
A set of scripts to download profile images from Google and write them to vcards. Useful for completing the migration from Google to Nextcloud or ownCloud.
## Setup
To run, you first need to set up a few config files
### Google Credentials
To get people info from your Google account, you first need to create an application from the Google Cloud Console and then download your credentials.
1. Go to and create a new project
1. Add access to the Google People API (Library > Search for People > Enable)
1. Create a new set of credentials (Credentials > Create credentials > OAuth client ID > other (Give it a name) > Create)
1. Click the download icon next to the new credentials and save to this project directory as `client_secret.json`
### Vdirsyncer Config
This is the config that will allow you to sync to and from your remote VCard directory. The following instructions are for Nextcloud, but you can refer to the [official documentation]( for more instructions.
Edit ./vdirsyncer.conf.example adding your server url, username, and password in the `[storage my_contacts_remote]` section.
## Running
Once your configuration is set up, you should be able to download and add photos to all your contacts by executing:
make add-photos
It's then worth taking a look and making sure that the results are as you expected. When you're happy with them, you can push the contacts back up to your remote server by running:
make sync-contacts


@ -1,23 +1,17 @@
# An example configuration for vdirsyncer.
# Move it to ~/.vdirsyncer/config or ~/.config/vdirsyncer/config and edit it.
# Run `vdirsyncer --help` for CLI usage.
# Optional parameters are commented out.
# This file doesn't document all available parameters, see
# for the rest of them.
# A folder where vdirsyncer can store some metadata about each pair.
status_path = "~/.vdirsyncer/status/"
status_path = "./build/vdirsyncer/status/"
[pair bob_contacts]
# A `[pair <name>]` block defines two storages `a` and `b` that should be
# synchronized. The definition of these storages follows in `[storage <name>]`
# blocks. This is similar to accounts in OfflineIMAP.
a = "bob_contacts_local"
b = "bob_contacts_remote"
[pair my_contacts]
a = "my_contacts_local"
b = "my_contacts_remote"
# Synchronize all collections that can be found.
# You need to run `vdirsyncer discover` if new calendars/addressbooks are added
@ -34,37 +28,15 @@ metadata = ["displayname"]
# `"b wins"` - assume b's items to be more up-to-date
#conflict_resolution = null
[storage bob_contacts_local]
[storage my_contacts_local]
# A storage references actual data on a remote server or on the local disk.
# Similar to repositories in OfflineIMAP.
type = "filesystem"
path = "~/.contacts/"
path = "./build/contacts/"
fileext = ".vcf"
[storage bob_contacts_remote]
[storage my_contacts_remote]
type = "carddav"
url = ""
#username =
# The password can also be fetched from the system password storage, netrc or a
# custom command. See
#password =
[pair bob_calendar]
a = "bob_calendar_local"
b = "bob_calendar_remote"
collections = ["from a", "from b"]
# Calendars also have a color property
metadata = ["displayname", "color"]
[storage bob_calendar_local]
type = "filesystem"
path = "~/.calendars/"
fileext = ".ics"
[storage bob_calendar_remote]
type = "caldav"
url = ""
#username =
#password =
url = ""
username = "my_user"
password = "my_pass"