add datasources to gpslogger/google_takeout

This commit is contained in:
Sean Breckenridge 2023-02-16 02:25:15 -08:00
parent 36beab5f17
commit fdfd22bef2
2 changed files with 7 additions and 1 deletions

View file

@ -23,7 +23,12 @@ def locations() -> Iterator[Location]:
for g in events():
if isinstance(g, GoogleLocation):
yield Location(
lon=g.lng, lat=g.lat, dt=g.dt, accuracy=g.accuracy, elevation=None
lon=g.lng,
lat=g.lat,
dt=g.dt,
accuracy=g.accuracy,
elevation=None,
datasource="google_takeout",
)

View file

@ -65,6 +65,7 @@ def _extract_locations(path: Path) -> Iterator[Location]:
accuracy=config.accuracy,
elevation=point.elevation,
dt=datetime.replace(point.time, tzinfo=timezone.utc),
datasource="gpslogger",
)