-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please add support for SORT-AS property #290
Comments
Good idea @sciurius , pull requests for this would be welcome :) I myself do not have the time to implement this for you, currently. |
I might give it a try. Do you have some clues where to start? |
You probably want to look at the A single contact is represented by the classes in carddav_object.py, these are the kind of objects you are sorting. The Config class and the command line parser (in config.py and cli.py) decide by which field in the vcard to sort. I hope that help, you can always ask more (I have enough time to answer question or discuss designs, just not to do all the actual implementation). |
As a first step I've added "Sort as": to the template and code to fetch and store the SORT-AS parameter from/to the VCARD and yaml. This works, but if I modify only the SORT-AS, it is not detected as a modification and the entry is not updated. If I modify SORT-AS and anything else in the template the new SORT-AS value is correctly set and written to the VCARD. Any idea where to look? |
The code for that might be the yaml parsing function in the carddav class. |
The parsing happens in |
Ah... To detect if the vcard has changed |
Ok, it seems I've got it working. When sorting on last name I now use the SORT-AS if any. This leads to a couple of questions:
|
I think the RFC answers this question (exactly where you linked it):
I think you can copy the example from the RFC to a test case. |
To be able to properly sort (european) names it is necessary to be able to maintain the SORT-AS property of the name (N) field.
See https://datatracker.ietf.org/doc/html/rfc6350#page-21
The text was updated successfully, but these errors were encountered: