Re: Import contacts qtopia
Did you try LD_LIBRARY_PATH=/opt/Qtopia/lib /opt/Qtopia/bin/addressbook /home/root/addressbook.vcf as mentioned in the wiki? http://wiki.openmoko.org/wiki/Import_Vcf_Contacts#Import_for_ASU.2FQtopia Regards, Anni On Sat, Aug 16, 2008 at 4:03 PM, julien cubizolles <[EMAIL PROTECTED]> wrote: > > Le lundi 21 juillet 2008 à 19:46 +0200, Holger Freyther a écrit : > > > 1.) copy the the file vcf to the device > > 2.) /opt/Qtopia/bin/addressbook /path/to/vcf-file (will get deleted) > > 3.) GUI makes some stuff... asks you to import.. > > 4.) You might need to restart afterwards > > I just tried running /opt/Qtopia/bin/addressbook from the Freerunner's > terminal but it complains with many messages like > > /opt/Qtopia/bin/addressbook : /usr/lib/stdc++.so.6: no version > information available (required by /opt/Qtopia/lib/libQtCore.so.4) > > finishing with: > > QCoreApplication::postEvent: Unexpected null receiver. > > I'm using the standard image, 4.3.2-080808. > > Thanks for your help. > > Julien. > > > ___ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts qtopia
Le lundi 21 juillet 2008 à 19:46 +0200, Holger Freyther a écrit : > 1.) copy the the file vcf to the device > 2.) /opt/Qtopia/bin/addressbook /path/to/vcf-file (will get deleted) > 3.) GUI makes some stuff... asks you to import.. > 4.) You might need to restart afterwards I just tried running /opt/Qtopia/bin/addressbook from the Freerunner's terminal but it complains with many messages like /opt/Qtopia/bin/addressbook : /usr/lib/stdc++.so.6: no version information available (required by /opt/Qtopia/lib/libQtCore.so.4) finishing with: QCoreApplication::postEvent: Unexpected null receiver. I'm using the standard image, 4.3.2-080808. Thanks for your help. Julien. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts qtopia
On Mon, Jul 21, 2008 at 07:46:42PM +0200, Holger Freyther wrote: > On Friday 18 July 2008 20:32:50 Ole Kliemann wrote: > > Not sure whether I missed something. I am looking for a way to import > > VCF into qtopia. I could only find the discussion on this list, which, as > > far as I understand, covers importing VCF to the GTK addressbook only. > > > > There is also a howto on importing Blackberry contacts to qtopia. It > > could be helpful if one were able to convert VCF to sqlite. > > > > Any hints appreciated. > > > Unofficial answer (as this is not tested by us... it is the code from > trolltech as is so is likely to have issues) > > 1.) copy the the file vcf to the device > 2.) /opt/Qtopia/bin/addressbook /path/to/vcf-file (will get deleted) > 3.) GUI makes some stuff... asks you to import.. > 4.) You might need to restart afterwards This works fine. Thanks! :) Ole pgprDVwWktI4D.pgp Description: PGP signature ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts qtopia
Holger Freyther wrote: > On Monday 21 July 2008 22:07:30 Kalle Happonen wrote: > > >> Hmm I didn't get this to work. I didn't have a terminal on the phone, so >> I ran it with X forwarding, i.e. the windows opened on my laptop. I >> think I would have gotten them imported (vCard version 2.1, not 3 for >> some reason), but I found no way of confirmin the "Would you like to >> import" dialog. I didn't find a way to tell addressbook to autoimport, >> the documentation is a bit skimpy.. >> > > well, Qtopia has this concept of a soft menu... So far only the software on > the neo knows how to treat the properties set on the Qtopia windows to show > the buttons. > So set DISPLAY=:0, show the addressbook on the screen of the neo, get a > softmenu and click the buttons there.. > > z. > Ah thanks, I feel like an idiot, I could have come up with the DISPLAY idea myself. Well luckily there seems to be sharper brains out here. :) Kalle ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts qtopia
On Monday 21 July 2008 22:07:30 Kalle Happonen wrote: > Hmm I didn't get this to work. I didn't have a terminal on the phone, so > I ran it with X forwarding, i.e. the windows opened on my laptop. I > think I would have gotten them imported (vCard version 2.1, not 3 for > some reason), but I found no way of confirmin the "Would you like to > import" dialog. I didn't find a way to tell addressbook to autoimport, > the documentation is a bit skimpy.. well, Qtopia has this concept of a soft menu... So far only the software on the neo knows how to treat the properties set on the Qtopia windows to show the buttons. So set DISPLAY=:0, show the addressbook on the screen of the neo, get a softmenu and click the buttons there.. z. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts qtopia
On Tuesday 22 July 2008 03:47:52 Greg Bonett wrote: > Sven Klomp wrote: > > On Monday 21 July 2008 20:08:20 Greg Bonett wrote: > >>> 1.) copy the the file vcf to the device > >>> 2.) /opt/Qtopia/bin/addressbook /path/to/vcf-file (will get deleted) > >>> 3.) GUI makes some stuff... asks you to import.. > >>> 4.) You might need to restart afterwards > > > > It worked for me (VCard3.0 exported from Kontact). OK, still some > > problems with encoding but almost everything were imported (e.g. import > > of photo :-) ). > > Worked for me too. I had to do it one contact at a time though, from > the terminal on the phone. > I wrote a small (4 line) script to import all vcard contacts in a > directory. (Attached) > Put it in /usr/bin then cd into the directory with your contacts and > type 'importcontacts.sh' > > You'll have to hit 'ok' for each contact. Does anyone know of a better > way to do this? I exported all of my contacts into one file. Qtopia needed some time tohandle them, but in the end I was asked one time if I want to import 236 contacts. However, I don't know how to change the order of the contacts. I want "Surname, Forename"... Sven ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts qtopia
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sven Klomp wrote: > On Monday 21 July 2008 20:08:20 Greg Bonett wrote: >>> 1.) copy the the file vcf to the device >>> 2.) /opt/Qtopia/bin/addressbook /path/to/vcf-file (will get deleted) >>> 3.) GUI makes some stuff... asks you to import.. >>> 4.) You might need to restart afterwards >>> >>> >>> maybe someone comes up with a FAQ... >> Ah, thats seems easy. >> Can anyone confirm this method? (I'll try it as soon as I get home from >> work) > > It worked for me (VCard3.0 exported from Kontact). OK, still some problems > with encoding but almost everything were imported (e.g. import of > photo :-) ). > > Sven Worked for me too. I had to do it one contact at a time though, from the terminal on the phone. I wrote a small (4 line) script to import all vcard contacts in a directory. (Attached) Put it in /usr/bin then cd into the directory with your contacts and type 'importcontacts.sh' You'll have to hit 'ok' for each contact. Does anyone know of a better way to do this? -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIhTxIR7UPrMLya90RAkHRAJ4pWkbYZv0XF0lWeCVksuCMIVGhOwCdGIS9 XmdoB698mDeniuzXbupXr/o= =EkoP -END PGP SIGNATURE- importcontact.sh Description: Bourne shell script ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
2008/7/20 Jeffrey Ratcliffe <[EMAIL PROTECTED]>: > I started out by making the mistake of copying my Evolution db across... I had my contacts in Outlook because I was using an HTC Kaiser... Outlook->csv->Evolution->vcf->OM didn't work very well, a. because the field mapping was dodgy in places b. because the encoding got scrambled in places. Therefore I tried to get Evolution out of the loop and wrote a little Python script to do the csv->vcf and to teach me Python (Perl is normally my bag) Works for me - perhaps if somebody would host it, it could go on the wiki. Jeff #!/usr/bin/env python import sys import csv from time import strftime def printline(s): i = s.find('\n') while i > -1: if i > 75: print s[0:75] s = ' ' + s[75:] else: print s[0:i] s = s[i+1:] i = s.find('\n') return () vfield = { 'N:':['Last Name', 'First Name', 'Title', 'Suffix'], 'TITLE:':['Job Title'], 'ORG:': ['Company'], 'CATEGORIES:': ['Categories'], 'TEL;TYPE=WORK,VOICE:': ['Business Phone'], 'TEL;TYPE=WORK,VOICE:2': ['Business Phone 2'], 'TEL;TYPE=HOME,VOICE:': ['Home Phone'], 'TEL;TYPE=HOME,VOICE:2': ['Home Phone 2'], 'TEL;TYPE=OTHER,VOICE:': ['Other Phone'], 'TEL;TYPE=WORK,FAX:':['Business Fax'], 'TEL;TYPE=HOME,FAX:':['Home Fax'], 'TEL;TYPE=OTHER,FAX:': ['Other Fax'], 'TEL;TYPE=CELL:':['Mobile Phone'], 'EMAIL;TYPE=OTHER:': ['E-mail Address'], 'EMAIL;TYPE=OTHER:2':['E-mail 2 Address'], 'EMAIL;TYPE=OTHER:3':['E-mail 3 Address'], 'ADR;TYPE=WORK:':['Business Street', 'Business Street 2', 'Business Street 3', 'Business City', 'Business State', 'Business Postal Code', 'Business Country'], 'ADR;TYPE=HOME:':['Home Street', 'Home Street 2', 'Home Street 3', 'Home City', 'Home State', 'Home Postal Code', 'Home Country'], 'ADR;TYPE=OTHER:': ["Other Street", "Other Street 2", "Other Street 3", "Other City", "Other State", "Other Postal Code", "Other Country"], 'NOTE:':['Notes'], } reader = csv.DictReader(sys.stdin) first = True for contact in reader: # remove any empty fields for key,val in contact.items(): if val == '': del contact[key] if first: first = False else: print print 'BEGIN:VCARD' print 'VERSION:3.0' vcard = 'REV:'+strftime("%Y-%m-%dT%H:%M:%SZ\n") # special rules for FN field if 'Last Name' in contact or 'First Name' in contact: string = 'FN:' if 'First Name' in contact: string = string + contact['First Name'] if 'Last Name' in contact: if 'First Name' in contact: string = string + ' ' string = string + contact['Last Name'] vcard = vcard + string + '\n' # make sure N is not empty if not ('First Name' in contact or 'Last Name' in contact \ or 'Title' in contact or 'Suffix' in contact): if 'Company' in contact: contact['Last Name'] = contact['Company'] # write remaining fields for key,val in vfield.iteritems(): flag = False for field in val: if field in contact: flag = True if flag: string = key if string[len(string)-1].isdigit(): string = string[0:len(string)-1] for i, v in enumerate(val): if i > 0: string = string + ';' if v in contact: string = string + contact[v].replace('\n','\\n') vcard = vcard + string + '\n' printline (vcard + 'UID:' + str(hash(vcard)+1000) + '\n') print 'END:VCARD' ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts qtopia
Greg Bonett wrote: >> Unofficial answer (as this is not tested by us... it is the code from >> trolltech as is so is likely to have issues) >> >> 1.) copy the the file vcf to the device >> 2.) /opt/Qtopia/bin/addressbook /path/to/vcf-file (will get deleted) >> 3.) GUI makes some stuff... asks you to import.. >> 4.) You might need to restart afterwards >> >> >> maybe someone comes up with a FAQ... >> >> >> >> z. >> > Ah, thats seems easy. > Can anyone confirm this method? (I'll try it as soon as I get home from > work) > Hmm I didn't get this to work. I didn't have a terminal on the phone, so I ran it with X forwarding, i.e. the windows opened on my laptop. I think I would have gotten them imported (vCard version 2.1, not 3 for some reason), but I found no way of confirmin the "Would you like to import" dialog. I didn't find a way to tell addressbook to autoimport, the documentation is a bit skimpy.. Cheers, Kalle ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts qtopia
Greg Bonett wrote: >> >> Unofficial answer (as this is not tested by us... it is the code from >> trolltech as is so is likely to have issues) >> >> 1.) copy the the file vcf to the device >> 2.) /opt/Qtopia/bin/addressbook /path/to/vcf-file (will get deleted) >> 3.) GUI makes some stuff... asks you to import.. >> 4.) You might need to restart afterwards >> >> >> maybe someone comes up with a FAQ... >> >> >> >> z. > Ah, thats seems easy. > Can anyone confirm this method? (I'll try it as soon as I get home from > work) > Would probably work., or putting them in /home/root/Documents or on the sd card and then clicking on them in the Documents view. -- Lorn 'ljp' Potter Software Engineer, Systems Group, Trolltech, a Nokia company ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts qtopia
Cédric Berger wrote: > What about Qtopia Desktop (application for the PC) ? > Would it fit to manage synchronisation ? > > Since download from qtopia website ( > http://trolltech.com/developer/downloads/qtopia/desktopdownloads ) has > been disabled (they told me this was not intended for this application > -not GPL- and it would be put back soon), I could only get an old (?) > version, and anyway could not have it connect to qtopia > synchronisation on my freerunner... QD is not around any longer and will not sync to Qtopia 4. Qtopia 4 has 'sync agent', which currently only has a plugin for Outlook. -- Lorn 'ljp' Potter Software Engineer, Systems Group, Trolltech, a Nokia company ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts qtopia
> > > Unofficial answer (as this is not tested by us... it is the code from > trolltech as is so is likely to have issues) > > 1.) copy the the file vcf to the device > 2.) /opt/Qtopia/bin/addressbook /path/to/vcf-file (will get deleted) > 3.) GUI makes some stuff... asks you to import.. > 4.) You might need to restart afterwards > > > maybe someone comes up with a FAQ... > > > > z. Ah, thats seems easy. Can anyone confirm this method? (I'll try it as soon as I get home from work) -Greg ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts qtopia
On Monday 21 July 2008 14:12:35 Cédric Berger wrote: > What about Qtopia Desktop (application for the PC) ? > Would it fit to manage synchronisation ? > > Since download from qtopia website ( > http://trolltech.com/developer/downloads/qtopia/desktopdownloads ) has > been disabled (they told me this was not intended for this application > -not GPL- and it would be put back soon), I could only get an old (?) > version, and anyway could not have it connect to qtopia > synchronisation on my freerunner... There is a src/qtopiadesktop directory in the Qtopia source tree. I have never bothered to compile it. qdsync runs on the device, if you attempt to compile it it might or might not work. z. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts qtopia
On Friday 18 July 2008 20:32:50 Ole Kliemann wrote: > Not sure whether I missed something. I am looking for a way to import > VCF into qtopia. I could only find the discussion on this list, which, as > far as I understand, covers importing VCF to the GTK addressbook only. > > There is also a howto on importing Blackberry contacts to qtopia. It > could be helpful if one were able to convert VCF to sqlite. > > Any hints appreciated. Unofficial answer (as this is not tested by us... it is the code from trolltech as is so is likely to have issues) 1.) copy the the file vcf to the device 2.) /opt/Qtopia/bin/addressbook /path/to/vcf-file (will get deleted) 3.) GUI makes some stuff... asks you to import.. 4.) You might need to restart afterwards maybe someone comes up with a FAQ... z. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts qtopia
What about Qtopia Desktop (application for the PC) ? Would it fit to manage synchronisation ? Since download from qtopia website ( http://trolltech.com/developer/downloads/qtopia/desktopdownloads ) has been disabled (they told me this was not intended for this application -not GPL- and it would be put back soon), I could only get an old (?) version, and anyway could not have it connect to qtopia synchronisation on my freerunner... On Mon, Jul 21, 2008 at 11:49, Florian Hackenberger <[EMAIL PROTECTED]> wrote: > Importing the contacts via bluetooth works on the stock qtopia images > BTW. I recon it should be possible to get it to work on ASU as well. I > simply did a pairing of the FR with my old phone and sent all contacts > via bluetooth. The FR popped up a dialogue asking to confirm the import > and voilá, everything was there. > > Cheers. >Florian ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts qtopia
On Friday 18 July 2008, Ole Kliemann wrote: > Not sure whether I missed something. I am looking for a way to import > VCF into qtopia. I could only find the discussion on this list, > which, as far as I understand, covers importing VCF to the GTK > addressbook only. Importing the contacts via bluetooth works on the stock qtopia images BTW. I recon it should be possible to get it to work on ASU as well. I simply did a pairing of the FR with my old phone and sent all contacts via bluetooth. The FR popped up a dialogue asking to confirm the import and voilá, everything was there. Cheers. Florian -- DI Florian Hackenberger [EMAIL PROTECTED] www.hackenberger.at ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
When I list the commands on the FR it shows openmoko-contacts, but when I opkg install openmoko-contacts2, it tells me I'm up to date. I'm using the 2007.2 build of 7/18, not ASU or qtopia. I'll do some digging around to see if dbus is active or other stuff before I try it again. I assume you meant dbus when you said daemon in your other reply. Chris On Jul 20, 2008, at 11:53 AM, Roland Mas wrote: > C R McClenaghan, 2008-07-16 10:35:13 -0700 : > >> All, >> >> I get the following error using manage-contacts.py in the following >> way from SSH: >> >> python manage-contacts.py load > [...] > >> dbus.exceptions.DBusException: >> org.freedesktop.DBus.Error.UnknownMethod: Method "addContact" with >> signature "s" on interface >> "org.gnome.evolution.dataserver.addressbook.Book" doesn't exist >> >> I have installed via opkg python-dbus per wiki instructions. > > Strange. It still works here. You do have openmoko-contacts2 > installed, right? You're not using ASU or Qtopia or something? > > Roland. > -- > Roland Mas > > Despite rumour, Death isn't cruel - merely terribly, terribly good > at his job. > -- in Sourcery (Terry Pratchett) > > ___ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
2008/7/20 Roland Mas <[EMAIL PROTECTED]>: > I just tried again, and I managed to get these symptoms when running > the script too soon after a boot. The second run went on fine. Maybe > something needs the daemon to be started, and it's not started > initially... OK. A reboot got this working. Does this mean the dbus daemon has to be restarted between changes file-side/GUI-side and your script? I started out by making the mistake of copying my Evolution db across... I'll do some testing. Presumably people have started thinking about syncing Thunderbird and Evolution with OM? Jeff ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
Jeffrey Ratcliffe, 2008-07-20 20:13:29 +0200 : > I have the same problem, and additionally, the dump option runs > without error, but also without output. I just tried again, and I managed to get these symptoms when running the script too soon after a boot. The second run went on fine. Maybe something needs the daemon to be started, and it's not started initially... Roland. -- Roland Mas Au royaume des aveugles, il y a des borgnes à ne pas dépasser. -- in Soeur Marie-Thérèse des Batignolles (Maëster) ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
C R McClenaghan, 2008-07-16 10:35:13 -0700 : > All, > > I get the following error using manage-contacts.py in the following > way from SSH: > > python manage-contacts.py load dbus.exceptions.DBusException: > org.freedesktop.DBus.Error.UnknownMethod: Method "addContact" with > signature "s" on interface > "org.gnome.evolution.dataserver.addressbook.Book" doesn't exist > > I have installed via opkg python-dbus per wiki instructions. Strange. It still works here. You do have openmoko-contacts2 installed, right? You're not using ASU or Qtopia or something? Roland. -- Roland Mas Despite rumour, Death isn't cruel - merely terribly, terribly good at his job. -- in Sourcery (Terry Pratchett) ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 2008/7/16 C R McClenaghan : > I get the following error using manage-contacts.py in the following > way from SSH: > > python manage-contacts.py load > [removed listing of first vcard entry] > > Traceback (most recent call last): > File "manage-contacts.py", line 92, in > load_contacts () > File "manage-contacts.py", line 61, in load_contacts > ab.addContact (contacts [k]) > File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 140, > in __call__ > **keywords) > File "/usr/lib/python2.5/site-packages/dbus/connection.py", line > 607, in call_blocking > message, timeout) > dbus.exceptions.DBusException: > org.freedesktop.DBus.Error.UnknownMethod: Method "addContact" with > signature "s" on interface > "org.gnome.evolution.dataserver.addressbook.Book" doesn't exist I have the same problem, and additionally, the dump option runs without error, but also without output. Any ideas? Regards Jeff -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: http://getfiregpg.org iD8DBQFIg4AnVDAgnE3XzJMRAqH6AKDXiSOCK+E363Lf0GRvlPfQidDrWwCbBo1g l/fF+S+9nZyHIc264yYXbgs= =pHkr -END PGP SIGNATURE- ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts qtopia
Hello, On Fri, Jul 18, 2008 at 8:32 PM, Ole Kliemann <[EMAIL PROTECTED]> wrote: > could be helpful if one were able to convert VCF to sqlite. > > Any hints appreciated. This one imports .CSV at least: http://sqlitebrowser.sourceforge.net/ HTH -- Regards, Torfinn Ingolfsen ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts
Since I think it was Markus said that Kontact worked so well in exporting vcf's, I exported all my Thunderbird contacts to ldif, then imported them into Kontact and then exported them from there. Now I have all my contacts on my phone! ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts ASU
On Fri, Jul 18, 2008 at 06:32:50PM +, Ole Kliemann wrote: > Not sure whether I missed something. I am looking for a way to import > VCF into qtopia. I should clarify this. I mean the qtopia-based ASU. pgpe7B4ygRCrR.pgp Description: PGP signature ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts
I've attached a script that I use to convert tab-separated data (as generated from mysql) into a vcard file. Alex. On Fri, 18 Jul 2008, Al Johnson wrote: On Friday 18 July 2008, Markus Schlichting wrote: Am Freitag, 18. Juli 2008 07:14:13 schrieb Curtis Vaughan: I use Thunderbird for Email. I want to export my contacts from the Address Book and import them to FR. I don't see any instructions on how to do that. In fact, the only solutions seem to be for me to import my contacts into Evolution or (god forbid) Outlook and then export them from there. Is there no other solution? Is it possible to export Thunderbird Contacts as VCF files ? I don't use thunderbird regulary, but I think it is, so you can use http://http//wiki.openmoko.org/wiki/Import_Vcf_Contacts to import your contacts. Used it to copy my contact from kontact :-) Kontact is nice like that, but it helps that it uses vCard natively. Thunderbird doesn't - you can export to LDIF, CSV or tab-delimited. At present the solutions seem to be to use a roundabout route or write some code. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community ## # Takes a (tab-) seperated ascii file and writes out a file of # VCards (stdin -> stdout). # Input is a textfile with separated fields and a header. example: # matchcode vorname landort telefon telefon2fax nr_gruppe markgruppen nameinfoplz strasse handy gebdat memopicture # FA-ERDING Erding Erding 123/456 NULL0 F Finanzamt StNr. 123/456/78900 85422 Postf. 1262 NULL # # Or using mysql: # echo 'select * from my_addresstable'|mysql -pmy_password -hlocalhost my_database > ~/tmp/contacts.vcf # # No "..." around fields, tab separated (configurable, see below). # You shoud run this script on the linux host, since ASCII<->UTF-8 # conversion seems not very well supported on the moko phone. # Copy the resulting output file via scp onto the phone and # Use the manage-contacts.py load < contacts.vcf # There. import sys,time # user configuration # adapt here the real field names of the table sql_surename_field='name' sql_prename_field='vorname' sql_phone_field='telefon' sql_phone2_field='telefon2' sql_mobile_field='handy' # It is possible to convert only a subset of all addresses. # In my special case, I have a groups field which contains # an 'O' character if it shoud be exported to some phone. # To switch off the filter, replace the 'sql_filter_search' # content with '' (instead of the 'O'). sql_filter_field='gruppen' sql_filter_search='O' # tab by default sql_delimiter='\t' # set this to your own country phone prefix, e.g. +1 for USA # it will be prepended automatically country_code='+49' # end configuration options # convert a phone number of the form '089/123456' into # '+4989123456' so that moko phone recognizes the sender # id correctly. # This is probably germany phone number specific... def normalize(nr): result=nr.replace( "/", "" ) if result.startswith('0'): result = '+49' + result[1:] return result lines = sys.stdin.readlines () name_idx=-1 vorname_idx=-1 phonenr_idx = -1 phonenr2_idx = -1 mobile_idx = -1 filter_idx = -1 linenr=0 for line in lines: columns = line.split(sql_delimiter) if linenr == 0: # print columns try: name_idx=columns.index(sql_surename_field) vorname_idx=columns.index(sql_prename_field) phonenr_idx=columns.index(sql_phone_field) phonenr2_idx=columns.index(sql_phone2_field) mobile_idx=columns.index(sql_mobile_field) filter_idx=columns.index(sql_filter_field) except: # print "some fields not found: " + str(name_idx) + " " + str(vorname_idx ) + " " + str( phonenr_idx ) + " " + str( phonenr2_idx ) + " " + str( mobile_idx ) + " " + str( filter_idx ) pass else: # convert all fields into unicode. # This seems not to be supported well on the moko, # so it is better to let the linux host do the unicode # conversion (run this script locally) for i in range( 0,len(columns)-1 ): # convert the read-in string from ASCII into unicode try: columns[i] = columns[i].decode( "iso-8859-1" ) except: print "cannot convert to unicode: " + columns[i] # and convert it back again into UTF-8 what is expected # from the VCF format. try: columns[i] = columns[i].encode( 'utf-8', "replace" ) except: print "cannot convert to utf-8: " + columns[i] # only export those entries, that
Re: Import contacts
On Friday 18 July 2008, Markus Schlichting wrote: > Am Freitag, 18. Juli 2008 07:14:13 schrieb Curtis Vaughan: > > I use Thunderbird for Email. I want to export my contacts from the > > Address Book and import them to FR. I don't see any instructions on how > > to do that. In fact, the only solutions seem to be for me to import my > > contacts into Evolution or (god forbid) Outlook and then export them from > > there. > > Is there no other solution? > > Is it possible to export Thunderbird Contacts as VCF files ? I don't use > thunderbird regulary, but I think it is, so you can use > http://http//wiki.openmoko.org/wiki/Import_Vcf_Contacts to import your > contacts. Used it to copy my contact from kontact :-) Kontact is nice like that, but it helps that it uses vCard natively. Thunderbird doesn't - you can export to LDIF, CSV or tab-delimited. At present the solutions seem to be to use a roundabout route or write some code. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import contacts
Am Freitag, 18. Juli 2008 07:14:13 schrieb Curtis Vaughan: > I use Thunderbird for Email. I want to export my contacts from the > Address Book and import them to FR. I don't see any instructions on how > to do that. In fact, the only solutions seem to be for me to import my > contacts into Evolution or (god forbid) Outlook and then export them from > there. > Is there no other solution? Is it possible to export Thunderbird Contacts as VCF files ? I don't use thunderbird regulary, but I think it is, so you can use http://http//wiki.openmoko.org/wiki/Import_Vcf_Contacts to import your contacts. Used it to copy my contact from kontact :-) - marksu ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
Alexander Lehner, 2008-07-18 04:06:53 +0200 : > - unicode/UTF8 > I managed to convert vcard fields into proper UTF-8 (from plain > ASCII). But it seems to me that UTF-8 conversion is not well > supported with the basic (python) set-up on the phone. I had to do > this on my linux host. To be honest, the main reason I wrote manage-contacts.py was to be able to edit contacts on my main computer :-) I'm frightened enough by the input method of the Freerunner, I don't even want to think about entering Unicode characters on it just yet. > Also, the resulting characters were not correctly displayed in my > case even though contacts import did not complain (any experience > here whether display of e.g. german umlaute works?) No umlaute here, but I do have some French accented letters such as é and è and aven one æ, and they display fine. I even tried typing my Japanese teacher's name in Japanese, but apparently there's no Japanese-capable font in OM2007.2 so far. While I'm at it: it might be interesting setting a proper locale name in /etc/profile, so contacts are sorted according properly. I did that with "export LANG=fr_FR.UTF-8", so names starting with É sort among the names starting with E rather than at the very end. The backside of that is that agpsui tries to interpret gpsd's output as fr_FR, with its decimal separator set to a comma rather than a dot, and therefore wrong data comes out. But I suspect that's just a bug. Roland. -- Roland Mas /* Halley */ (Halley's comment.) ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
I'm currently working on a way to get my SQL address database into the phone and therefore making heavy use of the scripts mentioned here: http://wiki.openmoko.org/wiki/Import_Vcf_Contacts Thanks to the contributors so far, here's my part: - ssh/BT session: dbus-launch
Re: Import Contacts
Al Johnson, 2008-07-16 20:49:33 +0100 : > Try it from the terminal on the phone, or try: > dbus-load python manage-contacts.py load I'm guessing on the last one as it sorts similar errors with > gconftool-2 in ssh sessions. If it works please update the docs! Nah, the manage-contacts.py script does magic to avoid that need. On the other hand, I'm playing with Python and Dbus for something else (to disable suspend when you're talking on the phone), and I have similar unexpected errors on other Dbus interfaces. I'm still trying to debug that. Roland. -- Roland Mas Sauvez un arbre, tuez un castor. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
On Wednesday 16 July 2008, C R McClenaghan wrote: > All, > > I get the following error using manage-contacts.py in the following > way from SSH: > > python manage-contacts.py load > [removed listing of first vcard entry] > > Traceback (most recent call last): >File "manage-contacts.py", line 92, in > load_contacts () >File "manage-contacts.py", line 61, in load_contacts > ab.addContact (contacts [k]) >File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 140, > in __call__ > **keywords) >File "/usr/lib/python2.5/site-packages/dbus/connection.py", line > 607, in call_blocking > message, timeout) > dbus.exceptions.DBusException: > org.freedesktop.DBus.Error.UnknownMethod: Method "addContact" with > signature "s" on interface > "org.gnome.evolution.dataserver.addressbook.Book" doesn't exist > > I have installed via opkg python-dbus per wiki instructions. > > Thoughts? Try it from the terminal on the phone, or try: dbus-load python manage-contacts.py load > Chris > > On Jul 14, 2008, at 8:43 PM, Marco Trevisan (Treviño) wrote: > > smurfy - phil wrote: > >> i added a small script and infos at: > >> > >> http://wiki.openmoko.org/wiki/Import_Vcf_Contacts > >> > >> how to import vcf contacts to the default 2007.2 contacts application > > > > What about using GTK contacts [1]? > > It runs both on PC and in Openmoko and it should allow you to manage > > your contacts in a better way. I've used in my PC to import my old > > mobile phone contacts and I figure it will work well also in a > > Freerunner... :P > > > > > > [1] http://pimlico-project.org/contacts.html > > > > > > -- > > Treviño's World - Life and Linux > > http://www.3v1n0.net/ > > > > > > ___ > > Openmoko community mailing list > > community@lists.openmoko.org > > http://lists.openmoko.org/mailman/listinfo/community > > ___ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
All, I get the following error using manage-contacts.py in the following way from SSH: python manage-contacts.py load load_contacts () File "manage-contacts.py", line 61, in load_contacts ab.addContact (contacts [k]) File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 140, in __call__ **keywords) File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 607, in call_blocking message, timeout) dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "addContact" with signature "s" on interface "org.gnome.evolution.dataserver.addressbook.Book" doesn't exist I have installed via opkg python-dbus per wiki instructions. Thoughts? Chris On Jul 14, 2008, at 8:43 PM, Marco Trevisan (Treviño) wrote: > smurfy - phil wrote: >> i added a small script and infos at: >> >> http://wiki.openmoko.org/wiki/Import_Vcf_Contacts >> >> how to import vcf contacts to the default 2007.2 contacts application > > What about using GTK contacts [1]? > It runs both on PC and in Openmoko and it should allow you to manage > your contacts in a better way. I've used in my PC to import my old > mobile phone contacts and I figure it will work well also in a > Freerunner... :P > > > [1] http://pimlico-project.org/contacts.html > > > -- > Treviño's World - Life and Linux > http://www.3v1n0.net/ > > > ___ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
smurfy - phil wrote: > i added a small script and infos at: > > http://wiki.openmoko.org/wiki/Import_Vcf_Contacts > > how to import vcf contacts to the default 2007.2 contacts application What about using GTK contacts [1]? It runs both on PC and in Openmoko and it should allow you to manage your contacts in a better way. I've used in my PC to import my old mobile phone contacts and I figure it will work well also in a Freerunner... :P [1] http://pimlico-project.org/contacts.html -- Treviño's World - Life and Linux http://www.3v1n0.net/ ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
smurfy - phil, 2008-07-14 15:30:22 +0200 : > Please update > > http://wiki.openmoko.org/wiki/Import_Vcf_Contacts > > with your new versions, if you need space i could place it @my > domain (like my first version :D) Space isn't a problem (I uploaded the script to [1]), but I'm reluctant to create yet another account on yet another website. Could you add the link (and maybe rephrase the text on the article to remove the thing about running from a terminal rather than SSH)? Thanks, Roland. [1] http://www.placard.fr.eu.org/~roland/tmp/manage-contacts.py -- Roland Mas ()Campagne du ruban ASCII : /\Contre les mails en HTML et les vcard ! ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
Please update http://wiki.openmoko.org/wiki/Import_Vcf_Contacts with your new versions, if you need space i could place it @my domain (like my first version :D) Phil ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
Roland Mas, 2008-07-14 15:09:34 +0200 : > - you can dump all contacts to a file (a series of concatenated > vcards); Forgot to mention: that feature uses a gross hack, I'd be happy to see it cleaned up. I just didn't manage to find the query syntax for the getContactList() method. Roland. -- Roland Mas Le weblog entièrement nu -- http://roland.entierement.nu/ Le photoblog entièrement net -- http://roland.entierement.net/ ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
Andreas Dalsgaard, 2008-07-14 14:01:07 +0200 : [...] > Take a quick look at the attached import_contacts.py script, it is > based on Al Johnson modification to Wurps script. Please pardon my intruding into a thread, I just subscribed to the list. I have also worked on contacts management, mostly to allow myself to fix non-ASCII names in a real editor with a real keyboard. The result is the attached script, which improves on the previous ones in the following ways: - you can run it through SSH, and it looks for a DBUS session; - you can dump all contacts to a file (a series of concatenated vcards); - you an reload that file (after having altered it), and it'll update contacts when they already exist (based on UID) or create new contacts otherwise. So, basically: $ scp manage-contacts.py openmoko: $ ssh openmoko python manage-contacts.py dump > contacts.txt $ emacs/vim/nano/gedit/whatever contacts.txt $ ssh openmoko python manage-contacts.py load < contacts.txt As far as I'm concerned (look, I'm a Debian integrist, I'm *supposed* to care about these things :-), my modifications to the initial script are subject to the WTFPL. Roland. -- Roland Mas Plus on en fout, plus y'en a du riz. -- Proverbe chinois. #!/usr/bin/python # coding=utf-8 from __future__ import with_statement import dbus import sys, os import tempfile import re, string, time ps = os.popen ('ps auxe | grep -m 1 DBUS_SESSION_BUS_ADDRESS') l = ps.read () r = re.compile ('DBUS_SESSION_BUS_ADDRESS=(\S+)') m = r.search (l) a = m.expand ('\\1') os.environ ['DBUS_SESSION_BUS_ADDRESS'] = a bus_name = 'org.gnome.evolution.dataserver.AddressBook' obj_name = '/org/gnome/evolution/dataserver/addressbook/file_3a__2f__2f__2f_home_2f_root_2f__2e_evolution_2f_addressbook_2f_local_2f_system' addressBook = None def getAddressBook (): global addressBook if addressBook is None: sb = dbus.SessionBus () obj = sb.get_object (bus_name, obj_name) addressBook = dbus.Interface (obj, 'org.gnome.evolution.dataserver.addressbook.Book') return addressBook if len (sys.argv) != 2: print ("Expects a single argument, 'dump' or 'load'") print ("With 'dump', dumps all contacts as vcards to STDOUT") print ("With 'load', loads vcards from STDIN") exit (1) def dump_contacts (): # Note: this is a gross hack, but I didn't manage to get getContactList to work strings = os.popen ('strings /home/root/.evolution/addressbook/local/system/addressbook.db | grep ^pas-id- | sort -u').readlines () for id in strings: id = id.rstrip () try: print getAddressBook ().getContact (id) + "\r" except: pass def load_contacts (): contacts = parse_stdin () ab = getAddressBook () l = contacts.keys () l.sort () for k in contacts.keys (): try: c = ab.getContact (k) print "Contact already exists, modifying" try: ab.modifyContact (contacts [k]) except: print "Got error when modifying " + c except: print "New contact" ab.addContact (contacts [k]) def parse_stdin (): lines = sys.stdin.readlines () contacts = {} cur = [] index = 0 for l in lines: line = l.rstrip () if line == '': continue if line == 'END:VCARD': cur.append (line) seen = '' for record in cur: if record.startswith ('UID:'): seen = record [4:] seen = seen.rstrip () if seen == '': seen = 'new-contact-' + str(index) index += 1 contacts [seen] = string.join (cur, '\r\n') cur = [] else: if line.startswith ('REV:'): cur.append ('REV: ' + time.strftime ('%Y-%m-%dT%H:%M:%SZ', time.gmtime())) else: cur.append (line) return contacts if sys.argv [1] == 'load': load_contacts () else: dump_contacts () ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
Andreas Dalsgaard wrote: > 2008/7/12 Al Johnson <[EMAIL PROTECTED]>: > >> On Friday 11 July 2008, Kalle Happonen wrote: >> >>> Hi, >>> >>> Brian C wrote: >>> Brian C wrote: [a long error message because he didn't run the script from the OM terminal] Ok, so the script runs now that I realize it must be run from the OM terminal. >> It might work from an ssh session if you run: >>dbus-launch scriptname >> I haven't tried this though - just guessing based on similar behaviour from >> gconftool-2 >> >> However, it appears to have entered all "null" contacts and so far none of them appear to have any actual contact info in them > > If you do not want to delete all the "null" contacts by hand I've made > a script(attached as remove_all_contacts.py) based on Wurps script > which removes all contacts in your addressbook. It should be pretty > easy to modify so that it only deletes "null" contacts. > > >>> I ran into the same problem, but I did get them in now with the script. >>> I had two issues actually. The easiest to try >>> is to remove the empty lines between the entries in the vCard file, and >>> have them all in a long jumble. That solved my last problem. >>> >> Blank line removal should be a one-liner - if only I were more familiar with >> python ;-) >> > > Take a quick look at the attached import_contacts.py script, it is > based on Al Johnson modification to Wurps script. > > Hah, thanks for fixing the script. I almost feel ashamed for not spending a few minutes to fix it up, but just did vim magic on my contacts files :). And thanks for the contact remover too! >>> I did have another problem when I played around with the contacts in >>> Evolution on the desktop. I started by exporting the contacts as vCard >>> from Wammu. Evolution refused to read those v2.1 vCards. I then >>> exported it as ldif from wammu, and had to make a small change in the >>> entries so that evolution read them correctly (adding a cn or smth). >>> AFAIK the openmoko contacts is also based on evolution so there might be >>> similar problems. >>> >>> When I tried to import Wammu vCards, they showed up as null entries on >>> openmoko. When I exported the contacts as vCard (3.0) from evolution, >>> and removed the empty lines in the vCard file, I could import them to >>> openmoko with the script. I'm not sure if the new vCard format helped any. >>> >> Interesting...I remember having similar problems with OpenXchange a couple of >> years ago. It assumed v3 and didn't check the version in the vCard itself. >> You had to pick which interface to use depending on the vCard version. i >> wonder if Evolution Data Server is doing something similar? >> >> ___ >> Openmoko community mailing list >> community@lists.openmoko.org >> http://lists.openmoko.org/mailman/listinfo/community >> >> >> >> >> ___ >> Openmoko community mailing list >> community@lists.openmoko.org >> http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
2008/7/12 Al Johnson <[EMAIL PROTECTED]>: > On Friday 11 July 2008, Kalle Happonen wrote: >> Hi, >> >> Brian C wrote: >> > Brian C wrote: >> > [a long error message because he didn't run the script from the OM >> > terminal] >> > >> > Ok, so the script runs now that I realize it must be run from the OM >> > terminal. > > It might work from an ssh session if you run: >dbus-launch scriptname > I haven't tried this though - just guessing based on similar behaviour from > gconftool-2 > >> > However, it appears to have entered all "null" contacts and >> > so far none of them appear to have any actual contact info in them If you do not want to delete all the "null" contacts by hand I've made a script(attached as remove_all_contacts.py) based on Wurps script which removes all contacts in your addressbook. It should be pretty easy to modify so that it only deletes "null" contacts. >> >> I ran into the same problem, but I did get them in now with the script. >> I had two issues actually. The easiest to try >> is to remove the empty lines between the entries in the vCard file, and >> have them all in a long jumble. That solved my last problem. > > Blank line removal should be a one-liner - if only I were more familiar with > python ;-) Take a quick look at the attached import_contacts.py script, it is based on Al Johnson modification to Wurps script. > >> I did have another problem when I played around with the contacts in >> Evolution on the desktop. I started by exporting the contacts as vCard >> from Wammu. Evolution refused to read those v2.1 vCards. I then >> exported it as ldif from wammu, and had to make a small change in the >> entries so that evolution read them correctly (adding a cn or smth). >> AFAIK the openmoko contacts is also based on evolution so there might be >> similar problems. >> >> When I tried to import Wammu vCards, they showed up as null entries on >> openmoko. When I exported the contacts as vCard (3.0) from evolution, >> and removed the empty lines in the vCard file, I could import them to >> openmoko with the script. I'm not sure if the new vCard format helped any. > > Interesting...I remember having similar problems with OpenXchange a couple of > years ago. It assumed v3 and didn't check the version in the vCard itself. > You had to pick which interface to use depending on the vCard version. i > wonder if Evolution Data Server is doing something similar? > > ___ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community > #!/usr/bin/python from __future__ import with_statement import dbus import sys, os import tempfile import re bus_name = 'org.gnome.evolution.dataserver.AddressBook' obj_name = "/org/gnome/evolution/dataserver/addressbook/file_3a__2f__2f__2f_home_2f_root_2f__2e_evolution_2f_addressbook_2f_local_2f_system" addressBook = None def getAddressBook(): global addressBook if addressBook is None: sb = dbus.SessionBus() obj = sb.get_object(bus_name, obj_name) addressBook = dbus.Interface(obj, 'org.gnome.evolution.dataserver.addressbook.Book') return addressBook names = os.listdir('.') for name in names: print name vcard = "" f=open(name,'r') for line in f: if line != "\r\n": vcard = vcard + line
Re: Import Contacts
On Friday 11 July 2008, Kalle Happonen wrote: > Hi, > > Brian C wrote: > > Brian C wrote: > > [a long error message because he didn't run the script from the OM > > terminal] > > > > Ok, so the script runs now that I realize it must be run from the OM > > terminal. It might work from an ssh session if you run: dbus-launch scriptname I haven't tried this though - just guessing based on similar behaviour from gconftool-2 > > However, it appears to have entered all "null" contacts and > > so far none of them appear to have any actual contact info in them > > I ran into the same problem, but I did get them in now with the script. > I had two issues actually. The easiest to try > is to remove the empty lines between the entries in the vCard file, and > have them all in a long jumble. That solved my last problem. Blank line removal should be a one-liner - if only I were more familiar with python ;-) > I did have another problem when I played around with the contacts in > Evolution on the desktop. I started by exporting the contacts as vCard > from Wammu. Evolution refused to read those v2.1 vCards. I then > exported it as ldif from wammu, and had to make a small change in the > entries so that evolution read them correctly (adding a cn or smth). > AFAIK the openmoko contacts is also based on evolution so there might be > similar problems. > > When I tried to import Wammu vCards, they showed up as null entries on > openmoko. When I exported the contacts as vCard (3.0) from evolution, > and removed the empty lines in the vCard file, I could import them to > openmoko with the script. I'm not sure if the new vCard format helped any. Interesting...I remember having similar problems with OpenXchange a couple of years ago. It assumed v3 and didn't check the version in the vCard itself. You had to pick which interface to use depending on the vCard version. i wonder if Evolution Data Server is doing something similar? ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
Hi, Brian C wrote: > Brian C wrote: > [a long error message because he didn't run the script from the OM terminal] > > Ok, so the script runs now that I realize it must be run from the OM > terminal. However, it appears to have entered all "null" contacts and > so far none of them appear to have any actual contact info in them > I ran into the same problem, but I did get them in now with the script. I had two issues actually. The easiest to try is to remove the empty lines between the entries in the vCard file, and have them all in a long jumble. That solved my last problem. I did have another problem when I played around with the contacts in Evolution on the desktop. I started by exporting the contacts as vCard from Wammu. Evolution refused to read those v2.1 vCards. I then exported it as ldif from wammu, and had to make a small change in the entries so that evolution read them correctly (adding a cn or smth). AFAIK the openmoko contacts is also based on evolution so there might be similar problems. When I tried to import Wammu vCards, they showed up as null entries on openmoko. When I exported the contacts as vCard (3.0) from evolution, and removed the empty lines in the vCard file, I could import them to openmoko with the script. I'm not sure if the new vCard format helped any. Hope it helps, Kalle ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
Brian C wrote: [a long error message because he didn't run the script from the OM terminal] Ok, so the script runs now that I realize it must be run from the OM terminal. However, it appears to have entered all "null" contacts and so far none of them appear to have any actual contact info in them. Brian ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
Al Johnson wrote: > Thanks Phil. I tweaked it to get it to work with more than one contact per > file as exported by my K700i. It should work as before if there's just one > contact per file. Here's the modified bit. > > for name in names: > print name > vcard = "" > f=open(name,'r') > for line in f: >vcard = vcard + line >if line[:9] == "END:VCARD": > getAddressBook().addContact(vcard) > vcard = "" > I'm using Al's modification to Phil's import script and get the following error. Anyone understand and can explain how to fix? [EMAIL PROTECTED]:/media/card/Contacts/abook# python ../import evocontacts.vcf Traceback (most recent call last): File "../import", line 32, in getAddressBook().addContact(vcard) File "../import", line 17, in getAddressBook sb = dbus.SessionBus() File "/usr/lib/python2.5/site-packages/dbus/_dbus.py", line 217, in __new__ mainloop=mainloop) File "/usr/lib/python2.5/site-packages/dbus/_dbus.py", line 106, in __new__ bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop) File "/usr/lib/python2.5/site-packages/dbus/bus.py", line 125, in __new__ bus = cls._new_for_bus(address_or_type, mainloop=mainloop) dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: dbus-launch failed to autolaunch D-Bus session: Autolaunch requested, but X11 support not compiled in. Cannot continue. I called the script "import" and it resides in the /media/card/Contacts folder and I put my evocontacts.vcf in the /media/card/Contacts/abook directory. It is the export of around 611 contacts from Evolution. Thanks for any suggestions. Brian ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
On Wednesday 09 July 2008, Al Johnson wrote: > On Wednesday 09 July 2008, smurfy - phil wrote: > > Hey, > > > > i added a small script and infos at: > > > > http://wiki.openmoko.org/wiki/Import_Vcf_Contacts > > > > how to import vcf contacts to the default 2007.2 contacts application > > > > Phil > > Does this work for files containing more than one contact, or just for one > contact per file? Thanks Phil. I tweaked it to get it to work with more than one contact per file as exported by my K700i. It should work as before if there's just one contact per file. Here's the modified bit. for name in names: print name vcard = "" f=open(name,'r') for line in f: vcard = vcard + line if line[:9] == "END:VCARD": getAddressBook().addContact(vcard) vcard = "" ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
On 9 Jul 2008, at 16:26, smurfy - phil wrote: > > i added a small script and infos at: > > http://wiki.openmoko.org/wiki/Import_Vcf_Contacts > > how to import vcf contacts to the default 2007.2 contacts application Further to the recent "questions about our mailinglists" thread, ISTM that this is more suitable for device-owners than the wider community list. Stroller. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: Import Contacts
On Wednesday 09 July 2008, smurfy - phil wrote: > Hey, > > i added a small script and infos at: > > http://wiki.openmoko.org/wiki/Import_Vcf_Contacts > > how to import vcf contacts to the default 2007.2 contacts application > > Phil Does this work for files containing more than one contact, or just for one contact per file? ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community