Discussion:
[Patch] Improved sync with Evolution
merKur
2008-07-04 02:38:05 UTC
Permalink
Hi there,

While trying to use synce-sync-engine v0.11.1-1 with Evolution
v2.22.2-1.1 (on a Debian SID system) and a Samsung SGH-i600 (European
version of the BlackJack), I encountered some issues.

Attached are some patches that resolve the following issues:
EVO->WM5:
- Note not being sync'ed,
At least on my phone, the note should be in <C1:Body>, not in <C1:Rtf>
- If both "Business phone" and "Business fax" were defined, "Business
phone" ended up in "Work Phone 2"
This was due to usage of position() in the XSLT, while some elements
were skipped. Instead filter by Type=WORK & Type=VOICE.
- PO Box was not being sync'ed
It seems WM5 has no 'PostalBox' field. I appended this info in the
'Street' field.
- Street in Evolution can be multi-line, but only 1st line was sync'ed.
The rest of the lines appear in the 'ExtendedAddress' field.
I appended this to the 'Street' field.

WM5->EVO:
- Note was not being sync'ed,
 At least on my phone, the note should be in <C1:Body>, not in
<C1:Rtf>
- Photo was not being sync'ed.
I added an 'Encoding' attribute which solves this.
- Phone updates were messed up.
Added 'VOICE' Type attribute to the relevant ones.
- Timezone conversion problems.
See my thread "SynCE AirSync->VCal Timezone conversion bug" in
synce-users dated 1-Jul-2008. Patch attached here as well.

