Re: [shr-t] Importing (vcf) contacts -- again
i am also attempting to import a vcf file into my shrsim. for some reason unknown to me pisi wont write any changes to any contact fields. example, changing a phone number to add +1 to the phone number field. but! deleting a contact out of the shrsim and running pisi will re add that contact, but none of the phone number modifications. all these modifications are formated just as they should be. some of my contacts on the sim already have the +1 in the number. which leads me to believe its not a formatting issue. along with that, can anyone describe to me why new shr 20091205 contacts likes to click a contact rather then draggin a contact to scroll the list. this is driving me crazy right now trying to scroll to the lower contacts. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [shr-t] Importing (vcf) contacts -- again
On Thursday 17 December 2009, jeremy jozwik wrote: along with that, can anyone describe to me why new shr 20091205 contacts likes to click a contact rather then draggin a contact to scroll the list. this is driving me crazy right now trying to scroll to the lower contacts. Because it has a bug that's been fixed on more recent versions in unstable, maybe also in testing. Also if you drag along the right hand edge you can jump to a particular letter instead of having to scroll through hundreds of contacts. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [shr-t] Importing (vcf) contacts -- again
On Thu, Dec 17, 2009 at 8:52 AM, Al Johnson openm...@mazikeen.demon.co.uk wrote: Because it has a bug that's been fixed on more recent versions in unstable, maybe also in testing. Also if you drag along the right hand edge you can jump to a particular letter instead of having to scroll through hundreds of contacts. holy moly! i didnt even know that was in there. thats pritty cool! ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [shr-t] Importing (vcf) contacts -- again
On mon, 07/12/2009 at 23:54 +0100, Bernhard Reiter wrote: I can attach my script for importing. It needs python-vobject, python-sqlite and one else, which I forgot. 8( -- WBR, Vladimir Berezenko #!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import string import dbus from sys import argv from sqlite3 import dbapi2 as sqlite import vobject def addField(entry, key, value): if entry.has_key(key): if type(entry[key]) == list: entry[key].append(value) else: entry[key]=[entry[key], value] else: entry[key]=value # define some nice dbus helper, which I really like, cause make code easier to read :) def getDbusObject (bus, busname , objectpath , interface): dbusObject = bus.get_object(busname, objectpath) return dbus.Interface(dbusObject, dbus_interface=interface) dbusEn = 1 print Starting importing try: if len(sys.argv) 3: print Too many arguments\n raise if len(sys.argv) == 3: if (sys.argv[1] == -t): print Test mode enabled\nFile: %s\n % (sys.argv[2]) dbusEn = 0 filecont = open(sys.argv[2], r) else: print Wrong parameters\n raise elif len(sys.argv) == 2: if (sys.argv[1] != -t): print Real mode\nFile: %s\n % (sys.argv[1]) filecont = open(sys.argv[1], r) else: print Test mode enabled\nFile: ./Contacts.vcf\n filecont = open(./Contacts.vcf,r) dbusEn = 0 else: filecont = open(./Contacts.vcf,r) except: print Usage:\nimportVCF [-t] [Contacts.vcf] sys.exit(0) if dbusEn: try: bus = dbus.SystemBus() interface = getDbusObject (bus, org.freesmartphone.opimd, /org/freesmartphone/PIM/Contacts, org.freesmartphone.PIM.Contacts) except: print No DBUS\nTest mode enabled\n dbusEn = 0 #N Name,Sirname (single field per contact) #ORG Organization #ROLE Role #NICKNAMENick (single field per contact) #TEL [CELL, WORK, HOME, FAX] Work cell phone, Home cell phone, Cell phone, Work phone, Home phone, Phone, Work fax, Home fax, Fax #EMAIL [WORK, HOME] Work e-mail, Home e-mail, E-mail #BDAY Birthday (single field per contact) #NOTENote (single field per contact) #ADR [WORK, HOME] Work address (single field per contact), Home address (single field per contact), Address #PHOTO Photo (single field per contact) #X-ICQ ICQ #X-JABBER Jabber #URL [WORK, HOME] WorkURL, HomeURL, URL for contact in vobject.readComponents(filecont): paramDict = {} print /--\\ name = contact.n.value.given if len(contact.n.value.additional) 0: name += +contact.n.value.additional surname = contact.n.value.family paramDict[uName] = name paramDict[uSurname] = surname for element in contact.getChildren(): if (element.name == TEL): if WORK in element.type_paramlist: phoneType = uWork elif HOME in element.type_paramlist: phoneType = uHome else: phoneType = if CELL in element.type_paramlist: if phoneType == : addField(paramDict, uCell phone, utel:+element.value.strip()) else: addField(paramDict, phoneType+u cell phone, utel:+element.value.strip()) elif FAX in element.type_paramlist: if phoneType == : addField(paramDict, uFax, utel:+element.value.strip()) else: addField(paramDict, phoneType+u fax, utel:+element.value.strip()) else: if phoneType == : addField(paramDict, uPhone, utel:+element.value.strip()) else: addField(paramDict, phoneType+u phone, utel:+element.value.strip()) elif (element.name == NICKNAME): if len(element.value) 0: paramDict[uNickname] = element.value.strip() elif (element.name == BDAY): paramDict[uBirthdate] = element.value.strip() elif (element.name == ADR): try: if WORK in element.type_paramlist: addrType = uWork elif HOME in element.type_paramlist: addrType = uHome else: addrType = except: addrType = # print (addrType+ Address: ).strip() # print ZIP = +element.value.code # print Country = +element.value.country # print City = +element.value.city # print Street = +element.value.street paramDict[addrType+uAddress] = element.value.street+;+element.value.city+;+element.value.country+;+element.value.code elif (element.name == NOTE): if len(element.value) 0: paramDict[uNote] = element.value elif (element.name ==
Re: [shr-t] Importing (vcf) contacts -- again
В Пнд, 07/12/2009 в 23:54 +0100, Bernhard Reiter пишет: Thanks. I think last time I used it, there was no opimd support yet. Uhm, and is there a feed for shr-t? If I just try opkg install pisi I get * Cannot find package pisi. You can try to use mine import script. It's in attachment. It needs python-vobject, python-sqlite and another one package which contains base64 codec, but I always forget how it is named. -- WBR, Vladimir Berezenko #!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import string import dbus from sys import argv from sqlite3 import dbapi2 as sqlite import vobject def addField(entry, key, value): if entry.has_key(key): if type(entry[key]) == list: entry[key].append(value) else: entry[key]=[entry[key], value] else: entry[key]=value # define some nice dbus helper, which I really like, cause make code easier to read :) def getDbusObject (bus, busname , objectpath , interface): dbusObject = bus.get_object(busname, objectpath) return dbus.Interface(dbusObject, dbus_interface=interface) dbusEn = 1 print Starting importing try: if len(sys.argv) 3: print Too many arguments\n raise if len(sys.argv) == 3: if (sys.argv[1] == -t): print Test mode enabled\nFile: %s\n % (sys.argv[2]) dbusEn = 0 filecont = open(sys.argv[2], r) else: print Wrong parameters\n raise elif len(sys.argv) == 2: if (sys.argv[1] != -t): print Real mode\nFile: %s\n % (sys.argv[1]) filecont = open(sys.argv[1], r) else: print Test mode enabled\nFile: ./Contacts.vcf\n filecont = open(./Contacts.vcf,r) dbusEn = 0 else: filecont = open(./Contacts.vcf,r) except: print Usage:\nimportVCF [-t] [Contacts.vcf] sys.exit(0) if dbusEn: try: bus = dbus.SystemBus() interface = getDbusObject (bus, org.freesmartphone.opimd, /org/freesmartphone/PIM/Contacts, org.freesmartphone.PIM.Contacts) except: print No DBUS\nTest mode enabled\n dbusEn = 0 #N Name,Sirname (single field per contact) #ORG Organization #ROLE Role #NICKNAMENick (single field per contact) #TEL [CELL, WORK, HOME, FAX] Work cell phone, Home cell phone, Cell phone, Work phone, Home phone, Phone, Work fax, Home fax, Fax #EMAIL [WORK, HOME] Work e-mail, Home e-mail, E-mail #BDAY Birthday (single field per contact) #NOTENote (single field per contact) #ADR [WORK, HOME] Work address (single field per contact), Home address (single field per contact), Address #PHOTO Photo (single field per contact) #X-ICQ ICQ #X-JABBER Jabber #URL [WORK, HOME] WorkURL, HomeURL, URL for contact in vobject.readComponents(filecont): paramDict = {} print /--\\ name = contact.n.value.given if len(contact.n.value.additional) 0: name += +contact.n.value.additional surname = contact.n.value.family paramDict[uName] = name paramDict[uSurname] = surname for element in contact.getChildren(): if (element.name == TEL): if WORK in element.type_paramlist: phoneType = uWork elif HOME in element.type_paramlist: phoneType = uHome else: phoneType = if CELL in element.type_paramlist: if phoneType == : addField(paramDict, uCell phone, utel:+element.value.strip()) else: addField(paramDict, phoneType+u cell phone, utel:+element.value.strip()) elif FAX in element.type_paramlist: if phoneType == : addField(paramDict, uFax, utel:+element.value.strip()) else: addField(paramDict, phoneType+u fax, utel:+element.value.strip()) else: if phoneType == : addField(paramDict, uPhone, utel:+element.value.strip()) else: addField(paramDict, phoneType+u phone, utel:+element.value.strip()) elif (element.name == NICKNAME): if len(element.value) 0: paramDict[uNickname] = element.value.strip() elif (element.name == BDAY): paramDict[uBirthdate] = element.value.strip() elif (element.name == ADR): try: if WORK in element.type_paramlist: addrType = uWork elif HOME in element.type_paramlist: addrType = uHome else: addrType = except: addrType = # print (addrType+ Address: ).strip() # print ZIP = +element.value.code # print Country = +element.value.country # print City = +element.value.city # print Street = +element.value.street
Re: [shr-t] Importing (vcf) contacts -- again
Thanks, I'll try it! Am Mittwoch, den 09.12.2009, 00:56 +0300 schrieb Vladimir Berezenko: В Пнд, 07/12/2009 в 23:54 +0100, Bernhard Reiter пишет: Thanks. I think last time I used it, there was no opimd support yet. Uhm, and is there a feed for shr-t? If I just try opkg install pisi I get * Cannot find package pisi. You can try to use mine import script. It's in attachment. It needs python-vobject, python-sqlite and another one package which contains base64 codec, but I always forget how it is named. ___ 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: [shr-t] Importing (vcf) contacts -- again
Btw, now opkg install pisi suddenly seems to work. Funny. Am Mittwoch, den 09.12.2009, 00:56 +0300 schrieb Vladimir Berezenko: В Пнд, 07/12/2009 в 23:54 +0100, Bernhard Reiter пишет: Thanks. I think last time I used it, there was no opimd support yet. Uhm, and is there a feed for shr-t? If I just try opkg install pisi I get * Cannot find package pisi. You can try to use mine import script. It's in attachment. It needs python-vobject, python-sqlite and another one package which contains base64 codec, but I always forget how it is named. ___ 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: [shr-t] Importing (vcf) contacts -- again
On Tue, 08 Dec 2009 00:24:01 +0300, Bernhard Reiter ock...@raz.or.at wrote: Now I think this question was raised in the past already, but I couldn't really find anything that seemed to apply to the current state of SHR (with opimd): How do I import my (evolution) contacts (eg as vcf)? PISI ? ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [shr-t] Importing (vcf) contacts -- again
Am Dienstag, den 08.12.2009, 00:39 +0300 schrieb Vadim, Efimov: On Tue, 08 Dec 2009 00:24:01 +0300, Bernhard Reiter ock...@raz.or.at wrote: Now I think this question was raised in the past already, but I couldn't really find anything that seemed to apply to the current state of SHR (with opimd): How do I import my (evolution) contacts (eg as vcf)? PISI ? Thanks. I think last time I used it, there was no opimd support yet. Uhm, and is there a feed for shr-t? If I just try opkg install pisi I get * Cannot find package pisi. BR ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [shr-t] Importing (vcf) contacts -- again
On Tue, 08 Dec 2009 01:54:01 +0300, Bernhard Reiter ock...@raz.or.at wrote: Uhm, and is there a feed for shr-t? If I just try opkg install pisi I get * Cannot find package pisi. Hmmm... I use shr-u, so i guess pisi missed in shr-t ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community