We have moved to a new Sailfish OS Forum. Please start new discussions there.
2

access contacts command line?

asked 2014-06-03 21:13:35 +0300

maddler gravatar image

Is there a way to acces/query contacts from command line? I know that's a hackish question ;)

edit retag flag offensive close delete

2 Answers

Sort by » oldest newest most voted
0

answered 2014-06-03 21:55:08 +0300

VDVsx gravatar image

Yes, there's contacts-tool, note that you need to be privileged user in order to read the database(devel-su -p )

edit flag offensive delete publish link more

Comments

Cheers! But I thing the sqlite way best matches what I'm planning to do.

maddler ( 2014-06-03 22:02:40 +0300 )edit
2

answered 2014-06-03 21:41:03 +0300

tigeli gravatar image

updated 2014-06-03 21:51:52 +0300

Yes.

From terminal:

  1. devel-su -p
  2. sqlite3 /home/nemo/.local/share/system/privileged/Contacts/qtcontacts-sqlite/contacts.db "select * from contacts;"
edit flag offensive delete publish link more

Comments

almost perfect, but no phone numbers.

maddler ( 2014-06-03 21:45:56 +0300 )edit

Well you can do something like this:

sqlite3 /home/nemo/.local/share/system/privileged/Contacts/qtcontacts-sqlite/contacts.db "select * from phonenumbers where contactId=38;"

and that contactId is the first column from contacts-table (select * from contacts;).

tigeli ( 2014-06-03 21:55:33 +0300 )edit

Oh, sweet! Didn't realized it was a more complex data structure! Cheers for that mate!

maddler ( 2014-06-03 22:00:38 +0300 )edit
Login/Signup to Answer

Question tools

Follow
5 followers

Stats

Asked: 2014-06-03 21:13:35 +0300

Seen: 585 times

Last updated: Jun 03 '14