summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* build: Depend on meson >= 0.55Carlos Garnacho2023-02-271-1/+1
| | | | We'll use some features from there.
* examples: Plug leak in exampleCarlos Garnacho2022-10-231-0/+3
| | | | | Also, explicitly use tracker_sparql_cursor_close() to make it a better example.
* Make tracker:endpoint test work on macOSDaniele Nicolodi2021-04-191-4/+5
| | | | | | | | | | | | | | | | | | The symptom on my system are that the test fails to run because gi cannot find the shared library object for Tracker. This is due to the fact that $LD_LIBRARY_PATH is set by Meson but removed from the environment by the time the test is running. This is because the examples/python/endpoint.py scripts which uses '!#/usr/bin/env python' as a shebang and on macOS the env utility removes dynamic linker variables from the environment. Fix this by explicitly using python to execute the script. Use this opportunity for restructure how the Python installation and executable is looked up in the build definition: use the 'python' Meson module to lock for a suitable python in the main meson.build. Also, the test setup does not set $TRACKER_LANGUAGE_STOP_WORDS_DIR to point to the stop words directory in the source directory. Fix it.
* examples: Add READMEsam/examplesSam Thursfield2020-12-171-0/+6
|
* examples: Add endpoint exampleSam Thursfield2020-12-173-0/+102
|
* examples: Move Python query examples to tracker-miners.Sam Thursfield2020-12-172-34/+0
| | | | These query the Miner FS, so they should go with it.
* examples: Remove all-async.py querySam Thursfield2020-12-171-30/+0
| | | | It's not clear how this is different from query-async.py.
* examples: Remove miner exampleSam Thursfield2020-12-171-43/+0
| | | | libtracker-miner is private in Tracker 3.
* examples: Remove flatpak exampleSam Thursfield2020-12-171-32/+0
| | | | There's a more complete example in tracker-miners.git.
* examples: Rename `introspection/python` -> `python`Sam Thursfield2020-12-174-0/+0
|
* examples: Add example flatpak definitionCarlos Garnacho2020-07-171-0/+32
| | | | | | | | | | | | | This doesn't do much, just builds tracker inside a sandbox, but does handle limiting access to certain graphs, and lets you do your own queries/endpoint within the sandbox. It does rely on matching Tracker 3.x services and portal running in the host. With everything in place, queries to the FS miner will go through the portal, and be limited to the Tracker3 policies defined in the .flatpak-info file. This is done through --add-policy on "flatpak build finish" as per the manifest, but can also be influenced at "flatpak run" time for further testing.
* Remove unused ontologiesSam Thursfield2020-05-011-4/+0
| | | | | | | | | | | | | | All of these are unused within tracker-miners, and as far as we know they are also unused in GNOME. Each ontology has a cost on database size and on time to create a new database, so it's good to limit these as much as we can. Alternatives: - nid3: use nmm ontology - ncal, scal: use evolution-data-server as GNOME Calendar does - mlo: use slo ontology
* Update ontology URLs for 3.0Sam Thursfield2020-04-221-9/+9
| | | | | | | | | | | | | | | Our ontology URLs now use a namespace that we manage, at http://tracker.api.gnome.org/. This domain won't expire and can redirect anywhere we want, so that it can always link to the correct documentation for the ontologies. We are going to continue using the Nepomuk name in the ontologies that were developed by the Nepomuk project, despite changing the URL. This way we acknowledge that we have downstream changes to the Nepomuk ontologies but still provide a link to the original shared vocabularies. Fixes https://gitlab.gnome.org/GNOME/tracker/-/issues/162 and https://gitlab.gnome.org/GNOME/tracker/-/issues/104
* examples: Update DBus names in rss-reader exampleCarlos Garnacho2020-04-053-12/+12
| | | | To no avail. It's still hopelessly outdated :(.
* utils: Update references to tracker miners' DBus namesCarlos Garnacho2020-04-051-1/+1
| | | | It's bumping to org.freedesktop.Tracker3.*
* Allow 'open with existing ontology', disable automatic re-indexingSam Thursfield2020-04-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | When the CLI tools open an existing database, the user shouldn't need to specify which ontology to use as the database was already configured with an ontology. These tools can now pass %NULL to the @ontology argument of tracker_sparql_connection_new() to mean "use the existing ontologies". Previously %NULL meant "use the Nepomuk" ontologies. This is now achieved by passing the result of tracker_sparql_get_ontology_nepomuk() for the @ontology parameter. As part of this, I removed the "automatic reindexing" feature of libtracker-data. This feature would delete the database if it detected corruption or a version mismatch, however, that only makes sense for tracker-miner-fs where the data can be recreated from the filesystem. For other usecases this feature is dangerous and should not be happening implicitly -- we now just raise an error in cases of corruption or version mismatches. Closes https://gitlab.gnome.org/GNOME/tracker/issues/192
* examples: Change async connection example to use local connectionCarlos Garnacho2020-02-171-2/+13
| | | | Just for the sake of keeping everything async.
* examples: Drop class-signal example codeCarlos Garnacho2020-02-172-121/+0
| | | | | | This example essentially demonstrates GraphUpdated DBus signals, which are deemed an internal API detail. An example using TrackerNotifier might be useful, but this code isn't much salvageable to be repurposed.
* libtracker-miner: Drop libtracker-miner as a public libraryCarlos Garnacho2019-12-126-269/+0
| | | | | | | | | | | According to Debian code search, it's accumulated 0 users outside of tracker-miners. If everyone is relying on either tracker-miner-fs/rss or implementing their own minimal abstraction (TrackerMinerFS is a complex object, but the others are all fairly shallow), it does not make sense to drag this as public API anymore. This code moves into tracker-miners, and every user is expected to consume and insert data using the sparql library.
* Stop translating an example appPiotr Drąg2018-09-091-2/+2
|
* build: Drop autotoolswip/carlosg/drop-autotoolsCarlos Garnacho2018-09-094-50/+0
|
* libtracker-miner: Remove TrackerMinerFS API to add/remove directoriesCarlos Garnacho2017-06-291-1/+7
| | | | | | | The whole set of tracker_miner_fs_add_directory_without_parent(), tracker_miner_fs_directory_add(), directory_remove() and directory_remove_full() are all covered by TrackerIndexingTree and basically unused, except for code in examples/.
* libtracker-miner: Change API of ::process-file[-attributes]Carlos Garnacho2017-06-291-1/+2
| | | | | | | | | | | | | | | | | | | There's a few changes here: - The 2 vmethods are now given a GTask, its cancellable is to be used if the handling goes async. - tracker_miner_fs_file_notify() has changed into a more generic tracker_miner_fs_notify_finish() method, that takes such GTask and completes it. - The vmethods are no longer given a TrackerSparqlBuilder, instead they are expected to create the SPARQL through whatever mean is most fit. The sparql is given in the tracker_miner_fs_notify_finish() func. This opens the door to TrackerMinerFS implementations using TrackerResource. The intent is 1) Pass something to these vmethods that the user can't forge or mess with, as matching on GFile relies that it's the same pointer that it was given in the vmethods. And 2) Make the finish() function more generic to be fit to other methods going async.
* Remove ignore_next_update() APICarlos Garnacho2017-06-291-4/+0
| | | | | | | It's been deprecated for a long time, it stands in the middle of detaching TrackerMiner from DBus, and it's one less piece of ontology-dependent libtracker-miner code. Enough reasons to finally remove this.
* Distribute meson.build files in tarballs generated by AutotoolsSam Thursfield2017-05-223-0/+6
| | | | | | | This is useful for people who are not building from Git but still want to avoid Autotools. See: https://mail.gnome.org/archives/desktop-devel-list/2017-April/msg00091.html
* Meson build instructions for TrackerSam Thursfield2017-05-223-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See <http://mesonbuild.com/> for information about Meson. Remaining issues: * There's no `make dist` equivalent. We currently produce release tarballs containing the output files of the Vala compiler. We need to think through whether we can stop doing that. Shipping the generated .c files does make the Vala preprocessor useless so it would be good if we can stop. * The Firefox, Thunderbird, Evolution and Nautilus plugins are not built * https://github.com/mesonbuild/meson/issues/671 -- means we can't depend on tracker_common_dep in most places and have to manually set link_with, include_directories and sources instead. * https://github.com/mesonbuild/meson/issues/1469 -- without this we have to install generated Vala headers using a script * https://github.com/mesonbuild/meson/issues/1229 -- means adding the #include guard to libtracker-sparql/tracker-generated-no-checks.h is a pain * The test suite has some spurious failures. Here's a rough speed comparison. Meson: time sh -c 'meson .. --prefix=/opt/tracker-meson -D bash_completion=/opt/tracker-meson/share/bash-completion -Dsystemd_user_services=/opt/tracker-meson/lib/systemd/user -Ddbus_services=/opt/tracker-meson/share/dbus-1/services && ninja-build -j 4 && ninja-build install' real 1m8.194s user 2m16.962s sys 0m20.532s Autotools: time sh -c './configure --prefix=/opt/tracker-autotools --with-bash-completion-dir=/opt/tracker-autotools/share/bash-completion --with-session-bus-services-dir=/opt/tracker-autotools/share/dbus-1/services --disable-nautilus-extension && make -j 4 && make install' real 2m37.750s user 4m37.214s sys 0m54.806s Plus 30+ seconds of ./autogen.sh first. Note that Meson builds may fail if your source tree has generated files from an Autotools build in there. If you see errors about duplicate definitions, first try cleaning your source tree (use `git clean -dfx`, but make sure you commit any work first!!)
* examples: Check tracker_sparql_cursor_next() return value.Carlos Garnacho2017-01-301-2/+1
| | | | Coverity ID: 1188420
* examples: Drop unneeded g_object_unref() callCarlos Garnacho2017-01-301-4/+0
| | | | | | Another one. Coverity ID: 1188470
* examples: Check for NULL cursors in class-signal exampleCarlos Garnacho2017-01-281-0/+9
| | | | | | | It is unlikely to receive errors on queries there, but still this is an example, so better be correct there. Coverity ID: 1188420
* examples: Drop unneeded g_object_unref() callCarlos Garnacho2017-01-281-5/+0
| | | | | | The cursor will be NULL in the error paths, no need to try to unref it. Coverity ID: 1188470
* examples: Update example FS miner to current APISam Thursfield2016-11-212-135/+48
| | | | The code didn't work at all due to API changes in libtracker-miner.
* libtracker-extract: Remove from examples/ this library is now privateMartyn Russell2014-07-215-368/+0
|
* libtracker-sparql: Don't use internal tracker_ipc_bus() function in examples/Martyn Russell2014-03-201-3/+1
| | | | | | We don't want people copying this code and then having linking problems and 3rd party apps using libtracker-sparql shouldn't be depending on internal functions or libraries like libtracker-common.
* all: Make GBusType configurable with TRACKER_BUS_TYPEMartyn Russell2014-03-171-1/+3
| | | | | | This works by using G_BUS_TYPE_SESSION if the env var TRACKER_BUS_TYPE is not set and will allow for "system" to be used as a value. If it is set, the system bus is used instead.
* libtracker-extract: Fix example mockup.rule file, we no longer include ↵Martyn Russell2014-02-251-1/+1
| | | | @modulesdir@
* libtracker-extract: Don't break compilation due to missing rules/modules dirMartyn Russell2014-02-252-9/+5
|
* libtracker-extract: Make this a package-private libraryMichael Biebl2014-02-241-1/+1
| | | | | | | Don't install libtracker-extract system-wide and don't generate any introspection data. This is a follow-up commit to 60fdc9b900ae1c66a65721c8314e8cc3358ca461
* tests: Updated gtester scripts to improve testing systemMartyn Russell2014-02-205-10/+0
| | | | | | | | | | | | | | | We imported Makefile.decl from glib when it was using Subversion, a long time ago. The script had a few issues (like running all unit tests twice on make distcheck) and needed to be updated. I've stolen a latest version from GLib's glib.mk and also their m4 macros which are required to make this all work too. This gives us the advantage of defining installable and uninstallable test cases as well as test data, scripts and other useful stuff. The debug output also looks quite good. And distcheck passes :)
* libtracker-extract, tracker-extract: Remove $modulesdir from *.rulesDebarshi Ray2013-10-101-3/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=709703
* Add a newline at the end of fileDebarshi Ray2013-10-101-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=709703
* all: Remove use of g_type_init() now it's deprecated in GLib since 2.35.xMartyn Russell2013-03-083-5/+0
|
* examples: Update async query exampleMartyn Russell2012-11-281-1/+1
|
* libtracker-extract: Fix mockup example which unrefs TrackerExtractInfo->GFileMartyn Russell2011-12-151-2/+1
| | | | This is not returned as a new reference.
* Remove g_thread_init callsJürg Billeter2011-11-271-4/+0
| | | | | | Calling g_thread_init with GLib 2.31 requires explicit dependency on gthread-2.0. However, g_type_init initializes threads since GLib 2.24, so it is no longer needed.
* examples/libtracker-extract: Fix mockup example's API usagePhilip Van Hoof2011-09-061-7/+6
|
* build: Fixed distcheck issuesMartyn Russell2011-08-161-1/+1
|
* libtracker-extract: Don't install examples/ rules mock upMartyn Russell2011-08-031-2/+5
| | | | | This was causing the MP3 extractor to be used even if the MP3 rules file was removed because the mockup uses a similar configuration
* libtracker-miner, libtracker-sparql: Added introspection examplesIvan Frade2011-04-054-0/+111
| | | | | Miner and Async query are not working as expected yet, but the code should be correct.
* libtracker-sparql: Use static linking instead of pluginsJürg Billeter2011-04-043-3/+3
| | | | | | | | | Plugin loading in threads may be problematic in certain environments. As we do not currently support external plugins anyway, this changes libtracker-bus and libtracker-direct to be part of libtracker-sparql. This will also slightly improve initialization performance. Fixes NB#241659.
* tracker-extract: Support extra string for WHERE patterns in GetMetadataJürg Billeter2011-03-281-1/+2
|