calliope.tracker

Export data from the Tracker desktop search engine.

See also: cpe tracker command.

Package Contents

Classes

TrackerClient

Helper functions for querying from the user's Tracker database.

Functions

annotate_images(tracker, playlist)

Resolve images from local media-art cache.

resolve_content(tracker, playlist)

Resolve content locations from the local filesystem.

resolve_image(tracker, playlist)

Resolve image from local media-art cache.

expand_tracks(tracker, playlist)

Expand an album item into a list of the album's tracks.

Attributes

TRACKER_INDEXER

calliope.tracker.TRACKER_INDEXER = org.freedesktop.Tracker3.Miner.Files
class calliope.tracker.TrackerClient(http_endpoint=None)

Helper functions for querying from the user’s Tracker database.

query(self, query)

Run a single SPARQL query.

Parameters

query (str) –

Return type

gi.repository.Tracker.SparqlCursor

artist_id(self, artist_name)

Return the Tracker URN for a given artist.

Parameters

artist_name (str) –

Return type

str

artist_name(self, artist_id)

Return the name of a given artist.

Parameters

artist_id (str) –

Return type

str

artists_by_number_of_songs(self, limit=None)

Return a list of artists by number of songs known.

Parameters

limit (int) –

albums(self, filter_artist_name=None, filter_album_name=None)

Return a list of releases.

Parameters
  • filter_artist_name (str) –

  • filter_album_name (str) –

track(self, artist_name, track_name)

Find a specific track by name.

Tries to find a track matching the given artist and title.

Returns a playlist entry, or None.

Parameters
  • artist_name (str) –

  • track_name (str) –

Return type

calliope.playlist.Item

tracks(self, filter_artist_name=None, filter_album_name=None)

Return a list of tracks.

Parameters
  • filter_artist_name (str) –

  • filter_album_name (str) –

Return type

calliope.playlist.Playlist

tracks_grouped_by_album(self, filter_artist_name=None, filter_album_name=None, filter_track_name=None)

Return all songs matching specific search criteria.

These are grouped into their respective releases. Any tracks that aren’t present on any releases will appear last. Any tracks that appear on multiple releases will appear multiple times.

Parameters
  • filter_artist_name (str) –

  • filter_album_name (str) –

  • filter_track_name (str) –

Return type

calliope.playlist.Playlist

artists(self)

Return all artists who have at least one track available locally.

Return type

calliope.playlist.Playlist

search(self, search_text)

Return a list of tracks which match ‘search_text’.

The text may be matched in the artist name, track title or album name.

Parameters

search_text (str) –

Return type

calliope.playlist.Playlist

calliope.tracker.annotate_images(tracker, playlist)

Resolve images from local media-art cache.

Parameters
  • tracker (TrackerClient) –

  • playlist (calliope.playlist.Playlist) –

Return type

calliope.playlist.Playlist

calliope.tracker.resolve_content(tracker, playlist)

Resolve content locations from the local filesystem.

Parameters
  • tracker (TrackerClient) –

  • playlist (calliope.playlist.Playlist) –

Return type

calliope.playlist.Playlist

calliope.tracker.resolve_image(tracker, playlist)

Resolve image from local media-art cache.

Parameters
  • tracker (TrackerClient) –

  • playlist (calliope.playlist.Playlist) –

Return type

calliope.playlist.Playlist

calliope.tracker.expand_tracks(tracker, playlist)

Expand an album item into a list of the album’s tracks.

Parameters
  • tracker (TrackerClient) –

  • playlist (calliope.playlist.Playlist) –

Return type

calliope.playlist.Playlist