diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 24419ca..42541e6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,6 +9,10 @@ Package maintainers and users who have to manually update their installation may want to subscribe to `GitHub's tag feed `_. +- Add "description" and "order" as metadata. These fetch the CalDAV: + calendar-description, CardDAV:addressbook-description and apple-ns:calendar-order + properties. + Version 0.16.8 ============== diff --git a/docs/config.rst b/docs/config.rst index 425f740..9d68d54 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -116,9 +116,12 @@ Pair Section - ``metadata``: Metadata keys that should be synchronized when ``vdirsyncer metasync`` is executed. Example:: - metadata = ["color", "displayname"] + metadata = ["color", "displayname", "description", "order"] - This synchronizes the ``color`` and the ``displayname`` properties. The + This synchronizes the ``http://apple.com/ns/ical/:calendar-color``, + ``DAV:displayname``, ``CalDAV:calendar-description``, + ``CardDAV:addressbook-description`` and + ``http://apple.com/ns/ical/:calendar-order`` properties. The ``conflict_resolution`` parameter applies here as well. .. _storage_config: diff --git a/docs/vdir.rst b/docs/vdir.rst index 37223ef..942bfe9 100644 --- a/docs/vdir.rst +++ b/docs/vdir.rst @@ -56,8 +56,11 @@ have any file extensions. known from CSS, for example) are allowed. The prefixing ``#`` must be present. -- A file called ``displayname`` contains a UTF-8 encoded label that may be used - to represent the vdir in UIs. +- A file called ``order`` inside the vdir includes the relative order + of the calendar, a property that is only relevant in UI design. + +- Files called ``displayname`` and ``description`` contain a UTF-8 encoded label/ + description, that may be used to represent the vdir in UIs. Writing to vdirs ================ diff --git a/vdirsyncer/storage/dav.py b/vdirsyncer/storage/dav.py index a7e2422..12bee83 100644 --- a/vdirsyncer/storage/dav.py +++ b/vdirsyncer/storage/dav.py @@ -728,6 +728,8 @@ class CalDAVStorage(DAVStorage): _property_table = dict(DAVStorage._property_table) _property_table.update({ 'color': ('calendar-color', 'http://apple.com/ns/ical/'), + 'description': ('calendar-description', 'urn:ietf:params:xml:ns:caldav'), + 'order': ('calendar-order', 'http://apple.com/ns/ical/'), }) def __init__(self, start_date=None, end_date=None, @@ -843,3 +845,8 @@ class CardDAVStorage(DAVStorage): ''' get_multi_data_query = '{urn:ietf:params:xml:ns:carddav}address-data' + + _property_table = dict(DAVStorage._property_table) + _property_table.update({ + 'description': ('addressbook-description', 'urn:ietf:params:xml:ns:carddav'), + })