Rediscovering CardDAV

栏目: IT技术 · 发布时间: 4年前

内容简介:I can no longer sync iOS’ Contacts with my macOS Catalina’s Finder; the OS insists I’ve iCloud configured for Contacts which I do not. I’ve gone through all the steps Apple recommends, done the upgrades and the reboots, but there’s nothing doing. All the s

I can no longer sync iOS’ Contacts with my macOS Catalina’s Finder; the OS insists I’ve iCloud configured for Contacts which I do not. I’ve gone through all the steps Apple recommends, done the upgrades and the reboots, but there’s nothing doing. All the swearing and threatening of moving to a different operating system aren’t really helping. This started sometime after I wrote about setting up macOS to “dial” a number using a shell script , but it cannot be related.

I was spilling my sorrows on Christoph who simply said he avoids all those issues by using CardDAV . I slapped my forehead: I’ve been using CalDAV for years, for synchronizing two calendars across devices: my own calendar across two Macs, an iPad, and an iPhone, and the family calendar across the family’s devices. How could I have forgotten about CardDAV ?

Baïkal has served us well for many years (the modification timestamp on the configuration reads August 2013). Before looking at using it for CardDAV I thought I’d put it on my little FreeBSD system in a BastilleBSD jail. The calendar migration was easy enough but produced a litre or two of adrenalin when I watched one calendar after the other disappear from iCal. Anyway, I got the data imported and our small family was back in sync.

I then created a Baïkal address book for myself, set up macOS and an iPhone to use that, and created a pseudo person’s entry on the Mac and another on iOS, and experimented a bit with how long it takes either side to sync, etc. As soon as I was satisfied I copy/pasted all contacts from macOS’ internal address book to its CardDAV store. When my contacts showed up on the iPhone, I knew I was half in business. After an additional backup I cleared out all the local contacts on the Mac.

Android

I recently had to purchase a new old phone for testing OwnTracks on Android and settled for a used Samsung Galaxy S8, a device which vastly exceeded my expectations. A really nice piece of kit, if only it weren’t for Android … #halfkidding

I went the whole hog and decided to see how well I could work with the S8 and purchased a copy of DAVx5 which is a really good and well thought-out bit of software. There’s an Open Source but I decided to pay for the software – developers must live off something other than applause and fresh air.

Rediscovering CardDAV

I can create, edit, and delete contacts on the S8 and DAVx5 will synchronize them back via CardDAV to my server. Just the way it ought to be.

CLI FreeBSD / Linux

I mostly use Mutt as an email client which means I want to be able to integrate whichever solution I come up with with these tools. A quick search led me to install vdirsyncer which enables me to synchronize my CardDAV server with a local directory of VCard files on the file system. If I change any of these files the utility can then synchronize the changes back to the server. (Source code: vdirsyncer .) The program’s configuration file reminds me of OfflineIMAP’s and its operating principles are similar: I configure a local and a remote store which are kept in sync.

$ export REQUESTS_CA_BUNDLE=mensCA.crt
$ vdirsyncer discover
$ vdirsyncer sync

Now that I have a set of VCard files in a directory, I can use khard , an address book for the Unix command line, which reads, creates, and modifies these files, and which can also be integrated with other programs , suitable for my use with Mutt .

$ khard new ..
$ khard edit ..

$ vdirsyncer -v WARNING sync
$ khard list jolie
Address book: jpm-ab
Index    Name           Phone                          Email
1        Jolie, Jane    work, pref: +49 555 6302547    work, pref: jane.jolie@example.org

$ khard show jolie
Name: Jane Jolie
Full name: Jane Jolie
Address book: jpm-ab
General:
    Birthday: 1969-07-10
    Nickname: jj
Phone
    work, pref: +49 555 6302547
E-Mail
    work, pref: jane.jolie@example.org
Private:
    OwnTracks: owntracks/jjolie/s8
Miscellaneous
    UID: 9245cfe6-256f-40d3-aabf-b3bab4601273
    Webpage:
        - _$!<HomePage>!$_: jj.example.org
    Note: Actress

Khard is just an example; any program able to read or manipulate VCard files would be suitable.

Thunderbird

Thunderbird isn’t a client I use, but if I moved to FreeBSD or one of its desktop siblings, I likely would (in addition to Mutt), so I thought I’d do you the favor and see how well it supports CardDAV. It doesn’t really, because it lacks built-in support for CardDAV , but I found TBsync which, with Dav-4-TbSync , allow me to synchronize my CardDAV and CalDAV stores to it. I tested this on FreeBSD , and it seems to work well enough at a first glance.

Rediscovering CardDAV

I can edit address book entries on Thunderbird and thanks to a builtin scheduler can automatically (or on-demand) synchronize changes back to the server. TbSync is open source and there’s a short getting started page.

The Coronavirus isolation and my speaking more with friends inspired this blog post. Thank you, Christoph, for the heads up.


以上所述就是小编给大家介绍的《Rediscovering CardDAV》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

算法的陷阱

算法的陷阱

阿里尔•扎拉奇 (Ariel Ezrachi)、莫里斯•E. 斯图克 (Maurice E. Stucke) / 余潇 / 中信出版社 / 2018-5-1 / CNY 69.00

互联网的存在令追求物美价廉的消费者与来自世界各地的商品只有轻点几下鼠标的距离。这诚然是一个伟大的科技进步,但却也是一个发人深思的商业现象。本书中,作者扎拉奇与斯图克将引领我们对由应用程序支持的互联网商务做出更深入的检视。虽然从表面上看来,消费者确是互联网商务兴盛繁荣过程中的获益者,可精妙的算法与数据运算同样也改变了市场竞争的本质,并且这种改变也非总能带来积极意义。 首当其冲地,危机潜伏于计算......一起来看看 《算法的陷阱》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具