Add example for metadata sync (#440)

Fix #422
This commit is contained in:
Markus Unterwaditzer 2016-04-28 00:55:35 +02:00
parent b68bb78bfc
commit d06dd4ca85

View file

@ -158,3 +158,34 @@ discover`` again to re-fetch this list instead.
.. [2] Because collections are added rarely, and checking for this case before
every synchronization isn't worth the overhead.
Metadata synchronization
------------------------
Besides items, vdirsyncer can also synchronize metadata like the addressbook's
or calendar's "human-friendly" name (internally called "displayname") or the
color associated with a calendar. For the purpose of explaining this feature,
let's switch to a different base example. This time we'll synchronize calendars::
[pair my_calendars]
a = my_calendars_local
b = my_calendars_remote
collections = ["from a", "from b"]
metadata = ["color"]
[storage my_calendars_local]
type = filesystem
path = ~/.calendars/
fileext = .ics
[storage my_calendars_remote]
type = caldav
url = https://owncloud.example.com/remote.php/caldav/
username = bob
password = asdf
Run ``vdirsyncer discover`` for discovery. Then you can use ``vdirsyncer
metasync`` to synchronize the ``color`` property between your local calendars
in ``~/.calendars/`` and your ownCloud. Locally the color is just represented
as a file called ``color`` within the calendar folder.