Skip to content
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

Sync the person DB with CarDAV server for easy bootstrapping #18

Closed
wants to merge 4 commits into from

Conversation

arthurdk
Copy link
Contributor

@arthurdk arthurdk commented Jan 28, 2018

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:

  • Implement a PoC strategy for fetching persons (i.e. from Nextcloud in this case)
  • Add an API to trigger the person fetching mecanism
  • Improve the API to actually return something (& something useful)
    Options: Number of changes? Just "Sync successfully performed/ failed?"
  • Periodically fetch persons
  • Add option to trust certificate or not

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 :)

@guysoft
Copy link
Collaborator

guysoft commented Dec 25, 2018

@arthurdk Hey,
I am starting to sort this repo and see this neat feature you suggested, but it does not seem to merge in to the current tree. moreover we moved all development to the dev branch - are you still using this feature and want it merged for the next release? Or should I close this PR (I'd rather not, and we get your feature in, but I can't test it on my own).

@arthurdk
Copy link
Contributor Author

Hello @guysoft ,

I'm willing to push this further. I'll try to update the PR in the coming weeks. I noticed there is some nextcloud code in the repo now, also there are long running task and such. I need to check out the last changes & how to adapt this feature.

@guysoft
Copy link
Collaborator

guysoft commented May 22, 2019

@arthurdk Have you abandoned this?

@arthurdk
Copy link
Contributor Author

@arthurdk Have you abandoned this?

I hoped I would be able to free some time, but in the end I couldn't find it. I'll close this PR for now.

Still thinks this project could go big / could even be a service provided to people though.

@arthurdk arthurdk closed this Aug 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants