diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e4c6ed7..d2f7895 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -22,6 +22,9 @@ Note: Version 0.17 has some alpha releases but ultimately was never finalised. - Python 3.9 is now supported. - Our Debian/Ubuntu build scripts have been updated. New versions should be pushed to those repositories soon. +- 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 d8022d9..f6a6556 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -116,10 +116,16 @@ 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 - ``conflict_resolution`` parameter applies here as well. + This synchronizes the following properties: + + - color: ``http://apple.com/ns/ical/:calendar-color`` + - displayname: ``DAV:displayname`` + - description: ``CalDAV:calendar-description`` and ``CardDAV:addressbook-description`` + - order: ``http://apple.com/ns/ical/:calendar-order`` + + The ``conflict_resolution`` parameter applies for these properties too. .. _storage_config: diff --git a/docs/vdir.rst b/docs/vdir.rst index fe84ac0..a257310 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. +- Files called ``displayname`` and ``description`` contain a UTF-8 encoded label/ + description, 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. Writing to vdirs ================ diff --git a/vdirsyncer/storage/dav.py b/vdirsyncer/storage/dav.py index a3bcd65..b9e4055 100644 --- a/vdirsyncer/storage/dav.py +++ b/vdirsyncer/storage/dav.py @@ -719,6 +719,8 @@ class CalDAVStorage(DAVStorage): _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/"), } ) @@ -835,3 +837,13 @@ 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", + ), + } + )