How to create contacts in Tracker programmatically?
I'm interested in storing contacts in Tracker, but I haven't been able to find documentation on this topic.
I have some questions regarding Tracker and storing contacts.
- How can I add, remove, update contacts in Tracker programmatically?
- Let's say I create a contact, which predicates I can use for contacts? (With predicates, I refer to the "subject predicate object" concept)
- Can I define my own predicates for the contacts?
- Besides GNOME Contacts, is there other applications that can interacts with the Contacts database part of Tracker?
What I've found
- I found GNOME Contacts and it seems that it can insert contacts in the Tracker triplestore, I didn't look into that, because I prefer to write my won tools. I'd be willing to write a Emacs client that could interact with Tracker.
- I found this manual page on tracker3-search and noticed that there's an option
-c
which apparently can search contacts. However, that option is not shown in the version of tracker I'm currently using (which I suppose is more up-to-date than that manual page).
$ tracker3 --version
Tracker 3.4.2
This program is free software and comes without any warranty.
It is licensed under version 2 or later of the General Public License which can be viewed at:
http://www.gnu.org/licenses/gpl.txt
$ tracker3 search
Usage:
tracker search [OPTION…] EXPRESSION
Help Options:
-h, --help Show help options
Application Options:
-f, --files Search for files
-s, --folders Search for folders
-m, --music Search for music files
--music-albums Search for music albums (--all has no effect on this)
--music-artists Search for music artists (--all has no effect on this)
-i, --images Search for image files
-v, --videos Search for video files
-t, --documents Search for document files
--software Search for software (--all has no effect on this)
--software-categories Search for software categories (--all has no effect on this)
--feeds Search for feeds (--all has no effect on this)
-l, --limit Limit the number of results shown
-o, --offset=0 Offset the results
-r, --or-operator Use OR for search terms instead of AND (the default)
-d, --detailed Show URNs for results (doesn’t apply to --music-albums, --music-artists, --feeds, --software, --software-categories)
-a, --all Return all non-existing matches too (i.e. include unmounted volumes)
--disable-snippets Disable showing snippets with results. This is only shown for some categories, e.g. Documents, Music…
--disable-fts Disable Full Text Search (FTS). Implies --disable-snippets
--disable-color Disable color when printing snippets and results
Additional information
I have very little experience using SPARQL to interact with the Tracker triplestore and I've been using Tracker for less than a week, so I'm not very familiar with this tool yet.