Open issues:
- Note and Photo are sent from AirSync only when they are modified in
the device, and not on every sync.
This might be solved by OpenSync merge (IIRC on branch v0.30).
- Spouse, Manager, and IM fields (IM-MSN, etc.) are not updated in Evo.
The problem might be in OpenSync (I'm using 0.22).
- Anniversary and Birthday are converted differently, and are not
updated in Evo.
 The problem might be in OpenSync (I'm using 0.22) as well.
- email type info (Work, Home, Other) is lost on sync.
- email/phones slot ordering is messed up on sync.

I'll appreciate inclusion of these patches on future versions.

Best Regards,
merKur
Dr J A Gow
2008-07-05 19:37:15 UTC
Permalink
Post by merKur
Hi there,
All in SVN now, except the Rtf one (which needs further investigation).

John.
Dr J A Gow
2008-07-05 20:53:47 UTC
Permalink
Post by merKur
Hi there,
While trying to use synce-sync-engine v0.11.1-1 with Evolution
v2.22.2-1.1 (on a Debian SID system) and a Samsung SGH-i600 (European
version of the BlackJack), I encountered some issues.
- Note not being sync'ed,
At least on my phone, the note should be in <C1:Body>, not in <C1:Rtf>
- If both "Business phone" and "Business fax" were defined, "Business
phone" ended up in "Work Phone 2"
This was due to usage of position() in the XSLT, while some elements
were skipped. Instead filter by Type=WORK & Type=VOICE.
- PO Box was not being sync'ed
It seems WM5 has no 'PostalBox' field. I appended this info in the
'Street' field.
- Street in Evolution can be multi-line, but only 1st line was sync'ed.
The rest of the lines appear in the 'ExtendedAddress' field.
I appended this to the 'Street' field.
Nice additions. Thanks.
Post by merKur
- Note was not being sync'ed,
At least on my phone, the note should be in <C1:Body>, not in
<C1:Rtf>
Not convinced about this one. My phone exports them in <C1:Rtf>. I'll
leave this one out until more info is available from different phone
types.
Post by merKur
- Photo was not being sync'ed.
I added an 'Encoding' attribute which solves this.
- Phone updates were messed up.
Added 'VOICE' Type attribute to the relevant ones.
- Timezone conversion problems.
See my thread "SynCE AirSync->VCal Timezone conversion bug" in
synce-users dated 1-Jul-2008. Patch attached here as well.
These are all OK and I'll commit them shortly.


John.
merKur
2008-07-05 21:28:44 UTC
Permalink
Post by Dr J A Gow
Post by merKur
Hi there,
While trying to use synce-sync-engine v0.11.1-1 with Evolution
v2.22.2-1.1 (on a Debian SID system) and a Samsung SGH-i600 (European
version of the BlackJack), I encountered some issues.
[snip]
Post by Dr J A Gow
Nice additions. Thanks.
There are some more on the way... ;)
Post by Dr J A Gow
Post by merKur
- Note was not being sync'ed,
At least on my phone, the note should be in <C1:Body>, not in
<C1:Rtf>
Not convinced about this one. My phone exports them in <C1:Rtf>. I'll
leave this one out until more info is available from different phone
types.
I see mine exports some blurb on Rtf as well, but have no idea how to
decode it...

We might be able to tweak the xslt to pick body if there, and fallback
to Rtf. What do you think ?
Otherwise we might need a [yet another] config flag... Yuck.
Post by Dr J A Gow
These are all OK and I'll commit them shortly.
Thanks !


merKur
Dr J A Gow
2008-07-08 19:43:56 UTC
Permalink
Post by merKur
Post by Dr J A Gow
Post by merKur
Hi there,
While trying to use synce-sync-engine v0.11.1-1 with Evolution
v2.22.2-1.1 (on a Debian SID system) and a Samsung SGH-i600 (European
version of the BlackJack), I encountered some issues.
[snip]
Post by Dr J A Gow
Nice additions. Thanks.
There are some more on the way... ;)
Super! Send 'em in when they are ready, and I'll have a look.
Post by merKur
Post by Dr J A Gow
Post by merKur
- Note was not being sync'ed,
At least on my phone, the note should be in <C1:Body>, not in
<C1:Rtf>
Not convinced about this one. My phone exports them in <C1:Rtf>. I'll
leave this one out until more info is available from different phone
types.
I see mine exports some blurb on Rtf as well, but have no idea how to
decode it...
It's base64 encoded compressed RTF. The base64 codec used is just the
standard python one. I wrote a library, 'librtfcomp' to handle
compressed RTF in both directions, and there are a set of python
bindings provided with the library. Follow the XSLT extension function
(the one your patch tried to remove :-) ) to learn more about how I
implemented this.
Post by merKur
We might be able to tweak the xslt to pick body if there, and fallback
to Rtf. What do you think ?
This might be a possibility. Let me see if I can get both WM5 and WM6 at
my end to actually emit a 'Body' field! Once I can do this, we should
have a clearer picture as to how Airsync handles the two fields.
Post by merKur
Otherwise we might need a [yet another] config flag... Yuck.
The core problem is if data is stored in both <Body/> and <Rtf/> - how
do we combine and separate (if, indeed, we need to).


John.
merKur
2008-07-08 23:11:00 UTC
Permalink
[snip]
Post by Dr J A Gow
Post by merKur
There are some more on the way... ;)
Super! Send 'em in when they are ready, and I'll have a look.
Will do...
Though, I think I'm hitting some OpenSync 0.22 bugs now...
I'll probably get back to it next week.
Post by Dr J A Gow
It's base64 encoded compressed RTF. The base64 codec used is just the
standard python one. I wrote a library, 'librtfcomp' to handle
compressed RTF in both directions, and there are a set of python
bindings provided with the library. Follow the XSLT extension function
(the one your patch tried to remove :-) ) to learn more about how I
implemented this.
I wonder why Opensync/evolution were not accepting those...
Post by Dr J A Gow
Post by merKur
We might be able to tweak the xslt to pick body if there, and fallback
to Rtf. What do you think ?
This might be a possibility. Let me see if I can get both WM5 and WM6 at
my end to actually emit a 'Body' field! Once I can do this, we should
have a clearer picture as to how Airsync handles the two fields.
Wonderful,
Post by Dr J A Gow
Post by merKur
Otherwise we might need a [yet another] config flag... Yuck.
The core problem is if data is stored in both <Body/> and <Rtf/> - how
do we combine and separate (if, indeed, we need to).
I'm not sure we'll have to combine/separate those.
I guess devices will use one or the other.

Cheers,

merKur

Loading...