Sync the person DB with CarDAV server for easy bootstrapping #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements #17
Feature Idea - Sync the person DB with CarDAV server for easy bootstrapping #17
The purpose of this PR is to propose a way to retrieve
persons
from remote contact list (i.e. server such as cardav ones) so users won't have to create all of them manually.Technical note: I did not find any CarDAV library that's still being supported ATM for Python
Due to that, I decided to implement a very simple CarDAV reader as a Proof Of Concept, which as a matter of fact is compatible with Nextcloud (other providers not tested).
My todo-list for this PR:
Options: Number of changes? Just "Sync successfully performed/ failed?"
To implement this mechanism, I added an
external_id
to the Person's model class. It allows to map an ownphoto person to a person from a remote server. This way we know which Person was fetched from a remote server and we can update its name/picture accordingly over time.Main concerns
The current implementation does not allow for multiple fetchers being activated at the same time. If implementing this behavior is a necessity we would have to add a way to indicate from which server & strategy each Person was retrieved.
In my opinion it's not necessary ATM as Ownphotos needs to mature first (& more robust), before being highly functional
Feel free to react to the PR even though not everything is implemented, it may prevent going in the bad direction :)