Ask / Submit
2

access contacts command line?

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

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
2

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

tigeli gravatar image

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

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 +0200 )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 +0200 )edit

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

maddler ( 2014-06-03 22:00:38 +0200 )edit
0

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

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 +0200 )edit
Login/Signup to Answer

Question tools

Follow
5 followers

Stats

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

Seen: 372 times

Last updated: Jun 03 '14