lucc / khard

Console vcard client
https://khard.readthedocs.io/en/latest/
GNU General Public License v3.0
595 stars 66 forks source link

Matching on Phone Numbers #301

Closed johannesk closed 2 years ago

johannesk commented 2 years ago

The Same phone number can be stored in many different formats:

Andoid tries to guess the area code and automatically inserts spaces into the number.

I am using khard with twinkle, similarly as described in https://github.com/scheibler/khard/pull/14 and khard stopped working as expected when updating to Ubuntu 22.04.

scheibler commented 2 years ago

I've improved the phone number matching a few days ago. If you are still interested, please check out khards develop branch and tell me, what you think.

Please use the field query syntax like that: khard phone phone_numbers:017612345678 For now the field is "phone_numbers" not "phone" but that might change before the next release.

You have to use the field query, so that khard strips everything from the contacts phone numbers and tries to match them with your input.

Disclaimer: The matching won't be perfect - too many vagaries, especially with the country code prefixes (+1 ect). But it should be improved a lot anyway.

johannesk commented 2 years ago

Thanks a lot. This does what I expected.