Using TripLibreLab

Importing a TripLibre export

TripLibreLab reads the SQLite database that TripLibre includes in every export. It opens a copy read-only, checks it, and turns it into days, trips and stops it can replay.

!

The importer is being built against TripLibre's real database. Exact table and field mappings, supported versions and error messages will be documented here once they have been verified against a real export; until then they are marked Pending.

Which file

Use travel.sqlite from a TripLibre export folder (hht-export-YYYYMMDD-HHMMSS/). It is a complete snapshot of TripLibre's database. TripLibreLab does not read the export's CSV, JSON or GeoJSON files.

A few facts about this file come from TripLibre's own documentation and do not depend on TripLibreLab:

For every table and column, see TripLibre's Data dictionary.

How the file is opened

  1. You choose itThrough the iOS Files picker. TripLibreLab cannot see any file you have not picked.
  2. It is opened read-onlyThe original export is never modified.
  3. It is checked before it is readTripLibreLab checks that the file is a SQLite database, reads its schema version, and confirms the tables it needs are present before querying anything.
  4. It is normalisedRecords are converted into the app's own model: diary days, trips, stays and track points, with dates in the right time zone.

What TripLibreLab needs from the data Pending

NeedWhyStatus
Trip and stay start and end timesTo order the day and drive the timeline.Pending
CoordinatesTo place stays and draw trips on the map.Pending
Links between trips and staysTo know where each trip started and ended.Pending
Recorded route geometry (optional)To replay the actual path. Without it, trips are drawn as schematic lines.Pending
Travel mode, place names (optional)Labels on the timeline and map.Pending

The exact source tables and columns for each row will be listed in the data contract once it has been checked against a real export.

Missing and partial data

Real diaries have gaps. The intended behaviour is:

When a file can't be read

ProblemWhat you'll see
Not a SQLite file, or damagedA message that the file could not be opened as a TripLibre database.
Unsupported schema versionA message naming the version found and the versions TripLibreLab supports, with a suggestion to update TripLibre or TripLibreLab.
A database that isn't from TripLibreA message that the tables TripLibreLab expects are missing.
An empty diaryA message that the file contains no recorded days.

Exact wording will be added once the importer is finished.