Ambergris
The goal of this project is to provide a simple solution to two-way sync appointments and contacts between Evolution and Kolab2 for offline work.
Here is a description of the ambergris directory structure:
ext/ contains native ruby Evolution interface code lib/ contains the ambergris library code in ruby misc/ basically contains old code that is not use anymore test/ contains unit tests for ambergris
Here is a description of the most important ruby files contained in ambergris:
evolution.rb ruby part of the evolution ruby interface
pim.rb general PIM classes to represent appointments and Contacts kolab.rb code to retrieve and store PIM data via IMAP on a kolab2 server wallet.rb simple account/password management sync.rb general syncing mechanism for PIM objects
Requirements
(Debian / Ubuntu packages)
ruby1.8
ruby1.8-dev
libtermios-ruby
libebook1.2-dev
libecal1.2-dev
libopenssl-ruby
evolution-data-server-dev
Installation
make
you can now copy the ambergris directory anywhere you like.
Usage
To initiate syncing between Evolution and your Kolab2 server run
ruby ambergris.rb profilename
where profilename can be chosen freely (it is used to associate login, password and the hostname). profiles will be stored in $HOME/.ambergris/profilename.
BUG: Please note that ambergris does not create the groupware folders (Calendar and Contacts) for you, so you either have to do that manually or run Kontact/Kolabwizard at least once on your Kolab2 account before you can use ambergris.
Optional arguments:
usage: ambergris [-s] [-c] [-p] [-courier] profile
-s activate automatic conflict resolution (always use server version) -c activate automatic conflict resolution (always use client version) -p calculate diffs and sync actions, but do not actually sync (pretend)
-courier enable courier compat mode
Sync Algorithm / General Ideas
Please note that this is just a rough outline of the general idea behind this project and this is subject to change. The ultimate source for information is always the source code ;)
Syncing between kolab and evolution (or between any two storages in the future) is always bi-directional. To detect changes, md5 hash sums of the contents of all PIM items are computed and stored. If a conflict is detected (i.e. the same PIM item has been edited on both sides since the last time the two storages were synced), the program will abort and display an error message indicating that manual intervention is necessary. Using the command line argument "-s" the user can speciafy that for all conflicts the server version of the conflicting PIM items is to be used. Alternatively one can use the "-c" option to instruct evolab to always use the client version.
License
This code has been developed at the Computer Architecture Group at Stuttgart University in 2005 and is distributed under the BSD license.
Credits
This project would not have been possible without the efforts of Tom Copeland, Hans Petter Jansson, Leon Breedt, Dave Craine and Rich Kilmer from the revolution project at http://revolution.rubyforge.net
On our side credits go to two Ruby experts at our Institute: Christian Zoellin and Stefan Holst, most of the actual programming work was done by Guenter Bartsch.
