Active Topics

 


Reply
Thread Tools
jvesiluoma's Avatar
Posts: 28 | Thanked: 58 times | Joined on Jan 2010
#1
Hi,

I'm trying to do a simple script that reads and lists contacts from osso-abook. So far I have found that the contacts are in /home/user/.osso-abook\db - file wich is a Berkley database file. But I haven't found any tool to read that, any suggestions how to do that? Is it possible to read contacts via dbus? If yes, then how? =)

I'm doing some nice little web interface to control N900, so far I have made a simple web interface (lighttpd + PHP) and I can read my messages and check calls via that web interface. I can also do everything that Phone_control (thanks to MohammadAG, made my scripts much simpler ) does and some tricks more via that web interface. Oh, and of course that interface is heavily password protected


// Jarkko
 
ossipena's Avatar
Posts: 3,159 | Thanked: 2,023 times | Joined on Feb 2008 @ Finland
#2
rtcom probably is just too much for a script:
http://wiki.maemo.org/Documentation/...itecture/RTCOM

have you tried reading the db with sqlite?
__________________
Want to know something?
K.I.S.S. approach:
wiki category:beginners. Browse it through and you'll be much wiser!
If the link doesn't help, just use
Google Custom Search
 
jvesiluoma's Avatar
Posts: 28 | Thanked: 58 times | Joined on Jan 2010
#3
Originally Posted by ossipena View Post
rtcom probably is just too much for a script:
http://wiki.maemo.org/Documentation/...itecture/RTCOM

have you tried reading the db with sqlite?
Dunno about rtcom, would have to read more about it, but sqlite won't read that db. But thanks anyway.

I found that there is a program called db4.7_dump that reads that db, but haven't found it for arm thought...


// Jarkko
 
schettj's Avatar
Posts: 501 | Thanked: 292 times | Joined on Nov 2009
#4
 
jvesiluoma's Avatar
Posts: 28 | Thanked: 58 times | Joined on Jan 2010
#5
Originally Posted by schettj View Post
is the tcl api available?

http://download.oracle.com/docs/cd/E...tcl_using.html

Thanks, but I can't find a working version anywhere...

Here are some screenshots what have done so far with lighttpd + php:

http://www.jmv.fi/N900/
 
ossipena's Avatar
Posts: 3,159 | Thanked: 2,023 times | Joined on Feb 2008 @ Finland
#6
in backup zip there are all the contacts within one backup.vcf -file.

don't know though if the backup thing can be run within command line.

but that would be one way to do it.
__________________
Want to know something?
K.I.S.S. approach:
wiki category:beginners. Browse it through and you'll be much wiser!
If the link doesn't help, just use
Google Custom Search
 
dchky's Avatar
Posts: 549 | Thanked: 299 times | Joined on Jun 2010 @ Australian in the Philippines
#7
Originally Posted by schettj View Post
is the tcl api available?
Unfortunately not : (

Looks like the only way is to write a small C / C++ application using libdb or libebook to get at the contacts.
 
jvesiluoma's Avatar
Posts: 28 | Thanked: 58 times | Joined on Jan 2010
#8
Originally Posted by dchky View Post
Unfortunately not : (

Looks like the only way is to write a small C / C++ application using libdb or libebook to get at the contacts.

Ok, have to do that then. Thanks.
 
Posts: 67 | Thanked: 36 times | Joined on May 2010 @ Claremont (LA), California
#9
Since I back up with rsync to my desktop and laptop, I have a copy of the DB on a machine that has db_dump. I found that "db_dump -p" gives a series of vcards encoded one per line. It wouldn't be hard to parse those further using a tool like awk or python.

Now that I think about it, Python has a Berkeley DB access library (bsddb), although I don't know if it's available for Maemo.

Jarkko, what kind of tool are you imagining? I.e., are you thinking "lookup_contact --home-phone Joe" would print out Joe's home phone number? (I'm thinking that if somebody writes a tool, it would be good to try to make it flexible so other people can use it in unanticipated ways.)
 

The Following User Says Thank You to gkuenning For This Useful Post:
jvesiluoma's Avatar
Posts: 28 | Thanked: 58 times | Joined on Jan 2010
#10
Originally Posted by gkuenning View Post
Since I back up with rsync to my desktop and laptop, I have a copy of the DB on a machine that has db_dump. I found that "db_dump -p" gives a series of vcards encoded one per line. It wouldn't be hard to parse those further using a tool like awk or python.

Now that I think about it, Python has a Berkeley DB access library (bsddb), although I don't know if it's available for Maemo.

Jarkko, what kind of tool are you imagining? I.e., are you thinking "lookup_contact --home-phone Joe" would print out Joe's home phone number? (I'm thinking that if somebody writes a tool, it would be good to try to make it flexible so other people can use it in unanticipated ways.)
Yeah, I found that I can make that dump on my desktop computer, but I would like to make this dynamic, so I can fetch contacts on the fly.

As far as I know, bsddb is not available for maemo. At least it is not included as default and quick search didn't give any results either.

Just simple export, like "dump_contacs -name -phonenumber -email -db addressbook.db" that exports contacts, for example "John Doe 123456789 john.doe@something.com". That way output could be parsed and maybe some other ppl would find some other use to that tool also.

If I have time, I'll start to write that kind of app...but I'll guess it will take some time. Busy at work nowdays...

Regards,
Jarkko

Last edited by jvesiluoma; 2010-08-19 at 07:16.
 
Reply


 
Forum Jump


All times are GMT. The time now is 16:42.