Genesis – A Graphical Frontend for SyncEvolution
Sunday, 2. December 2007, 13:44:26
I have recently started to use SyncEvolution. This is a commandline driven SyncML client that allows you to synchronize your Evolution data (appointments, addresses, tasks) with a SyncML server like Scheduleworld. I like this concept, because it is based on open standards and free software, and I think this is a better approach than the proprientary client APIs that, for example, Google provides.
Now it's relatively easy to set up and use syncevolution. You have to edit some config files, but they are well documented and easy to understand. And you have to execute a simple command to perform the actual synchronization. Plus, you get detailed information about the actual process. But I mostly don't need that much information (except in the case of failure), and I don't want to open up a terminal every time I sync my data. So I decided to write a simple, small GUI in PyGTK.
The result of this decision were some hours of coding with ups and downs (python-notify really could need some documentation, and it definitely has its rough edges) and a tiny PyGTK app called Genesis that sits in the notification area and allows you to sync with one single mouseclick. Here are some impressions of what it looks like:
This is the tray icon and the menu. You can start the sync either by choosing the menu entry or simply by clicking on the tray icon.

When the synchronization was successful, the performed transactions are shown in a popup bubble. (During the synchronization, the arrows spin around the globe to give you some visual feedback about the transaction being performed in the backgroud).

When a transaction failed, you have the possibility to take a look at the error log. (To prevent unneccessary failures due to a broken internet connection (e.g., when you are on WLAN and lost the connetion), Genesis asks NetworkManager for a connection before actually calling syncevolution.)

The error log is then displayed in a separate window.

For now, the most important functions are in place and working (at least for me). You don't even have to install anything, just execute genesis.py (or add it to your session). But of course I'd like to get your feedback, suggestions, bug reports – and of course patches. You can get the files from the launchpad project page.
P.S.: Maybe it would be a good next step to add a configuration dialog, so that you don't have to touch the config files manually. But since this definitely would be a bigger task, and since it now works for me, I'm not too keen on adding that. So if you are willing to contribute this, grab the code and go ahead... :-)
P.P.S.: You might wonder why I choose this name. The first reason is that I don't like the obvious choices like "PySyncEvolution" or "SyncEvolutionGTK". Second, religious names seem to be quite famous among GNOME developers (think of epiphany or revelation), and Genesis is somewhat related to Evolution (as its counterpart, if you want). Third, it starts with G, which isn't bad for a GNOME application... :-)









