0.0
A long-lived project that still receives updates
Bindings for Tracker generated by GirFFI, with overrides.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 5.12
~> 13.0
~> 0.14.0
~> 1.51
~> 0.22.0

Runtime

~> 0.17.0
 Project Readme

GirFFI-Tracker

GirFFI-based bindings for Tracker

Build Status

Features

  • Auto-generated bindings using GObject introspection.
  • Adds overrides for introspection data bugs.
  • Supports Tracker 2.0 and 3.0

Install

gem install gir_ffi-tracker

Examples

With Tracker 2.0:

require "gir_ffi-tracker"

conn = Tracker::SparqlConnection.get
cursor = conn.query "SELECT nie:url(?u) WHERE { ?u a nfo:FileDataObject }"
count = 0
while cursor.next
  count += 1
  puts "Found #{cursor.get_string 0}"
end
puts "Total: #{count}"

With Tracker 3.0:

require "gir_ffi-tracker"

conn = Tracker::SparqlConnection.bus_new("org.freedesktop.Tracker3.Miner.Files")
cursor = conn.query "SELECT nie:url(?u) WHERE { ?u a nfo:FileDataObject }"
count = 0
while cursor.next
  count += 1
  puts "Found #{cursor.get_string 0}"
end
puts "Total: #{count}"

Requirements

This gem depends on the GirFFI gem and its requirements. In addition, it needs introspection data for the Tracker 2.0 or 3.0 client library.

On Debian and Ubuntu, for Tracker 2.0, try:

apt-get install gir1.2-tracker-2.0

And for Tracker 3.0:

apt-get install gir1.2-tracker-3.0

This gem has not been tested on Mac OS X or Microsoft Windows. YMMV. Pull requests to support these platforms are welcome.

License

Copyright © 2011–2016, 2018–2023 Matijs van Zuijlen

GirFFI-Tracker is free software, distributed under the terms of the GNU Lesser General Public License, version 2.1 or later. See the file COPYING.LIB for more information.