Wait, I See Some People

Hello Everyone,

In my previous post, I wrote about how I started and what kind of preparations were made during the community bounding period, well now we are one week later after the actual GSoC coding period has started and the good news is I can now fetch the EteSync address book successfully and see the contacts in Evolution \o/.

Adding a .source file manually

The .source file contains data about each resource available (book, calendar, task list, memo list). It should be created automatically when adding a new resource. The base name of the key file (minus the .source file extension) becomes the ESource’s unique identity string, or “UID. All these are located at $HOME/.config/evolution/sources. you can find more details in the Gnome ESourceFileFormat documentation here.

So I need to add a .source file with the backend-name set as the created EteSync backend which I made. What I did was creating a local address book from Evolution, then I went to the sources location as mentioned above, looked at each file until I found the created source file will the name I entered when creating it, then I just set the name to Test EteSync and the backend-name to etesync referencing the backend which was made.

Here I’ve added manually a .source file pointing to the EteSync address book Backend. Just to test the implemented functions. So it appears in the evolution contacts and when opened it run these functions and try to retrieve the data. Here all the credentials are hard coded in the code as still I haven’t implemented a dialog to take the user’s data yet.

Fetching data from EteSync

Here I am testing the list_existing function, as this function retrieve all data from the server then show them in Evolution.

Test contacts in my EteSync account, using the the EteSync Web Client
Contacts Fetched from my EteSync account shown in Evolution

Modifying and deleting

I then tried to modify some data using again the EteSync web client. I modified Contact 2 (added a phone number) and deleted Contact 3. So I test the removing and modifying functionality.

After testing the list_existing function, I needed to test the get_changes function, this is different as it only retrieves the changes made since last login in Evolution using tags. Luckily EteSync support such function and providing sync_tags to changes made on the server. So I ran the test again, showed results as before. then made changes on my EteSync account and seeing the results on Evolution.

After modifying the data in my EteSync Account
Here the changes reflected on Evolution

What’s next

I plan on extending this to also retrieve EteSync Calenders from the account and there are some things that needs to be modified for the implemented functions. but as for now I happy with the results 🙂

Here is the link to the Repo if you want to take a look on the module code evolution-etesync

Well that’s it for now, but still that’s just the beginning :’D

2 thoughts on “Wait, I See Some People

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s