Anonymous # 2. December 2007, 18:07
Thanks a lot for this, I really like the result and just wrote about it . You asked for it, so here are my comments:
a configuration editor/wizard - you intentionally did not add one because you found creating a configuration manually easy, but other users of SyncEvolution had problems with that
selecting "Source" vs. "Server" - the GUI allows you to choose against which server to synchronize, but the corresponding context menu entry is called Select Source
unintentional keyboard shortcuts - some of my server configurations contain an underscore (e.g. scheduleworld_1), so in said "Select Source" menu they have "1" as shortcut
freedo # 2. December 2007, 20:33
I agree that a configuration editor would be nice to have. I have it on my agenda, but I can't promise when I will find the time to implement it.
For the other two points, those were easy ones and are now fixed in trunk.
Anonymous # 2. December 2007, 23:40
I love it!
Of course, this is a misuse of the notification area for an applet that doesn't notify you of anything. A real applet would be preferrable. Or an evolution plugin to integrate to its GUI *blink* :)
Speaking of notifications, is it possible to find out whether or not the client and server are currently in sync and to display a corresponding icon?
Thanks for this nice utility! I've been using syncevolution for quite a while, and while (as you say) it's not difficult, this is a very welcome addition on my desktop.
freedo # 3. December 2007, 16:22
I thought about the misuse thing, and I'm still not really sure about it. Sure, it were practical considerations in first place (a StatusIcon is quite easy to handle, and I didn't want to dive into libnotify and GNOME applets at once), and I had converting into a panel applet on my TODO list. But I'm not really sure, since the icon does in fact notify you:
* about a sync taking place (animated icon)
* about the results of a sync (popup bubble)
So its informational value is, I think, no less that that of, say, the NetworManager icon.
And in deed, there might be more information that onc could show with the icon:
* watching evolution files and show when they changed
* report about automatic syncs (if one should decide to implement them)
I think you idea to look if syncing is needed is quite nice, and I thought about it, too. But I'm not really sure if it will add much benefit in the end, since I quite reliably know when I modified my calendar... ;-)
For now, I added i18n support and a German translation. If anyone wants to add a translation, just take the .pot from the po/ directory and send me your .po files. And if there are any features that you consider more valuable than me, don't hesitate to send me your patches... ;-)
Anonymous # 4. December 2007, 23:37
Finally, someone has actually done smth for syncevolution. I haven't even downloaded the GUI yet, but that fact that you even started smth like that its amazing!
Anonymous # 4. December 2007, 23:58
If its possible, could you give the direct link to the files? I cant seem to find it in launchpad.
freedo # 5. December 2007, 12:00
https://launchpad.net/genesis-sync/+download
There still isn't any installer or distribution package, not even a setup.py, so you have to execute src/genesis.py directly.
Anonymous # 18. February 2008, 00:18
I'm really looking forward to this. However, I'm tripping up at the first hurdle.
when I run it (using pything genesis.py) I get the following error message in the terminal:
Traceback (most recent call last):
File "genesis.py", line 36, in
import settings
File "/home/michael/genesis-0.2.1/src/settings.py", line 27, in
import evolution
ImportError: No module named evolution
I am running on Ubuntu 7.10, with the appropriate version of syncevolution installed via synaptic, and the source for genesis downloaded from the launchpad link.
Anyone have any ideas why I am getting this message?
freedo # 18. February 2008, 12:50
Once there's a deb package, dependencies won't be a problem any more, I hope. (If anyone wants to guide me through the packaging process, I'd be very thankful.)
Anonymous # 5. April 2008, 16:50
I am getting a stack trace when clicking the "Add server..." menu but I don't think this is a missing dependency.
Running Fedora8 with the following packages:
python-2.5.1-15.fc8
pygtk2-2.12.0-2.fc8
notify-python-0.1.1-2.fc8
pyxdg-0.15-5.fc8.1
evolution-python-0.0.4-2.fc8
python-configobj-4.4.0-2.fc8
syncevolution-0.7-2.fc8
Traceback (most recent call last):
File "./genesis.py", line 396, in sync
self.add_server(widget)
File "./genesis.py", line 304, in add_server
server_assistant = settings.ServerAssistant(caller=self)
File "/tmp/genesis-0.2.1/src/settings.py", line 228, in __init__
addressbooks = evolution.list_addressbooks()
AttributeError: 'module' object has no attribute 'list_addressbooks'
freedo # 6. April 2008, 00:31
Currently I'm quite busy moving to a new location and starting a new job, but once I find the time I'll finish the currently stalled work on Genesis. This will involve a proper install script, and hopefully support for syncevolution's new config layout. And then I'll have a look into the python-evolution stuff, since this might become relevant for me too, when I upgrade to Ubuntu Hardy.
Anonymous # 7. April 2008, 06:13
I have started working on a build system for genesis and I have a fix for the evolution-python-0.0.4 issue. However I am now facing an API change in syncevolution (which actually requires a better understanding of the application logic than I have). As you can see below it seems the templates are not available anymore to syncevolution starting in 0.7; Just so you get a bit of the background reason that makes me want to use those versions. I am trying to synchronize an iPhone using syncevolution and that is only supported with 0.7
http://www.estamos.de/blog/2007/12/29/redesign-of-syncevolution-config-handling/
Here is the stacktrace I get:
Traceback (most recent call last):
File "/usr/share/genesis/settings.py", line 261, in on_prepare
self.config = ServerConfig(name, template)
File "/usr/share/genesis/settings.py", line 97, in __init__
config_path = os.path.join(self.template_dir, self.template,
AttributeError: 'ServerConfig' object has no attribute 'template_dir'
Traceback (most recent call last):
File "./genesis.py", line 437, in
gtk.main()
I will forward what I have done so far...
Anonymous # 7. April 2008, 07:59
Not sure how to get a hold of you. I also tried to open a bug on launchpad but I am getting:
"Genesis Sync does not use Launchpad as its bug tracker."
In the mean time, please feel free to grab the patch at:
ftp://ftp.zouric.com/public/genesis-build.patch
freedo # 7. April 2008, 21:34
Unfortunately, I don't have too much free time to work on Genesis for the next month or so. But I'll have a look into your patch and the problem you encountered.
Currently, I'm planing to release a new version of Genesis with an autostart feature. This requires a properly Genesis, so I was working on a proper install script anyway. So you effort comes just in time. But mine was a distutils based setup.py, not autotools based. I don't now about each to say which suites better, so I might as well go with your build system.
The next step would then be a new development branch incorporating the changes coming with syncevolution 0.8. But the current branch needs some love before I would start that.
By the way, the bugtracker on Launchpad is now enabled for Genesis. I just didn't realise that it wasn't by default. Feel free to use it.
Anonymous # 30. April 2008, 10:17
test
Anonymous # 30. April 2008, 10:25
Hi
Sorry about the test message, I hope you can remove it but I tried to post something the other night and only got error messages so wanted to check it was working first.
Had real problems getting genesis to work under Ubuntu 7.10 but *.04 upgrade seems to have sorted it out so it is now working. Thanks for the hard work it is a useful addition to my status bar.
The ability to amend the config files via a GUI would be really useful as I have had to manually amend them to move from two-way to refresh-from-client when a new device messes up the SW calendar or contacts but frankly, what you have done is great so any improvement will be a bonus.
Is there any way to monitor the synchronisation as it happens as (much as I have faith in it) it takes a long time and some feedback into a terminal or one of your bubbles would give new users increased confidence.
Keep up the good work and thanks again.
Geoff
Anonymous # 30. April 2008, 13:23
I am not sure if this is documented elsewhere but I accidentally partially solved my problem of changing the configuration files to enable different types of synchronisation.
In the .sync4j folder, under the evolution folder, I reproduced the scheduleworld file structure three times and renamed the top folders scheduleworld refresh-from-client, scheduleworld slow and scheduleworld two-way
I then edited the config.txt source files for each source under each of the three structures to sync in the way the top folder was named (sync= two-way; sync= slow; sync = refresh-from-client).
When I restarted genesis and selected server, it listed each of the scheduleworld xxxxxxx folders. By selecting the appropriate one, it syncs according to the config files contained. I can now manage the different synchronisations on the same server through the applet.
It is important to leave all other data in the config files the same!
Geoff
Anonymous # 22. January 2009, 21:27
I get this error:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/Genesis/genesis.py", line 420, in build_menu
self.build_server_menu()
File "/usr/lib/python2.6/site-packages/Genesis/genesis.py", line 476, in build_server_menu
To set up synchronization, please click the icon.'''))
File "/usr/lib/python2.6/site-packages/Genesis/genesis.py", line 580, in notify
self.notification.show()
glib.GError: The name org.freedesktop.Notifications was not provided by any .service files
What is wrong??
freedo # 22. January 2009, 22:03
If you can't solve the problem that way, you can use the Answers section on Launchpad for further assistance: https://answers.launchpad.net/genesis-sync