Re: zhone patch: contacts from vcf was: Re: [debian/zhone] Send an SMS
Am Monday 27 October 2008 13:28:17 schrieb arne anka: http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/index.html ;hb=HEAD that one i was looking for -- none of the specific pages google lists has a reference to this toc. It's not an easy human-readable URL, but it is linked from the freesmartphone.org homepage, and it does give access to all the API docs I think. it has been sometime since i looked, but back then there was no link on the wiki (at least non easily found) and i never cared to look again. instead i asked 3 times at the smartphone-lists and never got an answer. Perhaps my mails to land in your spamfolder, but I'm sure I've given docs.freesmartphone.org a bunch of time as answer. -- :M: ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: zhone patch: contacts from vcf was: Re: [debian/zhone] Send an SMS
Am Monday 27 October 2008 14:10:53 schrieb Alastair Johnson: arne anka wrote: http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/index.htm l;hb=HEAD that one i was looking for -- none of the specific pages google lists has a reference to this toc. It's not an easy human-readable URL, but it is linked from the freesmartphone.org homepage, and it does give access to all the API docs I think. it has been sometime since i looked, but back then there was no link on the wiki (at least non easily found) and i never cared to look again. instead i asked 3 times at the smartphone-lists and never got an answer. I had expected to find the mailing list details easily, but they are burried on the Tutorials page! ? http://www.freesmartphone.org/index.php/Infrastructure If you think that's buried... help us, it's a wiki! -- :M: ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: zhone patch: contacts from vcf was: Re: [debian/zhone] Send an SMS
If you think that's buried... help us, it's a wiki! not as long as it requires to create an account -- i got far to much of those and do not intend to add to the list just to make some comments or corrections in a wiki. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: zhone patch: contacts from vcf was: Re: [debian/zhone] Send an SMS
Michael 'Mickey' Lauer wrote: Am Monday 27 October 2008 14:10:53 schrieb Alastair Johnson: arne anka wrote: http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/index.htm l;hb=HEAD that one i was looking for -- none of the specific pages google lists has a reference to this toc. It's not an easy human-readable URL, but it is linked from the freesmartphone.org homepage, and it does give access to all the API docs I think. it has been sometime since i looked, but back then there was no link on the wiki (at least non easily found) and i never cared to look again. instead i asked 3 times at the smartphone-lists and never got an answer. I had expected to find the mailing list details easily, but they are burried on the Tutorials page! ? http://www.freesmartphone.org/index.php/Infrastructure If you think that's buried... help us, it's a wiki! I tried searching for 'mailing list' and that page is not among the results. http://www.freesmartphone.org/index.php/Special:Search?search=mailing+listgo=Go As for it being a wiki - hoist with my own petard ;-) Although if I had made a link from the front page it would have pointed to the wrong place. I'll add something more suitable now I know the right one. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: zhone patch: contacts from vcf was: Re: [debian/zhone] Send an SMS
Please also have a look at the following three use cases concerning SIM contacts and address book contacts. This is an elegant way of dealing with the two. you lost me there -- which following use cases? on a related note: anybody usable links to fso/framweorkd documentation? i only found one or two docs in a git tree with an url hardly to remember and i wasn't able to figure out how to get other docs, since the schema of the url was not clear to me ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: zhone patch: contacts from vcf was: Re: [debian/zhone] Send an SMS
Am Monday 27 October 2008 11:31:19 schrieb arne anka: Please also have a look at the following three use cases concerning SIM contacts and address book contacts. This is an elegant way of dealing with the two. you lost me there -- which following use cases? on a related note: anybody usable links to fso/framweorkd documentation? Start w/ http://docs.freesmartphone.org, it points to the nasty git URI automagically. -- :M: ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: zhone patch: contacts from vcf was: Re: [debian/zhone] Send an SMS
http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/index.html;hb=HEAD that one i was looking for -- none of the specific pages google lists has a reference to this toc. It's not an easy human-readable URL, but it is linked from the freesmartphone.org homepage, and it does give access to all the API docs I think. it has been sometime since i looked, but back then there was no link on the wiki (at least non easily found) and i never cared to look again. instead i asked 3 times at the smartphone-lists and never got an answer. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: zhone patch: contacts from vcf was: Re: [debian/zhone] Send an SMS
arne anka wrote: http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/index.html;hb=HEAD that one i was looking for -- none of the specific pages google lists has a reference to this toc. It's not an easy human-readable URL, but it is linked from the freesmartphone.org homepage, and it does give access to all the API docs I think. it has been sometime since i looked, but back then there was no link on the wiki (at least non easily found) and i never cared to look again. instead i asked 3 times at the smartphone-lists and never got an answer. I had expected to find the mailing list details easily, but they are burried on the Tutorials page! ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: zhone patch: contacts from vcf was: Re: [debian/zhone] Send an SMS
I had expected to find the mailing list details easily, but they are burried on the Tutorials page! mr livingston, i presume? ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
zhone patch: contacts from vcf was: Re: [debian/zhone] Send an SMS
below a patch for zhone to read contatcs instead from sim from /root/addressbook.vcf (what's the easiest way to determine the user's home directory from python?) main difference to the patch proposed someweher on the wiki: _all_ numbers of one contact are added to the list, not just the last one. actually, the last two section address a) disabling the zhone screensaver which is probably unwanted if you run zhone from xfce b) catching an exception i've seen several times when suspending -- it slowed down suspend considerably --- zhone.orig 2008-10-26 20:31:34.0 +0100 +++ zhone.patched 2008-10-26 20:31:47.0 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python #coding=utf8 Zen Phone - A Phone UI @@ -731,6 +731,29 @@ def prepare( self ): if not self.ready and not self.busy: +file = open(/root/addressbook.vcf, r) +entries = [] +entry_nr = 1 +name = None +number = None +for line in file: +#if line.startswith(END:VCARD): +if line.startswith(TEL;): +number = unicode(line.partition(:)[2].strip()) +if name and number: +entry = entry_nr, name, number +entries.append(entry) +entry_nr = entry_nr + 1 +if line.startswith(END:VCARD): +name = None +number = None +if line.startswith(N:): +name = unicode(line.partition(:)[2].replace(';',' ').strip(), utf8, utf8) +#if line.startswith(TEL;): +#number = unicode(line.partition(:)[2].strip()) +file.close() +self.cbPhonebookReply(entries) + if dbus_object.gsm_device_obj: logger.info( retrieving phonebook... ) dbus_object.gsm_sim_iface.RetrievePhonebook( @@ -749,6 +772,7 @@ (6, u'Sulu', '+013244344'), (7, u'Chekov', '+456663443'), ] ) + def onReadyStatus( self, status ): logger.debug( SIM is ready: %s % status ) @@ -1818,7 +1842,7 @@ dbus_object.onReadyStatus.append( self.groups[contacts].onReadyStatus ) dbus_object.onReadyStatus.append( self.groups[sms].onReadyStatus ) dbus_object.onIncomingMessage.append( self.groups[sms].onIncomingMessage ) -dbus_object.onIdleStateChanged.append( self.lock_on_idle ) +#dbus_object.onIdleStateChanged.append( self.lock_on_idle ) logger.debug( GUI init done ) @@ -2182,7 +2206,10 @@ elif name+action == POWERreleased: if self.willSuspend: self.willSuspend = False +try: self.gsm_device_iface.PrepareForSuspend() +except DBusException: +logger.info( DBUSEXCEPTION ) logger.info( ENTERING SUSPEND ) os.system( apm -s ) logger.info( RETURN FROM SUSPEND ) zhone_contacts_from_vcf.patch.gz Description: GNU Zip compressed data ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: zhone patch: contacts from vcf was: Re: [debian/zhone] Send an SMS
Hi Arne, Thanks for you work. Please also have a look at the following three use cases concerning SIM contacts and address book contacts. This is an elegant way of dealing with the two. Regards, Pander arne anka wrote: below a patch for zhone to read contatcs instead from sim from /root/addressbook.vcf (what's the easiest way to determine the user's home directory from python?) main difference to the patch proposed someweher on the wiki: _all_ numbers of one contact are added to the list, not just the last one. actually, the last two section address a) disabling the zhone screensaver which is probably unwanted if you run zhone from xfce b) catching an exception i've seen several times when suspending -- it slowed down suspend considerably --- zhone.orig2008-10-26 20:31:34.0 +0100 +++ zhone.patched2008-10-26 20:31:47.0 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python #coding=utf8 Zen Phone - A Phone UI @@ -731,6 +731,29 @@ def prepare( self ): if not self.ready and not self.busy: +file = open(/root/addressbook.vcf, r) +entries = [] +entry_nr = 1 +name = None +number = None +for line in file: +#if line.startswith(END:VCARD): +if line.startswith(TEL;): +number = unicode(line.partition(:)[2].strip()) +if name and number: +entry = entry_nr, name, number +entries.append(entry) +entry_nr = entry_nr + 1 +if line.startswith(END:VCARD): +name = None +number = None +if line.startswith(N:): +name = unicode(line.partition(:)[2].replace(';',' ').strip(), utf8, utf8) +#if line.startswith(TEL;): +#number = unicode(line.partition(:)[2].strip()) +file.close() +self.cbPhonebookReply(entries) + if dbus_object.gsm_device_obj: logger.info( retrieving phonebook... ) dbus_object.gsm_sim_iface.RetrievePhonebook( @@ -749,6 +772,7 @@ (6, u'Sulu', '+013244344'), (7, u'Chekov', '+456663443'), ] ) + def onReadyStatus( self, status ): logger.debug( SIM is ready: %s % status ) @@ -1818,7 +1842,7 @@ dbus_object.onReadyStatus.append( self.groups[contacts].onReadyStatus ) dbus_object.onReadyStatus.append( self.groups[sms].onReadyStatus ) dbus_object.onIncomingMessage.append( self.groups[sms].onIncomingMessage ) -dbus_object.onIdleStateChanged.append( self.lock_on_idle ) +#dbus_object.onIdleStateChanged.append( self.lock_on_idle ) logger.debug( GUI init done ) @@ -2182,7 +2206,10 @@ elif name+action == POWERreleased: if self.willSuspend: self.willSuspend = False +try: self.gsm_device_iface.PrepareForSuspend() +except DBusException: +logger.info( DBUSEXCEPTION ) logger.info( ENTERING SUSPEND ) os.system( apm -s ) logger.info( RETURN FROM SUSPEND ) ___ 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