From 05080e720a3947f8b1ea1411f34b53446cb5161d Mon Sep 17 00:00:00 2001 From: heyarne Date: Thu, 3 Jun 2021 11:57:14 +0200 Subject: [PATCH 01/19] Set up `nix develop` to work with nix flakes --- flake.lock | 42 ++++++++++++++++++++++++++++++++++++++++++ flake.nix | 25 +++++++++++++++++++++++++ shell.nix | 25 +++++++++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 shell.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..85302d9 --- /dev/null +++ b/flake.lock @@ -0,0 +1,42 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1622445595, + "narHash": "sha256-m+JRe6Wc5OZ/mKw2bB3+Tl0ZbtyxxxfnAWln8Q5qs+Y=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "7d706970d94bc5559077eb1a6600afddcd25a7c8", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1622702532, + "narHash": "sha256-XAIvN+XyobDs8PmpwAO3Bto2zJBFAdTCNsjh6bBpH9g=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b42f9c725475e85d014dede34eaa7aaf1483b223", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f4e5d61 --- /dev/null +++ b/flake.nix @@ -0,0 +1,25 @@ +{ + description = "Automated deployment of my datasette instance."; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem + (system: + let pkgs = nixpkgs.legacyPackages.${system}; in + { + devShell = import ./shell.nix { inherit pkgs; }; + } + ); + # outputs = { self, nixpkgs, flake-utils, ... }: + # flake-utils.lib.eachDefaultSystem + # (system: + # let pkgs.legacyPackages.${system}; in + # { + # devShell = import ./shell.nix { inherit pkgs; }; + # } + # ); +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..a4dd6f3 --- /dev/null +++ b/shell.nix @@ -0,0 +1,25 @@ +{ pkgs ? import { } }: + +let + lib = pkgs.lib; +in pkgs.mkShell rec { + name = "datasette"; + buildInputs = with pkgs; [ + sqlite + libspatialite + spatialite_tools + rlwrap + + datasette + ]; + + LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}"; + + shellHook = '' + datasette \ + --load-extension=mod_spatialite.so \ + -m metadata.yml -h 0.0.0.0 --cors --setting default_cache_ttl 1800 \ + --immutable dbs/*.db + datasette dbs/* + ''; +} From a8e558b3d5a24dc55b5e89cd6608838a816e9b84 Mon Sep 17 00:00:00 2001 From: heyarne Date: Fri, 11 Jun 2021 10:31:08 +0200 Subject: [PATCH 02/19] Single build output: Earth.db with cumulative CO2 emissions --- default.nix | 15 +++++++++++++++ importers/owid.sh | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 default.nix create mode 100644 importers/owid.sh diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..4fa4396 --- /dev/null +++ b/default.nix @@ -0,0 +1,15 @@ +{ pkgs ? import {} }: +let + name = "earth"; + builder = ./importers/owid.sh; + src = ./sources/cumulative_co2_emissions.csv; + + csvsToSqlite = pkgs.csvs-to-sqlite; +in + pkgs.stdenv.mkDerivation { + name = "${name}.db"; + inherit src; + inherit builder; + + inherit csvsToSqlite; + } diff --git a/importers/owid.sh b/importers/owid.sh new file mode 100644 index 0000000..45eed2d --- /dev/null +++ b/importers/owid.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +${csvsToSqlite}/bin/csvs-to-sqlite \ + --shape 'Entity:entity(text),Code:code(text),Year:year(integer),Cumulative CO2 emissions:cumulative_co2_emissions(real)' \ + --index entity \ + --index code \ + --index year \ + --replace-tables \ + $src $out From 743ab70eee974aa9ed934e79b32be01a7688c427 Mon Sep 17 00:00:00 2001 From: heyarne Date: Fri, 11 Jun 2021 16:59:19 +0200 Subject: [PATCH 03/19] Use manual build process in org-file for now for more flexibility --- .envrc | 1 + default.nix | 15 --------------- flake.lock | 19 ++++++++++++++++++- flake.nix | 36 ++++++++++++++++++++++++++---------- shell.nix | 25 ------------------------- 5 files changed, 45 insertions(+), 51 deletions(-) create mode 100644 .envrc delete mode 100644 default.nix delete mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/default.nix b/default.nix deleted file mode 100644 index 4fa4396..0000000 --- a/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ pkgs ? import {} }: -let - name = "earth"; - builder = ./importers/owid.sh; - src = ./sources/cumulative_co2_emissions.csv; - - csvsToSqlite = pkgs.csvs-to-sqlite; -in - pkgs.stdenv.mkDerivation { - name = "${name}.db"; - inherit src; - inherit builder; - - inherit csvsToSqlite; - } diff --git a/flake.lock b/flake.lock index 85302d9..e56d912 100644 --- a/flake.lock +++ b/flake.lock @@ -30,10 +30,27 @@ "type": "github" } }, + "owid-co2-data": { + "flake": false, + "locked": { + "lastModified": 1612965128, + "narHash": "sha256-F9Qb+wGbJ8x/k1gT+C/GyXBHi1XxFnoqyHkuy6oslU0=", + "owner": "owid", + "repo": "co2-data", + "rev": "5ce76ff7269c024e12c6554bf041eca68babaf2c", + "type": "github" + }, + "original": { + "owner": "owid", + "repo": "co2-data", + "type": "github" + } + }, "root": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "owid-co2-data": "owid-co2-data" } } }, diff --git a/flake.nix b/flake.nix index f4e5d61..0b582dc 100644 --- a/flake.nix +++ b/flake.nix @@ -4,22 +4,38 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs"; flake-utils.url = "github:numtide/flake-utils"; + + # data sources + owid-co2-data = { + # TODO Include these two files: + # - https://github.com/owid/co2-data/blob/master/owid-co2-data.csv + # - https://github.com/owid/co2-data/blob/master/owid-co2-codebook.csv + url = "github:owid/co2-data"; + flake = false; + }; }; - outputs = { self, nixpkgs, flake-utils }: + outputs = { self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; in { - devShell = import ./shell.nix { inherit pkgs; }; + devShell = + let + lib = pkgs.lib; + in pkgs.mkShell rec { + name = "datasette"; + buildInputs = with pkgs; [ + sqlite + libspatialite + spatialite_tools + rlwrap + + datasette + ]; + + LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}"; + }; } ); - # outputs = { self, nixpkgs, flake-utils, ... }: - # flake-utils.lib.eachDefaultSystem - # (system: - # let pkgs.legacyPackages.${system}; in - # { - # devShell = import ./shell.nix { inherit pkgs; }; - # } - # ); } diff --git a/shell.nix b/shell.nix deleted file mode 100644 index a4dd6f3..0000000 --- a/shell.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ pkgs ? import { } }: - -let - lib = pkgs.lib; -in pkgs.mkShell rec { - name = "datasette"; - buildInputs = with pkgs; [ - sqlite - libspatialite - spatialite_tools - rlwrap - - datasette - ]; - - LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}"; - - shellHook = '' - datasette \ - --load-extension=mod_spatialite.so \ - -m metadata.yml -h 0.0.0.0 --cors --setting default_cache_ttl 1800 \ - --immutable dbs/*.db - datasette dbs/* - ''; -} From 9983def2431aaa20ea6230ecf298a9da5afcc94e Mon Sep 17 00:00:00 2001 From: heyarne Date: Mon, 8 Aug 2022 23:44:44 +0200 Subject: [PATCH 04/19] Commit all uncommitted changes --- .gitignore | 3 + README.org | 747 +++++++++++++++++++++++++++++++++++++++++++++++ flake.lock | 18 +- flake.nix | 11 +- poetry.lock | 544 ++++++++++++++++++++++++++++++++++ pyproject.toml | 19 ++ requirements.txt | 2 + 7 files changed, 1333 insertions(+), 11 deletions(-) create mode 100644 .gitignore create mode 100644 poetry.lock create mode 100644 pyproject.toml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6d3d3d1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/.venv/ +/*.json +/*.db diff --git a/README.org b/README.org index 50dd41c..7905607 100644 --- a/README.org +++ b/README.org @@ -61,6 +61,753 @@ csvs-to-sqlite \ #+RESULTS: : Loaded 1 dataframes : Added 1 CSV file to dbs/earth.db +*** Stroll + +This database is created from a series of GPX file which I track on my phone using [[https://f-droid.org/en/packages/net.osmand.plus/][Osmand]]. They are in turn synced to my Odroid HC2 to which I have access from wherever. + +#+name: target_db +strolling.db + +**** Fetching *.gpx files + +#+begin_src bash +mkdir -p sources/strolling +rsync -srv arne@timbre.arnes.space:osmand-tracks/rec/ sources/strolling/ +#+end_src + +#+RESULTS: +#+begin_example +receiving incremental file list +2019-06/2019-06-09_11-54_Sun.gpx +2019-06/2019-06-09_19-22_Sun.gpx +2019-06/2019-06-10_11-57_Mon.gpx +2019-06/2019-06-17_19-56_Mon.gpx +2019-06/2019-06-26_07-54_Wed.gpx +2019-06/2019-06-27_12-26_Thu.gpx +2019-06/Kanufahrt auf der Lahn.gpx +2019-08/2019-08-16_08-15_Fri.gpx +2019-08/2019-08-20_08-42_Tue.gpx +2019-08/2019-08-22_08-21_Thu.gpx +2019-08/2019-08-22_14-15_Thu.gpx +2019-08/2019-08-23_09-00_Fri.gpx +2019-08/2019-08-24_08-42_Sat.gpx +2019-08/2019-08-24_18-07_Sat.gpx +2019-08/2019-08-25_10-39_Sun.gpx +2019-08/2019-08-25_23-37_Sun.gpx +2019-08/2019-08-26_12-25_Mon.gpx +2019-08/2019-08-27_06-28_Tue.gpx +2019-08/2019-08-27_09-07_Tue.gpx +2019-08/2019-08-27_19-53_Tue.gpx +2019-08/2019-08-28_08-26_Wed.gpx +2019-08/2019-08-28_11-33_Wed.gpx +2019-09/2019-09-02_18-19_Mon.gpx +2019-09/2019-09-04_07-36_Wed.gpx +2019-09/2019-09-19_08-31_Thu.gpx +2019-09/2019-09-21_11-30_Sat.gpx +2019-09/2019-09-29_16-52_Sun.gpx +2019-09/2019-09-29_18-54_Sun.gpx +2019-10/2019-10-02_08-42_Wed.gpx +2019-10/2019-10-02_08-57_Wed.gpx +2019-10/2019-10-03_14-04_Thu.gpx +2019-10/2019-10-09_09-05_Wed.gpx +2019-10/2019-10-12_09-57_Sat.gpx +2019-10/2019-10-14_19-46_Mon.gpx +2019-10/2019-10-14_19-58_Mon.gpx +2019-10/2019-10-18_08-49_Fri.gpx +2019-10/2019-10-29_09-56_Tue.gpx +2019-10/2019-10-31_07-45_Thu.gpx +2019-11/2019-11-01_19-19_Fri.gpx +2019-11/2019-11-08_09-57_Fri.gpx +2019-11/2019-11-09_10-21_Sat.gpx +2019-11/2019-11-13_09-17_Wed.gpx +2019-12/2019-12-04_18-49_Wed.gpx +2019-12/2019-12-07_09-25_Sat.gpx +2019-12/2019-12-12_07-50_Thu.gpx +2019-12/2019-12-18_07-59_Wed.gpx +2019-12/2019-12-20_08-47_Fri.gpx +2020-01/2020-01-02_20-31_Thu.gpx +2020-01/2020-01-06_13-48_Mon.gpx +2020-01/2020-01-09_20-10_Thu.gpx +2020-01/2020-01-12_09-48_Sun.gpx +2020-01/2020-01-15_07-45_Wed.gpx +2020-01/2020-01-17_08-28_Fri.gpx +2020-01/2020-01-20_09-43_Mon.gpx +2020-01/2020-01-22_07-38_Wed.gpx +2020-01/2020-01-27_09-35_Mon.gpx +2020-01/2020-01-31_07-21_Fri.gpx +2020-02/2020-02-01_10-54_Sat.gpx +2020-02/2020-02-04_08-01_Tue.gpx +2020-02/2020-02-23_11-52_Sun.gpx +2020-02/2020-02-24_09-17_Mon.gpx +2020-02/2020-02-26_09-03_Wed.gpx +2020-03/2020-03-02_10-00_Mon.gpx +2020-03/2020-03-04_08-43_Wed.gpx +2020-03/2020-03-06_08-59_Fri.gpx +2020-03/2020-03-09_08-46_Mon.gpx +2020-03/2020-03-11_08-07_Wed.gpx +2020-03/2020-03-14_11-41_Sat.gpx +2020-03/2020-03-16_09-20_Mon.gpx +2020-03/2020-03-18_09-31_Wed.gpx +2020-03/2020-03-19_14-11_Thu.gpx +2020-03/2020-03-20_09-13_Fri.gpx +2020-03/2020-03-22_10-57_Sun.gpx +2020-03/2020-03-23_09-11_Mon.gpx +2020-03/2020-03-24_17-27_Tue.gpx +2020-03/2020-03-25_18-37_Wed.gpx +2020-03/2020-03-26_08-53_Thu.gpx +2020-03/2020-03-28_11-22_Sat.gpx +2020-03/2020-03-30_08-12_Mon.gpx +2020-04/2020-04-01_08-52_Wed.gpx +2020-04/2020-04-03_08-18_Fri.gpx +2020-04/2020-04-05_12-58_Sun.gpx +2020-04/2020-04-07_16-48_Tue.gpx +2020-04/2020-04-08_07-52_Wed.gpx +2020-04/2020-04-10_08-49_Fri.gpx +2020-04/2020-04-11_11-57_Sat.gpx +2020-04/2020-04-12_10-43_Sun_2.gpx +2020-04/2020-04-14_09-02_Tue.gpx +2020-04/2020-04-17_09-15_Fri.gpx +2020-04/2020-04-18_11-42_Sat.gpx +2020-04/2020-04-19_10-24_Sun.gpx +2020-04/2020-04-21_08-45_Tue.gpx +2020-04/2020-04-23_08-51_Thu.gpx +2020-04/2020-04-24_12-40_Fri.gpx +2020-04/2020-04-27_10-31_Mon.gpx +2020-04/2020-04-29_16-14_Wed.gpx +2020-05/2020-05-06_07-15_Wed.gpx +2020-05/2020-05-08_11-54_Fri.gpx +2020-05/2020-05-08_12-36_Fri.gpx +2020-05/2020-05-09_12-41_Sat.gpx +2020-05/2020-05-11_18-27_Mon.gpx +2020-05/2020-05-12_19-26_Tue.gpx +2020-05/2020-05-13_09-01_Wed.gpx +2020-05/2020-05-18_15-52_Mon.gpx +2020-05/2020-05-20_09-04_Wed.gpx +2020-05/2020-05-23_11-16_Sat.gpx +2020-05/2020-05-25_09-09_Mon.gpx +2020-05/2020-05-27_09-08_Wed.gpx +2020-05/2020-05-29_08-40_Fri.gpx +2020-06/2020-06-01_11-14_Mon.gpx +2020-06/2020-06-03_08-50_Wed.gpx +2020-06/2020-06-06_11-21_Sat.gpx +2020-06/2020-06-10_09-00_Wed.gpx +2020-06/2020-06-11_19-53_Thu.gpx +2020-06/2020-06-15_19-19_Mon.gpx +2020-06/2020-06-19_08-46_Fri.gpx +2020-06/2020-06-22_09-36_Mon.gpx +2020-06/2020-06-24_10-18_Wed.gpx +2020-06/2020-06-24_16-35_Wed.gpx +2020-06/2020-06-26_09-31_Fri.gpx +2020-06/2020-06-29_08-49_Mon.gpx +2020-06/2020-06-30_09-13_Tue.gpx +2020-06/2020-06-30_09-55_Tue.gpx +2020-07/2020-07-01_10-51_Wed.gpx +2020-07/2020-07-01_16-04_Wed.gpx +2020-07/2020-07-02_09-29_Thu.gpx +2020-07/2020-07-02_18-26_Thu.gpx +2020-07/2020-07-03_11-38_Fri.gpx +2020-07/2020-07-03_18-00_Fri.gpx +2020-07/2020-07-04_10-57_Sat.gpx +2020-07/2020-07-05_09-43_Sun.gpx +2020-07/2020-07-07_07-50_Tue.gpx +2020-07/2020-07-10_08-41_Fri.gpx +2020-07/2020-07-12_11-20_Sun.gpx +2020-07/2020-07-14_08-48_Tue.gpx +2020-07/2020-07-16_08-51_Thu.gpx +2020-07/2020-07-17_07-25_Fri.gpx +2020-07/2020-07-19_01-24_Sun.gpx +2020-07/2020-07-20_08-54_Mon.gpx +2020-07/2020-07-20_11-12_Mon.gpx +2020-07/2020-07-21_07-05_Tue.gpx +2020-07/2020-07-24_08-26_Fri.gpx +2020-07/2020-07-24_09-53_Fri.gpx +2020-07/2020-07-24_11-18_Fri.gpx +2020-07/2020-07-24_12-38_Fri.gpx +2020-07/2020-07-27_09-06_Mon.gpx +2020-07/2020-07-29_07-26_Wed.gpx +2020-07/2020-07-31_08-51_Fri.gpx +2020-08/2020-08-01_20-01_Sat.gpx +2020-08/2020-08-04_09-24_Tue.gpx +2020-08/2020-08-06_08-36_Thu.gpx +2020-08/2020-08-19_08-48_Wed.gpx +2020-09/2020-09-08_13-52_Tue.gpx +2020-09/2020-09-09_11-31_Wed.gpx +2020-09/2020-09-09_12-18_Wed.gpx +2020-10/2020-10-12_00-14_Mon.gpx +2020-10/2020-10-12_11-17_Mon.gpx +2020-10/2020-10-20_09-41_Tue.gpx +2020-10/2020-10-24_08-55_Sat.gpx +2020-10/2020-10-24_20-08_Sat.gpx +2020-10/2020-10-25_12-56_Sun.gpx +2020-10/2020-10-26_09-32_Mon.gpx +2020-10/2020-10-26_12-27_Mon.gpx +2020-10/2020-10-26_21-16_Mon.gpx +2020-10/2020-10-27_08-58_Tue.gpx +2020-10/2020-10-27_12-32_Tue.gpx +2020-10/2020-10-28_10-36_Wed.gpx +2020-10/2020-10-28_11-56_Wed.gpx +2020-10/2020-10-28_13-00_Wed.gpx +2020-10/2020-10-29_17-23_Thu.gpx +2020-10/2020-10-29_21-20_Thu.gpx +2020-10/2020-10-31_14-37_Sat.gpx +2020-11/2020-11-01_13-00_Sun.gpx +2020-11/2020-11-02_10-23_Mon.gpx +2020-11/2020-11-03_10-01_Tue.gpx +2020-11/2020-11-03_14-17_Tue.gpx +2020-11/2020-11-03_16-30_Tue.gpx +2020-11/2020-11-03_17-25_Tue.gpx +2020-11/2020-11-03_17-44_Tue.gpx +2020-11/2020-11-03_19-28_Tue.gpx +2020-11/2020-11-04_10-34_Wed.gpx +2020-11/2020-11-04_18-22_Wed.gpx +2020-11/2020-11-06_19-50_Fri.gpx +2020-11/2020-11-07_11-12_Sat.gpx +2020-11/2020-11-07_12-53_Sat.gpx +2020-11/2020-11-09_10-48_Mon.gpx +2020-11/2020-11-09_20-38_Mon.gpx +2020-11/2020-11-11_10-13_Wed.gpx +2020-11/2020-11-11_12-50_Wed.gpx +2020-11/2020-11-11_15-13_Wed.gpx +2020-11/2020-11-11_15-58_Wed.gpx +2020-11/2020-11-11_18-54_Wed.gpx +2020-11/2020-11-13_19-44_Fri.gpx +2020-11/2020-11-14_14-11_Sat.gpx +2020-11/2020-11-14_18-58_Sat.gpx +2020-11/2020-11-16_11-06_Mon.gpx +2020-11/2020-11-16_15-11_Mon.gpx +2020-11/2020-11-17_11-30_Tue.gpx +2020-11/2020-11-17_19-21_Tue.gpx +2020-11/2020-11-18_10-05_Wed.gpx +2020-11/2020-11-18_12-40_Wed.gpx +2020-11/2020-11-18_15-36_Wed.gpx +2020-11/2020-11-18_19-58_Wed.gpx +2020-11/2020-11-19_08-35_Thu.gpx +2020-11/2020-11-20_20-13_Fri.gpx +2020-11/2020-11-21_11-07_Sat.gpx +2020-11/2020-11-21_12-18_Sat.gpx +2020-11/2020-11-22_14-41_Sun.gpx +2020-11/2020-11-24_09-08_Tue.gpx +2020-11/2020-11-24_11-17_Tue.gpx +2020-11/2020-11-24_18-20_Tue.gpx +2020-11/2020-11-25_10-10_Wed.gpx +2020-11/2020-11-25_12-06_Wed.gpx +2020-11/2020-11-25_14-07_Wed.gpx +2020-11/2020-11-25_20-14_Wed.gpx +2020-11/2020-11-26_09-04_Thu.gpx +2020-11/2020-11-27_09-13_Fri.gpx +2020-11/2020-11-28_11-31_Sat.gpx +2020-11/2020-11-29_12-25_Sun.gpx +2020-12/2020-12-01_08-19_Tue.gpx +2020-12/2020-12-01_11-11_Tue.gpx +2020-12/2020-12-01_19-02_Tue.gpx +2020-12/2020-12-02_10-08_Wed.gpx +2020-12/2020-12-02_12-42_Wed.gpx +2020-12/2020-12-03_09-02_Thu.gpx +2020-12/2020-12-03_19-49_Thu.gpx +2020-12/2020-12-03_22-08_Thu.gpx +2020-12/2020-12-04_20-30_Fri.gpx +2020-12/2020-12-05_02-14_Sat.gpx +2020-12/2020-12-05_15-05_Sat.gpx +2020-12/2020-12-05_17-32_Sat.gpx +2020-12/2020-12-05_19-52_Sat.gpx +2020-12/2020-12-06_12-39_Sun.gpx +2020-12/2020-12-06_16-46_Sun.gpx +2020-12/2020-12-06_18-08_Sun.gpx +2020-12/2020-12-08_08-46_Tue.gpx +2020-12/2020-12-09_10-16_Wed.gpx +2020-12/2020-12-09_11-46_Wed.gpx +2020-12/2020-12-12_20-44_Sat.gpx +2020-12/2020-12-13_04-28_Sun.gpx +2020-12/2020-12-13_15-01_Sun.gpx +2020-12/2020-12-15_08-45_Tue.gpx +2020-12/2020-12-15_12-11_Tue.gpx +2020-12/2020-12-16_20-02_Wed.gpx +2020-12/2020-12-17_08-10_Thu.gpx +2020-12/2020-12-17_09-45_Thu.gpx +2020-12/2020-12-18_08-52_Fri.gpx +2020-12/2020-12-20_11-26_Sun.gpx +2020-12/2020-12-20_13-22_Sun.gpx +2020-12/2020-12-20_14-04_Sun.gpx +2020-12/2020-12-20_21-45_Sun.gpx +2020-12/2020-12-20_23-31_Sun.gpx +2020-12/2020-12-21_08-53_Mon.gpx +2020-12/2020-12-21_12-56_Mon.gpx +2020-12/2020-12-22_18-14_Tue.gpx +2020-12/2020-12-23_16-13_Wed.gpx +2020-12/2020-12-24_10-45_Thu.gpx +2020-12/2020-12-26_09-13_Sat.gpx +2020-12/2020-12-27_18-18_Sun.gpx +2020-12/2020-12-27_18-53_Sun.gpx +2020-12/2020-12-27_19-24_Sun.gpx +2020-12/2020-12-28_10-18_Mon.gpx +2020-12/2020-12-28_16-40_Mon.gpx +2020-12/2020-12-29_13-17_Tue.gpx +2020-12/2020-12-29_14-00_Tue.gpx +2020-12/2020-12-30_10-15_Wed.gpx +2020-12/2020-12-30_15-41_Wed.gpx +2020-12/2020-12-31_15-15_Thu.gpx +2020-12/2020-12-31_17-21_Thu.gpx +2021-01/2021-01-03_11-21_Sun.gpx +2021-01/2021-01-04_19-39_Mon.gpx +2021-01/2021-01-04_23-59_Mon.gpx +2021-01/2021-01-05_08-43_Tue.gpx +2021-01/2021-01-05_11-16_Tue.gpx +2021-01/2021-01-05_15-46_Tue.gpx +2021-01/2021-01-06_09-35_Wed.gpx +2021-01/2021-01-06_11-24_Wed.gpx +2021-01/2021-01-06_18-47_Wed.gpx +2021-01/2021-01-07_10-03_Thu.gpx +2021-01/2021-01-09_10-10_Sat.gpx +2021-01/2021-01-09_19-09_Sat.gpx +2021-01/2021-01-09_20-29_Sat.gpx +2021-01/2021-01-10_14-11_Sun.gpx +2021-01/2021-01-10_19-41_Sun.gpx +2021-01/2021-01-10_21-02_Sun.gpx +2021-01/2021-01-11_09-02_Mon.gpx +2021-01/2021-01-12_12-05_Tue.gpx +2021-01/2021-01-12_17-59_Tue.gpx +2021-01/2021-01-13_09-41_Wed.gpx +2021-01/2021-01-13_11-37_Wed.gpx +2021-01/2021-01-13_20-57_Wed.gpx +2021-01/2021-01-14_08-46_Thu.gpx +2021-01/2021-01-15_08-26_Fri.gpx +2021-01/2021-01-15_09-30_Fri.gpx +2021-01/2021-01-16_13-40_Sat.gpx +2021-01/2021-01-17_13-27_Sun.gpx +2021-01/2021-01-17_14-55_Sun.gpx +2021-01/2021-01-17_16-45_Sun.gpx +2021-01/2021-01-19_08-55_Tue.gpx +2021-01/2021-01-20_09-46_Wed.gpx +2021-01/2021-01-20_11-36_Wed.gpx +2021-01/2021-01-21_09-00_Thu.gpx +2021-01/2021-01-22_09-07_Fri.gpx +2021-01/2021-01-23_08-19_Sat.gpx +2021-01/2021-01-23_09-42_Sat.gpx +2021-01/2021-01-24_11-39_Sun.gpx +2021-01/2021-01-25_09-56_Mon.gpx +2021-01/2021-01-25_11-03_Mon.gpx +2021-01/2021-01-25_19-53_Mon.gpx +2021-01/2021-01-25_22-54_Mon.gpx +2021-01/2021-01-26_08-46_Tue.gpx +2021-01/2021-01-27_20-19_Wed.gpx +2021-01/2021-01-28_09-08_Thu.gpx +2021-01/2021-01-30_10-54_Sat.gpx +2021-01/2021-01-31_11-24_Sun.gpx +2021-02/2021-02-03_09-43_Wed.gpx +2021-02/2021-02-09_08-11_Tue.gpx +2021-02/2021-02-09_10-47_Tue.gpx +2021-02/2021-02-09_18-57_Tue.gpx +2021-02/2021-02-10_12-39_Wed.gpx +2021-02/2021-02-10_19-48_Wed.gpx +2021-02/2021-02-11_11-09_Thu.gpx +2021-02/2021-02-12_10-56_Fri.gpx +2021-02/2021-02-12_19-45_Fri.gpx +2021-02/2021-02-13_12-02_Sat.gpx +2021-02/2021-02-14_12-08_Sun.gpx +2021-02/2021-02-14_18-33_Sun.gpx +2021-02/2021-02-15_11-00_Mon.gpx +2021-02/2021-02-16_19-33_Tue.gpx +2021-02/2021-02-17_04-19_Wed.gpx +2021-02/2021-02-17_11-53_Wed.gpx +2021-02/2021-02-17_19-52_Wed.gpx +2021-02/2021-02-18_09-11_Thu.gpx +2021-02/2021-02-18_19-35_Thu.gpx +2021-02/2021-02-19_10-15_Fri.gpx +2021-02/2021-02-19_17-29_Fri.gpx +2021-02/2021-02-21_10-31_Sun.gpx +2021-02/2021-02-21_19-27_Sun.gpx +2021-02/2021-02-21_21-08_Sun.gpx +2021-02/2021-02-22_10-00_Mon.gpx +2021-02/2021-02-22_11-03_Mon.gpx +2021-02/2021-02-22_20-33_Mon.gpx +2021-02/2021-02-23_08-31_Tue.gpx +2021-02/2021-02-23_10-45_Tue.gpx +2021-02/2021-02-23_19-24_Tue.gpx +2021-02/2021-02-23_22-03_Tue.gpx +2021-02/2021-02-24_11-15_Wed.gpx +2021-02/2021-02-25_09-03_Thu.gpx +2021-02/2021-02-25_10-25_Thu.gpx +2021-02/2021-02-26_10-21_Fri.gpx +2021-02/2021-02-26_19-15_Fri.gpx +2021-03/2021-03-01_08-43_Mon.gpx +2021-03/2021-03-01_10-38_Mon.gpx +2021-03/2021-03-02_09-54_Tue.gpx +2021-03/2021-03-02_19-15_Tue.gpx +2021-03/2021-03-03_08-34_Wed.gpx +2021-03/2021-03-03_11-35_Wed.gpx +2021-03/2021-03-03_18-15_Wed.gpx +2021-03/2021-03-04_09-26_Thu.gpx +2021-03/2021-03-04_20-04_Thu.gpx +2021-03/2021-03-05_08-34_Fri.gpx +2021-03/2021-03-05_10-22_Fri.gpx +2021-03/2021-03-05_19-03_Fri.gpx +2021-03/2021-03-05_20-19_Fri.gpx +2021-03/2021-03-06_04-31_Sat.gpx +2021-03/2021-03-06_19-15_Sat.gpx +2021-03/2021-03-07_13-56_Sun.gpx +2021-03/2021-03-08_10-57_Mon.gpx +2021-03/2021-03-08_16-14_Mon.gpx +2021-03/2021-03-08_19-12_Mon.gpx +2021-03/2021-03-09_08-49_Tue.gpx +2021-03/2021-03-09_09-40_Tue.gpx +2021-03/2021-03-09_19-46_Tue.gpx +2021-03/2021-03-10_08-55_Wed.gpx +2021-03/2021-03-10_11-22_Wed.gpx +2021-03/2021-03-10_18-34_Wed.gpx +2021-03/2021-03-11_09-01_Thu.gpx +2021-03/2021-03-11_20-25_Thu.gpx +2021-03/2021-03-12_07-35_Fri.gpx +2021-03/2021-03-12_09-18_Fri.gpx +2021-03/2021-03-12_19-59_Fri.gpx +2021-03/2021-03-13_07-53_Sat.gpx +2021-03/2021-03-14_16-21_Sun.gpx +2021-03/2021-03-15_10-24_Mon.gpx +2021-03/2021-03-15_18-53_Mon.gpx +2021-03/2021-03-16_08-50_Tue.gpx +2021-03/2021-03-16_10-05_Tue.gpx +2021-03/2021-03-16_19-37_Tue.gpx +2021-03/2021-03-18_08-36_Thu.gpx +2021-03/2021-03-18_09-40_Thu.gpx +2021-03/2021-03-18_10-35_Thu.gpx +2021-03/2021-03-19_15-31_Fri.gpx +2021-03/2021-03-19_20-34_Fri.gpx +2021-03/2021-03-19_21-07_Fri.gpx +2021-03/2021-03-20_05-15_Sat.gpx +2021-03/2021-03-20_11-30_Sat.gpx +2021-03/2021-03-21_13-23_Sun.gpx +2021-03/2021-03-21_16-46_Sun.gpx +2021-03/2021-03-21_19-51_Sun.gpx +2021-03/2021-03-22_12-55_Mon.gpx +2021-03/2021-03-23_09-03_Tue.gpx +2021-03/2021-03-24_20-10_Wed.gpx +2021-03/2021-03-25_08-46_Thu.gpx +2021-03/2021-03-26_08-59_Fri.gpx +2021-03/2021-03-26_10-31_Fri.gpx +2021-03/2021-03-26_18-43_Fri.gpx +2021-03/2021-03-27_17-12_Sat.gpx +2021-03/2021-03-27_20-10_Sat.gpx +2021-03/2021-03-28_15-05_Sun.gpx +2021-03/2021-03-29_08-54_Mon.gpx +2021-03/2021-03-30_10-04_Tue.gpx +2021-03/2021-03-30_20-00_Tue.gpx +2021-03/2021-03-31_08-25_Wed.gpx +2021-04/2021-04-01_08-45_Thu.gpx +2021-04/2021-04-02_16-09_Fri.gpx +2021-04/2021-04-03_13-34_Sat.gpx +2021-04/2021-04-04_12-00_Sun.gpx +2021-04/2021-04-06_08-35_Tue.gpx +2021-04/2021-04-08_09-34_Thu.gpx +2021-04/2021-04-08_12-42_Thu.gpx +2021-04/2021-04-09_08-30_Fri.gpx +2021-04/2021-04-09_18-44_Fri.gpx +2021-04/2021-04-10_15-13_Sat.gpx +2021-04/2021-04-10_22-42_Sat.gpx +2021-04/2021-04-11_12-26_Sun.gpx +2021-04/2021-04-12_08-50_Mon.gpx +2021-04/2021-04-12_13-15_Mon.gpx +2021-04/2021-04-12_19-49_Mon.gpx +2021-04/2021-04-13_08-47_Tue.gpx +2021-04/2021-04-13_13-20_Tue.gpx +2021-04/2021-04-13_16-36_Tue.gpx +2021-04/2021-04-13_20-54_Tue.gpx +2021-04/2021-04-14_08-46_Wed.gpx +2021-04/2021-04-14_12-26_Wed.gpx +2021-04/2021-04-14_19-59_Wed.gpx +2021-04/2021-04-15_08-41_Thu.gpx +2021-04/2021-04-15_17-51_Thu.gpx +2021-04/2021-04-16_08-42_Fri.gpx +2021-04/2021-04-18_12-11_Sun.gpx +2021-04/2021-04-18_17-49_Sun.gpx +2021-04/2021-04-19_09-13_Mon.gpx +2021-04/2021-04-20_08-40_Tue.gpx +2021-04/2021-04-20_10-57_Tue.gpx +2021-04/2021-04-20_20-15_Tue.gpx +2021-04/2021-04-22_08-41_Thu.gpx +2021-04/2021-04-23_08-43_Fri.gpx +2021-04/2021-04-24_16-55_Sat.gpx +2021-04/2021-04-25_11-50_Sun.gpx +2021-04/2021-04-25_20-27_Sun.gpx +2021-04/2021-04-26_05-29_Mon.gpx +2021-04/2021-04-26_11-49_Mon.gpx +2021-04/2021-04-27_08-38_Tue.gpx +2021-04/2021-04-28_08-40_Wed.gpx +2021-04/2021-04-29_08-38_Thu.gpx +2021-04/2021-04-29_19-29_Thu.gpx +2021-04/2021-04-30_10-14_Fri.gpx +2021-04/2021-04-30_17-36_Fri.gpx +2021-04/2021-04-30_17-52_Fri.gpx +2021-05/2021-05-03_09-49_Mon.gpx +2021-05/2021-05-03_11-33_Mon.gpx +2021-05/2021-05-10_10-21_Mon.gpx +2021-05/2021-05-10_13-38_Mon.gpx +2021-05/2021-05-10_15-09_Mon.gpx +2021-05/2021-05-11_09-49_Tue.gpx +2021-05/2021-05-11_10-18_Tue.gpx +2021-05/2021-05-13_15-08_Thu.gpx +2021-05/2021-05-15_10-00_Sat.gpx +2021-05/2021-05-19_09-05_Wed.gpx +2021-05/2021-05-21_08-50_Fri.gpx +2021-05/2021-05-23_09-44_Sun.gpx +2021-05/2021-05-24_10-27_Mon.gpx +2021-05/2021-05-25_09-10_Tue.gpx +2021-05/2021-05-25_11-45_Tue.gpx +2021-05/2021-05-25_14-25_Tue.gpx +2021-05/2021-05-26_14-52_Wed.gpx +2021-05/2021-05-26_19-10_Wed.gpx +2021-05/2021-05-27_08-44_Thu.gpx +2021-05/2021-05-29_11-01_Sat.gpx +2021-05/2021-05-29_11-11_Sat.gpx +2021-05/2021-05-31_08-57_Mon.gpx +2021-05/2021-05-31_13-37_Mon.gpx +2021-05/2021-05-31_15-33_Mon.gpx +2021-06/2021-06-02_08-52_Wed.gpx +2021-06/2021-06-03_07-25_Thu.gpx +2021-06/2021-06-04_08-49_Fri.gpx +2021-06/2021-06-07_08-45_Mon.gpx +2021-06/2021-06-12_08-19_Sat.gpx +2021-06/2021-06-12_08-57_Sat.gpx +2021-06/2021-06-15_20-34_Tue.gpx +2021-06/2021-06-16_08-40_Wed.gpx +2021-06/2021-06-18_08-45_Fri.gpx +2021-06/2021-06-18_14-04_Fri.gpx +2021-06/2021-06-18_15-44_Fri.gpx +2021-06/2021-06-21_14-01_Mon.gpx +2021-06/2021-06-22_08-21_Tue.gpx +2021-06/2021-06-25_08-50_Fri.gpx +2021-06/2021-06-29_09-08_Tue.gpx +2021-06/2021-06-29_10-34_Tue.gpx +2021-06/2021-06-29_18-22_Tue.gpx +2021-06/2021-06-30_09-52_Wed.gpx +2021-07/2021-07-02_09-03_Fri.gpx +2021-07/2021-07-02_11-27_Fri.gpx +2021-07/2021-07-02_11-56_Fri.gpx +2021-07/2021-07-06_08-24_Tue.gpx +2021-07/2021-07-11_12-17_Sun.gpx +2021-07/2021-07-11_19-10_Sun.gpx +2021-07/2021-07-12_19-02_Mon.gpx +2021-07/2021-07-13_07-28_Tue.gpx +2021-07/2021-07-13_18-24_Tue.gpx +2021-07/2021-07-14_14-38_Wed.gpx +2021-07/2021-07-14_18-48_Wed.gpx +2021-07/2021-07-15_09-38_Thu.gpx +2021-07/2021-07-15_15-07_Thu.gpx +2021-07/2021-07-16_10-22_Fri.gpx +2021-07/2021-07-16_10-51_Fri.gpx +2021-07/2021-07-16_17-29_Fri.gpx +2021-07/2021-07-17_00-37_Sat.gpx +2021-07/2021-07-17_11-19_Sat.gpx +2021-07/2021-07-18_13-58_Sun.gpx +2021-07/2021-07-18_15-24_Sun.gpx +2021-07/2021-07-19_21-45_Mon.gpx +2021-07/2021-07-20_09-38_Tue.gpx +2021-07/2021-07-21_09-31_Wed.gpx +2021-07/2021-07-21_17-46_Wed.gpx +2021-07/2021-07-22_09-43_Thu.gpx +2021-07/2021-07-22_11-47_Thu.gpx +2021-07/2021-07-23_08-31_Fri.gpx +2021-07/2021-07-26_08-56_Mon.gpx +2021-07/2021-07-29_09-26_Thu.gpx +2021-07/2021-07-29_11-08_Thu.gpx +2021-07/2021-07-30_10-22_Fri.gpx +2021-08/2021-08-01_17-48_Sun.gpx +2021-08/2021-08-01_23-19_Sun.gpx +2021-08/2021-08-02_09-10_Mon.gpx +2021-08/2021-08-02_11-53_Mon.gpx +2021-08/2021-08-03_14-05_Tue.gpx +2021-08/2021-08-04_13-19_Wed.gpx +2021-08/2021-08-05_09-30_Thu.gpx +2021-08/2021-08-05_18-00_Thu.gpx +2021-08/2021-08-05_19-19_Thu.gpx +2021-08/2021-08-06_09-06_Fri.gpx +2021-08/2021-08-07_11-34_Sat.gpx +2021-08/2021-08-08_12-10_Sun.gpx +2021-08/2021-08-08_16-40_Sun.gpx +2021-08/2021-08-08_17-48_Sun.gpx +2021-08/2021-08-08_18-25_Sun.gpx +2021-08/2021-08-08_19-19_Sun.gpx +2021-08/2021-08-09_10-05_Mon.gpx +2021-08/2021-08-09_18-58_Mon.gpx +2021-08/2021-08-10_09-43_Tue.gpx +2021-08/2021-08-11_08-27_Wed.gpx +2021-08/2021-08-11_10-18_Wed.gpx +2021-08/2021-08-11_16-50_Wed.gpx +2021-08/2021-08-12_09-39_Thu.gpx +2021-08/2021-08-12_11-17_Thu.gpx +2021-08/2021-08-26_08-10_Thu.gpx +2021-08/2021-08-26_19-46_Thu.gpx +2021-08/2021-08-27_11-03_Fri.gpx +2021-08/2021-08-28_10-13_Sat.gpx +2021-08/2021-08-28_10-19_Sat.gpx +2021-08/2021-08-30_10-20_Mon.gpx +2021-09/2021-09-01_09-46_Wed.gpx +2021-09/2021-09-02_11-16_Thu.gpx +2021-09/2021-09-02_19-08_Thu.gpx +2021-09/2021-09-03_17-24_Fri.gpx +2021-09/2021-09-03_20-05_Fri.gpx +2021-09/2021-09-04_09-27_Sat.gpx +2021-09/2021-09-07_10-11_Tue.gpx +2021-09/2021-09-08_18-54_Wed.gpx +2021-09/2021-09-08_21-07_Wed.gpx +2021-09/2021-09-09_08-36_Thu.gpx +2021-09/2021-09-09_09-40_Thu.gpx +2021-09/2021-09-09_11-15_Thu.gpx +2021-09/2021-09-10_11-02_Fri.gpx +2021-09/2021-09-10_12-20_Fri.gpx +2021-09/2021-09-10_12-23_Fri.gpx +2021-09/2021-09-11_11-23_Sat.gpx +2021-09/2021-09-12_17-04_Sun.gpx +2021-09/2021-09-12_20-08_Sun.gpx +2021-09/2021-09-13_09-00_Mon.gpx +2021-09/2021-09-14_10-14_Tue.gpx +2021-09/2021-09-16_09-19_Thu.gpx +2021-09/2021-09-18_22-16_Sat.gpx +2021-09/2021-09-19_19-17_Sun.gpx +2021-09/2021-09-20_16-15_Mon.gpx +2021-09/2021-09-21_20-24_Tue.gpx +2021-09/2021-09-22_10-47_Wed.gpx +2021-09/2021-09-23_08-23_Thu.gpx +2021-09/2021-09-23_09-41_Thu.gpx +2021-09/2021-09-27_07-59_Mon.gpx +2021-09/2021-09-27_08-22_Mon.gpx +2021-09/2021-09-27_08-30_Mon.gpx +2021-09/2021-09-29_09-36_Wed.gpx +2021-09/2021-09-29_13-35_Wed.gpx +2021-09/2021-09-30_10-35_Thu.gpx +2021-09/2021-09-30_12-31_Thu.gpx +2021-09/2021-09-30_17-59_Thu.gpx +2021-10/ +2021-10/2021-10-01_12-10_Fri.gpx +2021-10/2021-10-06_08-58_Wed.gpx +2021-10/2021-10-06_13-37_Wed.gpx +2021-10/2021-10-06_15-23_Wed.gpx +2021-10/2021-10-07_19-57_Thu.gpx +2021-10/2021-10-09_13-38_Sat.gpx +2021-10/2021-10-11_07-51_Mon.gpx +2021-10/2021-10-12_17-13_Tue.gpx +2021-10/2021-10-12_21-03_Tue.gpx +2021-10/2021-10-13_08-59_Wed.gpx +2021-10/2021-10-14_10-37_Thu.gpx +2021-10/2021-10-15_09-00_Fri.gpx +2021-10/2021-10-17_09-34_Sun.gpx +2021-10/2021-10-19_08-49_Tue.gpx +2021-10/2021-10-19_20-16_Tue.gpx +2021-10/2021-10-20_10-09_Wed.gpx +2021-10/2021-10-21_10-29_Thu.gpx +2021-10/2021-10-21_11-57_Thu.gpx +2021-10/2021-10-25_19-10_Mon.gpx +2021-10/2021-10-25_21-25_Mon.gpx +2021-10/2021-10-26_08-56_Tue.gpx +2021-10/2021-10-26_18-04_Tue.gpx +2021-10/2021-10-28_10-34_Thu.gpx +2021-10/2021-10-28_12-33_Thu.gpx +2021-10/2021-10-28_20-34_Thu.gpx +2021-10/2021-10-29_08-30_Fri.gpx +2021-10/2021-10-30_11-06_Sat.gpx +2021-10/2021-10-30_11-57_Sat.gpx +2021-10/2021-10-30_14-32_Sat.gpx +2021-10/2021-10-30_18-33_Sat.gpx +2021-10/2021-10-31_10-30_Sun.gpx +2021-11/ +2021-11/2021-11-01_12-02_Mon.gpx +2021-11/2021-11-01_16-47_Mon.gpx +2021-11/2021-11-03_09-39_Wed.gpx +2021-11/2021-11-03_16-56_Wed.gpx +2021-11/2021-11-03_22-23_Wed.gpx +2021-11/2021-11-05_09-43_Fri.gpx +2021-11/2021-11-10_13-58_Wed.gpx +2021-11/2021-11-11_10-34_Thu.gpx +2021-11/2021-11-11_12-24_Thu.gpx +2021-11/2021-11-11_19-42_Thu.gpx +2021-11/2021-11-12_11-00_Fri.gpx +2021-11/2021-11-15_08-39_Mon.gpx +2021-11/2021-11-15_19-31_Mon.gpx +2021-11/2021-11-16_08-34_Tue.gpx +2021-11/2021-11-17_09-50_Wed.gpx +2021-11/2021-11-17_16-34_Wed.gpx +2021-11/2021-11-17_21-05_Wed.gpx +2021-11/2021-11-17_22-51_Wed.gpx +2021-11/2021-11-18_10-58_Thu.gpx +2021-11/2021-11-18_18-20_Thu.gpx +2021-11/2021-11-19_09-34_Fri.gpx +2021-11/2021-11-19_13-17_Fri.gpx +2021-11/2021-11-22_19-42_Mon.gpx +2021-11/2021-11-22_22-37_Mon.gpx +2021-11/2021-11-23_09-35_Tue.gpx +2021-11/2021-11-24_09-17_Wed.gpx +2021-11/2021-11-25_10-42_Thu.gpx +2021-11/2021-11-25_12-10_Thu.gpx +2021-11/2021-11-26_09-34_Fri.gpx +2021-11/2021-11-26_19-38_Fri.gpx +2021-11/2021-11-27_10-11_Sat.gpx +2021-12/ +2021-12/2021-12-01_09-19_Wed.gpx +2021-12/2021-12-02_10-40_Thu.gpx +2021-12/2021-12-02_12-02_Thu.gpx +2021-12/2021-12-03_12-26_Fri.gpx +2021-12/2021-12-03_17-07_Fri.gpx +2021-12/2021-12-04_13-27_Sat.gpx +2021-12/2021-12-06_09-02_Mon.gpx +2021-12/2021-12-10_08-21_Fri.gpx +2021-12/2021-12-10_09-28_Fri.gpx +2021-12/2021-12-10_12-33_Fri.gpx +2021-12/2021-12-11_17-01_Sat.gpx + +sent 314,939 bytes received 5,364,990 bytes 2,271,971.60 bytes/sec +total size is 40,339,623 speedup is 7.10 +#+end_example + +**** Importing *.gpx files + +This takes a while. + +#+begin_src bash :results none :var target_db=target_db +# rm "$target_db" +for f in sources/strolling/**/*.gpx; do + spatialite_xml_load -x "$f" -d strolling.db +done +#+end_src + +#+RESULTS: + +**** Selecting some GPX tracks with metadata on individual points + +- Note that we ignore `extensions_heading`. +- hdop = horizontal dilution of precision ([[https://en.wikipedia.org/wiki/Dilution_of_precision_(navigation)][info]]) + +#+name: points_query +#+begin_src sql +select + t.node_id track_id, + seg.node_id segment_id, + pt.node_id pt_id, + time.node_value timestamp, + AsWkt(ST_GeomFromText( + 'POINT('||pt.lon||' '||pt.lat||')', + 4326 + )) geom, + ele.node_value elevation, + speed.node_value speed, + hdop.node_value hdop +from gpx_trk t +join gpx_trk_trkseg seg + on t.node_id = seg.parent_id +join gpx_trk_trkseg_trkpt pt + on seg.node_id = pt.parent_id +join gpx_trk_trkseg_trkpt_time time + on pt.node_id = time.parent_id +join gpx_trk_trkseg_trkpt_ele ele + on pt.node_id = ele.parent_id +join gpx_trk_trkseg_trkpt_extensions_speed speed + on pt.node_id = speed.parent_id +join gpx_trk_trkseg_trkpt_hdop hdop + on pt.node_id = hdop.parent_id; +#+end_src + +#+begin_src fish :noweb yes +echo <> | sed 's/;/ limit 10;/' | spatialite -csv strolling.db +#+end_src + +#+RESULTS: ** Pitalls diff --git a/flake.lock b/flake.lock index e56d912..f7d35d5 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "flake-utils": { "locked": { - "lastModified": 1622445595, - "narHash": "sha256-m+JRe6Wc5OZ/mKw2bB3+Tl0ZbtyxxxfnAWln8Q5qs+Y=", + "lastModified": 1629481132, + "narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=", "owner": "numtide", "repo": "flake-utils", - "rev": "7d706970d94bc5559077eb1a6600afddcd25a7c8", + "rev": "997f7efcb746a9c140ce1f13c72263189225f482", "type": "github" }, "original": { @@ -17,11 +17,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1622702532, - "narHash": "sha256-XAIvN+XyobDs8PmpwAO3Bto2zJBFAdTCNsjh6bBpH9g=", + "lastModified": 1631127891, + "narHash": "sha256-osQLTGIVFZDoBBRNDFkX4yQp0wU/0SUZMJYQBRq3cfg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b42f9c725475e85d014dede34eaa7aaf1483b223", + "rev": "40d49815f227c88407c2f450c30dc06a40c8b5de", "type": "github" }, "original": { @@ -33,11 +33,11 @@ "owid-co2-data": { "flake": false, "locked": { - "lastModified": 1612965128, - "narHash": "sha256-F9Qb+wGbJ8x/k1gT+C/GyXBHi1XxFnoqyHkuy6oslU0=", + "lastModified": 1628314826, + "narHash": "sha256-4v5+s1NGKSoHw/2YEXMKLSq/gVcv1DaBIeiaxzHN/4s=", "owner": "owid", "repo": "co2-data", - "rev": "5ce76ff7269c024e12c6554bf041eca68babaf2c", + "rev": "5b90be92e082cd03ace3d64338bd0538b025a06c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 0b582dc..b9d57fe 100644 --- a/flake.nix +++ b/flake.nix @@ -18,8 +18,14 @@ outputs = { self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system: - let pkgs = nixpkgs.legacyPackages.${system}; in - { + let + pkgs = nixpkgs.legacyPackages.${system}; + # myApp = pkgs.poetry2nix.mkPoetryApplication { + # # this contains a python interpreter and datasette with addons + # projectDir = ./.; + # python = pkgs.python38; + # }; + in { devShell = let lib = pkgs.lib; @@ -32,6 +38,7 @@ rlwrap datasette + python39 ]; LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}"; diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..2e81b2f --- /dev/null +++ b/poetry.lock @@ -0,0 +1,544 @@ +[[package]] +name = "aiofiles" +version = "0.7.0" +description = "File support for asyncio." +category = "main" +optional = false +python-versions = ">=3.6,<4.0" + +[[package]] +name = "anyio" +version = "3.3.0" +description = "High level compatibility layer for multiple asynchronous event loop implementations" +category = "main" +optional = false +python-versions = ">=3.6.2" + +[package.dependencies] +idna = ">=2.8" +sniffio = ">=1.1" + +[package.extras] +doc = ["sphinx-rtd-theme", "sphinx-autodoc-typehints (>=1.2.0)"] +test = ["coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "pytest (>=6.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (<0.15)", "mock (>=4)", "uvloop (>=0.15)"] +trio = ["trio (>=0.16)"] + +[[package]] +name = "asgi-csrf" +version = "0.9" +description = "ASGI middleware for protecting against CSRF attacks" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +itsdangerous = "*" +python-multipart = "*" + +[package.extras] +test = ["pytest", "pytest-asyncio", "httpx (>=0.16)", "starlette", "pytest-cov", "asgi-lifespan"] + +[[package]] +name = "asgiref" +version = "3.3.4" +description = "ASGI specs, helper code, and adapters" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.extras] +tests = ["pytest", "pytest-asyncio", "mypy (>=0.800)"] + +[[package]] +name = "certifi" +version = "2021.5.30" +description = "Python package for providing Mozilla's CA Bundle." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "charset-normalizer" +version = "2.0.4" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +category = "main" +optional = false +python-versions = ">=3.5.0" + +[package.extras] +unicode_backport = ["unicodedata2"] + +[[package]] +name = "click" +version = "8.0.1" +description = "Composable command line interface toolkit" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + +[[package]] +name = "click-default-group" +version = "1.2.2" +description = "Extends click.Group to invoke a command without explicit subcommand name" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +click = "*" + +[[package]] +name = "colorama" +version = "0.4.4" +description = "Cross-platform colored terminal text." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "datasette" +version = "0.57.1" +description = "An open source multi-tool for exploring and publishing data" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +aiofiles = ">=0.4,<0.8" +asgi-csrf = ">=0.6" +asgiref = ">=3.2.10,<3.4.0" +click = ">=7.1.1,<8.1.0" +click-default-group = ">=1.2.2,<1.3.0" +httpx = ">=0.17" +hupper = ">=1.9,<2.0" +itsdangerous = ">=1.1,<3.0" +janus = ">=0.4,<0.7" +Jinja2 = ">=2.10.3,<3.1.0" +mergedeep = ">=1.1.1,<1.4.0" +pint = ">=0.9,<1.0" +pluggy = ">=0.13.0,<0.14.0" +python-baseconv = "1.2.2" +PyYAML = ">=5.3,<6.0" +uvicorn = ">=0.11,<1.0" + +[package.extras] +docs = ["sphinx-rtd-theme", "sphinx-autobuild"] +test = ["pytest (>=5.2.2,<6.3.0)", "pytest-xdist (>=2.2.1,<2.3)", "pytest-asyncio (>=0.10,<0.16)", "beautifulsoup4 (>=4.8.1,<4.10.0)", "black (==21.5b2)", "pytest-timeout (>=1.4.2,<1.5)", "trustme (>=0.7,<0.8)"] + +[[package]] +name = "h11" +version = "0.12.0" +description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "httpcore" +version = "0.13.6" +description = "A minimal low-level HTTP client." +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +anyio = ">=3.0.0,<4.0.0" +h11 = ">=0.11,<0.13" +sniffio = ">=1.0.0,<2.0.0" + +[package.extras] +http2 = ["h2 (>=3,<5)"] + +[[package]] +name = "httpx" +version = "0.19.0" +description = "The next generation HTTP client." +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +certifi = "*" +charset-normalizer = "*" +httpcore = ">=0.13.3,<0.14.0" +rfc3986 = {version = ">=1.3,<2", extras = ["idna2008"]} +sniffio = "*" + +[package.extras] +brotli = ["brotlicffi", "brotli"] +http2 = ["h2 (>=3,<5)"] + +[[package]] +name = "hupper" +version = "1.10.3" +description = "Integrated process monitor for developing and reloading daemons." +category = "main" +optional = false +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" + +[package.extras] +docs = ["watchdog", "sphinx", "pylons-sphinx-themes"] +testing = ["watchdog", "pytest", "pytest-cov", "mock"] + +[[package]] +name = "idna" +version = "3.2" +description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" +optional = false +python-versions = ">=3.5" + +[[package]] +name = "itsdangerous" +version = "2.0.1" +description = "Safely pass data to untrusted environments and back." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "janus" +version = "0.6.1" +description = "Mixed sync-async queue to interoperate between asyncio tasks and classic threads" +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "jinja2" +version = "3.0.1" +description = "A very fast and expressive template engine." +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +name = "markupsafe" +version = "2.0.1" +description = "Safely add untrusted strings to HTML/XML markup." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "mergedeep" +version = "1.3.4" +description = "A deep merge function for 🐍." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "packaging" +version = "21.0" +description = "Core utilities for Python packages" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +pyparsing = ">=2.0.2" + +[[package]] +name = "pint" +version = "0.17" +description = "Physical quantities module" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +packaging = "*" + +[package.extras] +numpy = ["numpy (>=1.14)"] +test = ["pytest", "pytest-mpl", "pytest-cov", "pytest-subtests"] +uncertainties = ["uncertainties (>=3.0)"] + +[[package]] +name = "pluggy" +version = "0.13.1" +description = "plugin and hook calling mechanisms for python" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.extras] +dev = ["pre-commit", "tox"] + +[[package]] +name = "pyparsing" +version = "2.4.7" +description = "Python parsing module" +category = "main" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" + +[[package]] +name = "python-baseconv" +version = "1.2.2" +description = "Convert numbers from base 10 integers to base X strings and back again." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "python-multipart" +version = "0.0.5" +description = "A streaming multipart parser for Python" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +six = ">=1.4.0" + +[[package]] +name = "pyyaml" +version = "5.4.1" +description = "YAML parser and emitter for Python" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" + +[[package]] +name = "rfc3986" +version = "1.5.0" +description = "Validating URI References per RFC 3986" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +idna = {version = "*", optional = true, markers = "extra == \"idna2008\""} + +[package.extras] +idna2008 = ["idna"] + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" + +[[package]] +name = "sniffio" +version = "1.2.0" +description = "Sniff out which async library your code is running under" +category = "main" +optional = false +python-versions = ">=3.5" + +[[package]] +name = "uvicorn" +version = "0.14.0" +description = "The lightning-fast ASGI server." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +asgiref = ">=3.3.4" +click = ">=7" +h11 = ">=0.8" + +[package.extras] +standard = ["websockets (>=9.1)", "httptools (>=0.2.0,<0.3.0)", "watchgod (>=0.6)", "python-dotenv (>=0.13)", "PyYAML (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "colorama (>=0.4)"] + +[metadata] +lock-version = "1.1" +python-versions = "^3.8" +content-hash = "ecf55618d1187c855f6a04af210b87d0114c25eb4f80749986713fb46735b5bc" + +[metadata.files] +aiofiles = [ + {file = "aiofiles-0.7.0-py3-none-any.whl", hash = "sha256:c67a6823b5f23fcab0a2595a289cec7d8c863ffcb4322fb8cd6b90400aedfdbc"}, + {file = "aiofiles-0.7.0.tar.gz", hash = "sha256:a1c4fc9b2ff81568c83e21392a82f344ea9d23da906e4f6a52662764545e19d4"}, +] +anyio = [ + {file = "anyio-3.3.0-py3-none-any.whl", hash = "sha256:929a6852074397afe1d989002aa96d457e3e1e5441357c60d03e7eea0e65e1b0"}, + {file = "anyio-3.3.0.tar.gz", hash = "sha256:ae57a67583e5ff8b4af47666ff5651c3732d45fd26c929253748e796af860374"}, +] +asgi-csrf = [ + {file = "asgi-csrf-0.9.tar.gz", hash = "sha256:6e9d3bddaeac1a8fd33b188fe2abc8271f9085ab7be6e1a7f4d3c9df5d7f741a"}, + {file = "asgi_csrf-0.9-py3-none-any.whl", hash = "sha256:e974cffb8a4ab84a28a0088acbf7a4ecc5be4a64f08dcbe19c60dea103da01c0"}, +] +asgiref = [ + {file = "asgiref-3.3.4-py3-none-any.whl", hash = "sha256:92906c611ce6c967347bbfea733f13d6313901d54dcca88195eaeb52b2a8e8ee"}, + {file = "asgiref-3.3.4.tar.gz", hash = "sha256:d1216dfbdfb63826470995d31caed36225dcaf34f182e0fa257a4dd9e86f1b78"}, +] +certifi = [ + {file = "certifi-2021.5.30-py2.py3-none-any.whl", hash = "sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8"}, + {file = "certifi-2021.5.30.tar.gz", hash = "sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee"}, +] +charset-normalizer = [ + {file = "charset-normalizer-2.0.4.tar.gz", hash = "sha256:f23667ebe1084be45f6ae0538e4a5a865206544097e4e8bbcacf42cd02a348f3"}, + {file = "charset_normalizer-2.0.4-py3-none-any.whl", hash = "sha256:0c8911edd15d19223366a194a513099a302055a962bca2cec0f54b8b63175d8b"}, +] +click = [ + {file = "click-8.0.1-py3-none-any.whl", hash = "sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6"}, + {file = "click-8.0.1.tar.gz", hash = "sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a"}, +] +click-default-group = [ + {file = "click-default-group-1.2.2.tar.gz", hash = "sha256:d9560e8e8dfa44b3562fbc9425042a0fd6d21956fcc2db0077f63f34253ab904"}, +] +colorama = [ + {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, + {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, +] +datasette = [ + {file = "datasette-0.57.1-py3-none-any.whl", hash = "sha256:fc8e7a779d9b10093ad5710fa6acd35b500fddf40efb6e588cb2bcb0f5ceaa4a"}, + {file = "datasette-0.57.1.tar.gz", hash = "sha256:f6186329bcbaa89bfd25a99034303fbac57f6248d077ec62ed21782b80622045"}, +] +h11 = [ + {file = "h11-0.12.0-py3-none-any.whl", hash = "sha256:36a3cb8c0a032f56e2da7084577878a035d3b61d104230d4bd49c0c6b555a9c6"}, + {file = "h11-0.12.0.tar.gz", hash = "sha256:47222cb6067e4a307d535814917cd98fd0a57b6788ce715755fa2b6c28b56042"}, +] +httpcore = [ + {file = "httpcore-0.13.6-py3-none-any.whl", hash = "sha256:db4c0dcb8323494d01b8c6d812d80091a31e520033e7b0120883d6f52da649ff"}, + {file = "httpcore-0.13.6.tar.gz", hash = "sha256:b0d16f0012ec88d8cc848f5a55f8a03158405f4bca02ee49bc4ca2c1fda49f3e"}, +] +httpx = [ + {file = "httpx-0.19.0-py3-none-any.whl", hash = "sha256:9bd728a6c5ec0a9e243932a9983d57d3cc4a87bb4f554e1360fce407f78f9435"}, + {file = "httpx-0.19.0.tar.gz", hash = "sha256:92ecd2c00c688b529eda11cedb15161eaf02dee9116712f621c70d9a40b2cdd0"}, +] +hupper = [ + {file = "hupper-1.10.3-py2.py3-none-any.whl", hash = "sha256:f683850d62598c02faf3c7cdaaa727d8cbe3c5a2497a5737a8358386903b2601"}, + {file = "hupper-1.10.3.tar.gz", hash = "sha256:cd6f51b72c7587bc9bce8a65ecd025a1e95f1b03284519bfe91284d010316cd9"}, +] +idna = [ + {file = "idna-3.2-py3-none-any.whl", hash = "sha256:14475042e284991034cb48e06f6851428fb14c4dc953acd9be9a5e95c7b6dd7a"}, + {file = "idna-3.2.tar.gz", hash = "sha256:467fbad99067910785144ce333826c71fb0e63a425657295239737f7ecd125f3"}, +] +itsdangerous = [ + {file = "itsdangerous-2.0.1-py3-none-any.whl", hash = "sha256:5174094b9637652bdb841a3029700391451bd092ba3db90600dea710ba28e97c"}, + {file = "itsdangerous-2.0.1.tar.gz", hash = "sha256:9e724d68fc22902a1435351f84c3fb8623f303fffcc566a4cb952df8c572cff0"}, +] +janus = [ + {file = "janus-0.6.1-py3-none-any.whl", hash = "sha256:6dae3f1fd68a92dab49c1b93d269f22d2232feddf3a3b8842a881a6e67500c16"}, + {file = "janus-0.6.1.tar.gz", hash = "sha256:4712e0ef75711fe5947c2db855bc96221a9a03641b52e5ae8e25c2b705dd1d0c"}, +] +jinja2 = [ + {file = "Jinja2-3.0.1-py3-none-any.whl", hash = "sha256:1f06f2da51e7b56b8f238affdd6b4e2c61e39598a378cc49345bc1bd42a978a4"}, + {file = "Jinja2-3.0.1.tar.gz", hash = "sha256:703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4"}, +] +markupsafe = [ + {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, + {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, +] +mergedeep = [ + {file = "mergedeep-1.3.4-py3-none-any.whl", hash = "sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307"}, + {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, +] +packaging = [ + {file = "packaging-21.0-py3-none-any.whl", hash = "sha256:c86254f9220d55e31cc94d69bade760f0847da8000def4dfe1c6b872fd14ff14"}, + {file = "packaging-21.0.tar.gz", hash = "sha256:7dc96269f53a4ccec5c0670940a4281106dd0bb343f47b7471f779df49c2fbe7"}, +] +pint = [ + {file = "Pint-0.17-py2.py3-none-any.whl", hash = "sha256:6593c5dfaf2f701c54f17453191dff05e90ec9ebc3d1901468a59cfcb3289a4c"}, + {file = "Pint-0.17.tar.gz", hash = "sha256:f4d0caa713239e6847a7c6eefe2427358566451fe56497d533f21fb590a3f313"}, +] +pluggy = [ + {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, + {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, +] +pyparsing = [ + {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, + {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, +] +python-baseconv = [ + {file = "python-baseconv-1.2.2.tar.gz", hash = "sha256:0539f8bd0464013b05ad62e0a1673f0ac9086c76b43ebf9f833053527cd9931b"}, +] +python-multipart = [ + {file = "python-multipart-0.0.5.tar.gz", hash = "sha256:f7bb5f611fc600d15fa47b3974c8aa16e93724513b49b5f95c81e6624c83fa43"}, +] +pyyaml = [ + {file = "PyYAML-5.4.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922"}, + {file = "PyYAML-5.4.1-cp27-cp27m-win32.whl", hash = "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393"}, + {file = "PyYAML-5.4.1-cp27-cp27m-win_amd64.whl", hash = "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8"}, + {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, + {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, + {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, + {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, + {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, + {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, + {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, + {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, + {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, + {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, + {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, + {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, + {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, + {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, +] +rfc3986 = [ + {file = "rfc3986-1.5.0-py2.py3-none-any.whl", hash = "sha256:a86d6e1f5b1dc238b218b012df0aa79409667bb209e58da56d0b94704e712a97"}, + {file = "rfc3986-1.5.0.tar.gz", hash = "sha256:270aaf10d87d0d4e095063c65bf3ddbc6ee3d0b226328ce21e036f946e421835"}, +] +six = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] +sniffio = [ + {file = "sniffio-1.2.0-py3-none-any.whl", hash = "sha256:471b71698eac1c2112a40ce2752bb2f4a4814c22a54a3eed3676bc0f5ca9f663"}, + {file = "sniffio-1.2.0.tar.gz", hash = "sha256:c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de"}, +] +uvicorn = [ + {file = "uvicorn-0.14.0-py3-none-any.whl", hash = "sha256:2a76bb359171a504b3d1c853409af3adbfa5cef374a4a59e5881945a97a93eae"}, + {file = "uvicorn-0.14.0.tar.gz", hash = "sha256:45ad7dfaaa7d55cab4cd1e85e03f27e9d60bc067ddc59db52a2b0aeca8870292"}, +] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..7f22c25 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,19 @@ +[tool.poetry] +name = "diogenes" +version = "0.1.0" +description = "" +authors = ["arne "] + +[tool.poetry.dependencies] +python = "^3.8" +datasette = "^0.57.1" +# datasette-vega = "^0.6.2" +# datasette-copyable = "^0.3.1" +# datasette-leaflet = "^0.2.2" +# datasette-leaflet-geojson = "^0.8" + +[tool.poetry.dev-dependencies] + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" diff --git a/requirements.txt b/requirements.txt index 0933144..0281ad9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ datasette datasette-vega datasette-copyable +datasette-leaflet +datasette-leaflet-geojson From dd9d421f9ede3f1466eebef19aa54c4d76d76997 Mon Sep 17 00:00:00 2001 From: heyarne Date: Mon, 8 Aug 2022 23:46:45 +0200 Subject: [PATCH 05/19] Remove obsolete requirements.txt --- requirements.txt | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 0281ad9..0000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -datasette -datasette-vega -datasette-copyable -datasette-leaflet -datasette-leaflet-geojson From 0f252016b0e245492fc647edb57a548a7ce5ca4e Mon Sep 17 00:00:00 2001 From: heyarne Date: Tue, 9 Aug 2022 08:28:23 +0200 Subject: [PATCH 06/19] Add GPX track importer --- importers/gpx-tracks | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 importers/gpx-tracks diff --git a/importers/gpx-tracks b/importers/gpx-tracks new file mode 100755 index 0000000..ff1ae69 --- /dev/null +++ b/importers/gpx-tracks @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +set -euxo pipefail + +usage () { + echo "Recursively imports all gpx tracks in a directory into an SQLite database." + echo "" + echo "Usage: $(basename $0) directory target-database" +} + +gpx_directory="$1" +target_database="$2" + +# basic argument verification +case "$@" in -h|--help) usage && exit 0;; esac +[ -z "$gpx_directory" ] && usage && exit 1 +[ -z "$target_database" ] && usage && exit 1 + +# recursive scan and import +while IFS= read -d '' -r file; do + spatialite_xml_load -d "$target_database" -x "$file" +done < <(find "$gpx_directory" -name '*.gpx' -print0) + +# TODO: Create virtual joined table From e6102a0e39064c4a811acd11580a2cfa4f2d06d5 Mon Sep 17 00:00:00 2001 From: heyarne Date: Tue, 9 Aug 2022 09:24:29 +0200 Subject: [PATCH 07/19] Improve nix environment --- .envrc | 1 + flake.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/.envrc b/.envrc index 3550a30..2951a88 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,2 @@ use flake +layout python diff --git a/flake.nix b/flake.nix index b9d57fe..173725d 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,7 @@ datasette python39 + python39Packages.poetry ]; LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}"; From d704353af8b9ed3bab6e974d6bc5a1462db0fe15 Mon Sep 17 00:00:00 2001 From: heyarne Date: Tue, 9 Aug 2022 09:24:34 +0200 Subject: [PATCH 08/19] Update datasette --- poetry.lock | 193 ++++++++-------------------------------------------- 1 file changed, 28 insertions(+), 165 deletions(-) diff --git a/poetry.lock b/poetry.lock index 2e81b2f..3f81cfc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -36,7 +36,7 @@ itsdangerous = "*" python-multipart = "*" [package.extras] -test = ["pytest", "pytest-asyncio", "httpx (>=0.16)", "starlette", "pytest-cov", "asgi-lifespan"] +test = ["asgi-lifespan", "pytest-cov", "starlette", "httpx (>=0.16)", "pytest-asyncio", "pytest"] [[package]] name = "asgiref" @@ -362,174 +362,40 @@ python-versions = "^3.8" content-hash = "ecf55618d1187c855f6a04af210b87d0114c25eb4f80749986713fb46735b5bc" [metadata.files] -aiofiles = [ - {file = "aiofiles-0.7.0-py3-none-any.whl", hash = "sha256:c67a6823b5f23fcab0a2595a289cec7d8c863ffcb4322fb8cd6b90400aedfdbc"}, - {file = "aiofiles-0.7.0.tar.gz", hash = "sha256:a1c4fc9b2ff81568c83e21392a82f344ea9d23da906e4f6a52662764545e19d4"}, -] -anyio = [ - {file = "anyio-3.3.0-py3-none-any.whl", hash = "sha256:929a6852074397afe1d989002aa96d457e3e1e5441357c60d03e7eea0e65e1b0"}, - {file = "anyio-3.3.0.tar.gz", hash = "sha256:ae57a67583e5ff8b4af47666ff5651c3732d45fd26c929253748e796af860374"}, -] -asgi-csrf = [ - {file = "asgi-csrf-0.9.tar.gz", hash = "sha256:6e9d3bddaeac1a8fd33b188fe2abc8271f9085ab7be6e1a7f4d3c9df5d7f741a"}, - {file = "asgi_csrf-0.9-py3-none-any.whl", hash = "sha256:e974cffb8a4ab84a28a0088acbf7a4ecc5be4a64f08dcbe19c60dea103da01c0"}, -] -asgiref = [ - {file = "asgiref-3.3.4-py3-none-any.whl", hash = "sha256:92906c611ce6c967347bbfea733f13d6313901d54dcca88195eaeb52b2a8e8ee"}, - {file = "asgiref-3.3.4.tar.gz", hash = "sha256:d1216dfbdfb63826470995d31caed36225dcaf34f182e0fa257a4dd9e86f1b78"}, -] -certifi = [ - {file = "certifi-2021.5.30-py2.py3-none-any.whl", hash = "sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8"}, - {file = "certifi-2021.5.30.tar.gz", hash = "sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee"}, -] -charset-normalizer = [ - {file = "charset-normalizer-2.0.4.tar.gz", hash = "sha256:f23667ebe1084be45f6ae0538e4a5a865206544097e4e8bbcacf42cd02a348f3"}, - {file = "charset_normalizer-2.0.4-py3-none-any.whl", hash = "sha256:0c8911edd15d19223366a194a513099a302055a962bca2cec0f54b8b63175d8b"}, -] -click = [ - {file = "click-8.0.1-py3-none-any.whl", hash = "sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6"}, - {file = "click-8.0.1.tar.gz", hash = "sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a"}, -] -click-default-group = [ - {file = "click-default-group-1.2.2.tar.gz", hash = "sha256:d9560e8e8dfa44b3562fbc9425042a0fd6d21956fcc2db0077f63f34253ab904"}, -] +aiofiles = [] +anyio = [] +asgi-csrf = [] +asgiref = [] +certifi = [] +charset-normalizer = [] +click = [] +click-default-group = [] colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] -datasette = [ - {file = "datasette-0.57.1-py3-none-any.whl", hash = "sha256:fc8e7a779d9b10093ad5710fa6acd35b500fddf40efb6e588cb2bcb0f5ceaa4a"}, - {file = "datasette-0.57.1.tar.gz", hash = "sha256:f6186329bcbaa89bfd25a99034303fbac57f6248d077ec62ed21782b80622045"}, -] -h11 = [ - {file = "h11-0.12.0-py3-none-any.whl", hash = "sha256:36a3cb8c0a032f56e2da7084577878a035d3b61d104230d4bd49c0c6b555a9c6"}, - {file = "h11-0.12.0.tar.gz", hash = "sha256:47222cb6067e4a307d535814917cd98fd0a57b6788ce715755fa2b6c28b56042"}, -] -httpcore = [ - {file = "httpcore-0.13.6-py3-none-any.whl", hash = "sha256:db4c0dcb8323494d01b8c6d812d80091a31e520033e7b0120883d6f52da649ff"}, - {file = "httpcore-0.13.6.tar.gz", hash = "sha256:b0d16f0012ec88d8cc848f5a55f8a03158405f4bca02ee49bc4ca2c1fda49f3e"}, -] -httpx = [ - {file = "httpx-0.19.0-py3-none-any.whl", hash = "sha256:9bd728a6c5ec0a9e243932a9983d57d3cc4a87bb4f554e1360fce407f78f9435"}, - {file = "httpx-0.19.0.tar.gz", hash = "sha256:92ecd2c00c688b529eda11cedb15161eaf02dee9116712f621c70d9a40b2cdd0"}, -] -hupper = [ - {file = "hupper-1.10.3-py2.py3-none-any.whl", hash = "sha256:f683850d62598c02faf3c7cdaaa727d8cbe3c5a2497a5737a8358386903b2601"}, - {file = "hupper-1.10.3.tar.gz", hash = "sha256:cd6f51b72c7587bc9bce8a65ecd025a1e95f1b03284519bfe91284d010316cd9"}, -] -idna = [ - {file = "idna-3.2-py3-none-any.whl", hash = "sha256:14475042e284991034cb48e06f6851428fb14c4dc953acd9be9a5e95c7b6dd7a"}, - {file = "idna-3.2.tar.gz", hash = "sha256:467fbad99067910785144ce333826c71fb0e63a425657295239737f7ecd125f3"}, -] -itsdangerous = [ - {file = "itsdangerous-2.0.1-py3-none-any.whl", hash = "sha256:5174094b9637652bdb841a3029700391451bd092ba3db90600dea710ba28e97c"}, - {file = "itsdangerous-2.0.1.tar.gz", hash = "sha256:9e724d68fc22902a1435351f84c3fb8623f303fffcc566a4cb952df8c572cff0"}, -] -janus = [ - {file = "janus-0.6.1-py3-none-any.whl", hash = "sha256:6dae3f1fd68a92dab49c1b93d269f22d2232feddf3a3b8842a881a6e67500c16"}, - {file = "janus-0.6.1.tar.gz", hash = "sha256:4712e0ef75711fe5947c2db855bc96221a9a03641b52e5ae8e25c2b705dd1d0c"}, -] -jinja2 = [ - {file = "Jinja2-3.0.1-py3-none-any.whl", hash = "sha256:1f06f2da51e7b56b8f238affdd6b4e2c61e39598a378cc49345bc1bd42a978a4"}, - {file = "Jinja2-3.0.1.tar.gz", hash = "sha256:703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4"}, -] -markupsafe = [ - {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, - {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, -] -mergedeep = [ - {file = "mergedeep-1.3.4-py3-none-any.whl", hash = "sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307"}, - {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, -] -packaging = [ - {file = "packaging-21.0-py3-none-any.whl", hash = "sha256:c86254f9220d55e31cc94d69bade760f0847da8000def4dfe1c6b872fd14ff14"}, - {file = "packaging-21.0.tar.gz", hash = "sha256:7dc96269f53a4ccec5c0670940a4281106dd0bb343f47b7471f779df49c2fbe7"}, -] -pint = [ - {file = "Pint-0.17-py2.py3-none-any.whl", hash = "sha256:6593c5dfaf2f701c54f17453191dff05e90ec9ebc3d1901468a59cfcb3289a4c"}, - {file = "Pint-0.17.tar.gz", hash = "sha256:f4d0caa713239e6847a7c6eefe2427358566451fe56497d533f21fb590a3f313"}, -] +datasette = [] +h11 = [] +httpcore = [] +httpx = [] +hupper = [] +idna = [] +itsdangerous = [] +janus = [] +jinja2 = [] +markupsafe = [] +mergedeep = [] +packaging = [] +pint = [] pluggy = [ {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, ] -pyparsing = [ - {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, - {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, -] -python-baseconv = [ - {file = "python-baseconv-1.2.2.tar.gz", hash = "sha256:0539f8bd0464013b05ad62e0a1673f0ac9086c76b43ebf9f833053527cd9931b"}, -] -python-multipart = [ - {file = "python-multipart-0.0.5.tar.gz", hash = "sha256:f7bb5f611fc600d15fa47b3974c8aa16e93724513b49b5f95c81e6624c83fa43"}, -] -pyyaml = [ - {file = "PyYAML-5.4.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922"}, - {file = "PyYAML-5.4.1-cp27-cp27m-win32.whl", hash = "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393"}, - {file = "PyYAML-5.4.1-cp27-cp27m-win_amd64.whl", hash = "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8"}, - {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, - {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, - {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, - {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, - {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, - {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, - {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, - {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, - {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, - {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, - {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, - {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, - {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, - {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, -] -rfc3986 = [ - {file = "rfc3986-1.5.0-py2.py3-none-any.whl", hash = "sha256:a86d6e1f5b1dc238b218b012df0aa79409667bb209e58da56d0b94704e712a97"}, - {file = "rfc3986-1.5.0.tar.gz", hash = "sha256:270aaf10d87d0d4e095063c65bf3ddbc6ee3d0b226328ce21e036f946e421835"}, -] +pyparsing = [] +python-baseconv = [] +python-multipart = [] +pyyaml = [] +rfc3986 = [] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, @@ -538,7 +404,4 @@ sniffio = [ {file = "sniffio-1.2.0-py3-none-any.whl", hash = "sha256:471b71698eac1c2112a40ce2752bb2f4a4814c22a54a3eed3676bc0f5ca9f663"}, {file = "sniffio-1.2.0.tar.gz", hash = "sha256:c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de"}, ] -uvicorn = [ - {file = "uvicorn-0.14.0-py3-none-any.whl", hash = "sha256:2a76bb359171a504b3d1c853409af3adbfa5cef374a4a59e5881945a97a93eae"}, - {file = "uvicorn-0.14.0.tar.gz", hash = "sha256:45ad7dfaaa7d55cab4cd1e85e03f27e9d60bc067ddc59db52a2b0aeca8870292"}, -] +uvicorn = [] From a2105d8d2daf0c73f23756f811a3dd0e60b0f6d1 Mon Sep 17 00:00:00 2001 From: heyarne Date: Tue, 9 Aug 2022 09:24:42 +0200 Subject: [PATCH 09/19] Improve gpx importer --- importers/gpx-tracks | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/importers/gpx-tracks b/importers/gpx-tracks index ff1ae69..52948cf 100755 --- a/importers/gpx-tracks +++ b/importers/gpx-tracks @@ -15,9 +15,13 @@ case "$@" in -h|--help) usage && exit 0;; esac [ -z "$gpx_directory" ] && usage && exit 1 [ -z "$target_database" ] && usage && exit 1 +tmp="$(mktmp -d diogenes.XXXXX -p /tmp)/$(basename $target_database)" + # recursive scan and import while IFS= read -d '' -r file; do - spatialite_xml_load -d "$target_database" -x "$file" + spatialite_xml_load -d "$tmp" -x "$file" done < <(find "$gpx_directory" -name '*.gpx' -print0) +mv $tmp $target_database + # TODO: Create virtual joined table From 4cd058710a411fcb38cb5344b766b4ee46089bbc Mon Sep 17 00:00:00 2001 From: heyarne Date: Tue, 9 Aug 2022 09:30:51 +0200 Subject: [PATCH 10/19] =?UTF-8?q?mktmp=20=E2=86=92=20mktemp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- importers/gpx-tracks | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/importers/gpx-tracks b/importers/gpx-tracks index 52948cf..6f8a82b 100755 --- a/importers/gpx-tracks +++ b/importers/gpx-tracks @@ -15,7 +15,7 @@ case "$@" in -h|--help) usage && exit 0;; esac [ -z "$gpx_directory" ] && usage && exit 1 [ -z "$target_database" ] && usage && exit 1 -tmp="$(mktmp -d diogenes.XXXXX -p /tmp)/$(basename $target_database)" +tmp="$(mktemp -d diogenes.XXXXX -p /tmp)/$(basename $target_database)" # recursive scan and import while IFS= read -d '' -r file; do From 9d6352ce780af9e5caaa20268052497e951f8c95 Mon Sep 17 00:00:00 2001 From: heyarne Date: Tue, 9 Aug 2022 09:34:52 +0200 Subject: [PATCH 11/19] Add comment discussing why why use the temporary directory --- importers/gpx-tracks | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/importers/gpx-tracks b/importers/gpx-tracks index 6f8a82b..40fb990 100755 --- a/importers/gpx-tracks +++ b/importers/gpx-tracks @@ -15,13 +15,16 @@ case "$@" in -h|--help) usage && exit 0;; esac [ -z "$gpx_directory" ] && usage && exit 1 [ -z "$target_database" ] && usage && exit 1 -tmp="$(mktemp -d diogenes.XXXXX -p /tmp)/$(basename $target_database)" +# we write to a temporary location to make the replace option atomic (if on the same device) +tmp_dir="$(mktemp -d diogenes.XXXXX -p /tmp)" +tmp="$tmp_dir/$(basename $target_database)" # recursive scan and import while IFS= read -d '' -r file; do spatialite_xml_load -d "$tmp" -x "$file" done < <(find "$gpx_directory" -name '*.gpx' -print0) -mv $tmp $target_database +mv -f "$tmp" "$target_database" +rm -rf "$tmp_dir" # TODO: Create virtual joined table From c5d27e0af94f16e73870a56f1c6d1fc30efdac55 Mon Sep 17 00:00:00 2001 From: heyarne Date: Tue, 9 Aug 2022 09:39:59 +0200 Subject: [PATCH 12/19] Do not use `layout python` but project-local direnv --- .envrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.envrc b/.envrc index 2951a88..3172d4e 100644 --- a/.envrc +++ b/.envrc @@ -1,2 +1,4 @@ use flake -layout python + +export POETRY_VIRTALENVS_IN_PROJECT=1 +[ -d .venv ] && source .venv/bin/activate From 500dc3cb191e20c800a988da85dc205bb945622a Mon Sep 17 00:00:00 2001 From: heyarne Date: Tue, 9 Aug 2022 09:40:08 +0200 Subject: [PATCH 13/19] Update datasette --- poetry.lock | 78 ++++++++++++++++++++++++++------------------------ pyproject.toml | 2 +- 2 files changed, 41 insertions(+), 39 deletions(-) diff --git a/poetry.lock b/poetry.lock index 3f81cfc..b252467 100644 --- a/poetry.lock +++ b/poetry.lock @@ -57,17 +57,6 @@ category = "main" optional = false python-versions = "*" -[[package]] -name = "charset-normalizer" -version = "2.0.4" -description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" -optional = false -python-versions = ">=3.5.0" - -[package.extras] -unicode_backport = ["unicodedata2"] - [[package]] name = "click" version = "8.0.1" @@ -100,33 +89,34 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "datasette" -version = "0.57.1" +version = "0.60.2" description = "An open source multi-tool for exploring and publishing data" category = "main" optional = false python-versions = ">=3.6" [package.dependencies] -aiofiles = ">=0.4,<0.8" -asgi-csrf = ">=0.6" -asgiref = ">=3.2.10,<3.4.0" +aiofiles = ">=0.4,<0.9" +asgi-csrf = ">=0.9" +asgiref = ">=3.2.10,<3.5.0" click = ">=7.1.1,<8.1.0" click-default-group = ">=1.2.2,<1.3.0" -httpx = ">=0.17" +httpx = ">=0.20" hupper = ">=1.9,<2.0" itsdangerous = ">=1.1,<3.0" -janus = ">=0.4,<0.7" +janus = ">=0.6.2,<1.1" Jinja2 = ">=2.10.3,<3.1.0" mergedeep = ">=1.1.1,<1.4.0" pint = ">=0.9,<1.0" -pluggy = ">=0.13.0,<0.14.0" +pluggy = ">=1.0,<1.1" python-baseconv = "1.2.2" -PyYAML = ">=5.3,<6.0" +PyYAML = ">=5.3,<7.0" uvicorn = ">=0.11,<1.0" [package.extras] -docs = ["sphinx-rtd-theme", "sphinx-autobuild"] -test = ["pytest (>=5.2.2,<6.3.0)", "pytest-xdist (>=2.2.1,<2.3)", "pytest-asyncio (>=0.10,<0.16)", "beautifulsoup4 (>=4.8.1,<4.10.0)", "black (==21.5b2)", "pytest-timeout (>=1.4.2,<1.5)", "trustme (>=0.7,<0.8)"] +docs = ["sphinx-rtd-theme", "sphinx-autobuild", "codespell"] +rich = ["rich"] +test = ["pytest (==6.2.5)", "pytest-xdist (==2.5.0)", "pytest-asyncio (==0.16.0)", "beautifulsoup4 (==4.10.0)", "black (==21.12b0)", "pytest-timeout (==2.0.2)", "trustme (==0.9.0)", "cogapp (==3.3.0)"] [[package]] name = "h11" @@ -138,38 +128,41 @@ python-versions = ">=3.6" [[package]] name = "httpcore" -version = "0.13.6" +version = "0.15.0" description = "A minimal low-level HTTP client." category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] anyio = ">=3.0.0,<4.0.0" +certifi = "*" h11 = ">=0.11,<0.13" sniffio = ">=1.0.0,<2.0.0" [package.extras] http2 = ["h2 (>=3,<5)"] +socks = ["socksio (>=1.0.0,<2.0.0)"] [[package]] name = "httpx" -version = "0.19.0" +version = "0.23.0" description = "The next generation HTTP client." category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] certifi = "*" -charset-normalizer = "*" -httpcore = ">=0.13.3,<0.14.0" +httpcore = ">=0.15.0,<0.16.0" rfc3986 = {version = ">=1.3,<2", extras = ["idna2008"]} sniffio = "*" [package.extras] brotli = ["brotlicffi", "brotli"] +cli = ["click (>=8.0.0,<9.0.0)", "rich (>=10,<13)", "pygments (>=2.0.0,<3.0.0)"] http2 = ["h2 (>=3,<5)"] +socks = ["socksio (>=1.0.0,<2.0.0)"] [[package]] name = "hupper" @@ -201,11 +194,14 @@ python-versions = ">=3.6" [[package]] name = "janus" -version = "0.6.1" +version = "1.0.0" description = "Mixed sync-async queue to interoperate between asyncio tasks and classic threads" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" + +[package.dependencies] +typing-extensions = ">=3.7.4.3" [[package]] name = "jinja2" @@ -266,14 +262,15 @@ uncertainties = ["uncertainties (>=3.0)"] [[package]] name = "pluggy" -version = "0.13.1" +version = "1.0.0" description = "plugin and hook calling mechanisms for python" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.6" [package.extras] -dev = ["pre-commit", "tox"] +testing = ["pytest-benchmark", "pytest"] +dev = ["tox", "pre-commit"] [[package]] name = "pyparsing" @@ -340,6 +337,14 @@ category = "main" optional = false python-versions = ">=3.5" +[[package]] +name = "typing-extensions" +version = "4.3.0" +description = "Backported and Experimental Type Hints for Python 3.7+" +category = "main" +optional = false +python-versions = ">=3.7" + [[package]] name = "uvicorn" version = "0.14.0" @@ -359,7 +364,7 @@ standard = ["websockets (>=9.1)", "httptools (>=0.2.0,<0.3.0)", "watchgod (>=0.6 [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "ecf55618d1187c855f6a04af210b87d0114c25eb4f80749986713fb46735b5bc" +content-hash = "5a5b2552d65c92a16de778c774221c4f5aa48ae3de787e5a66c1af91cece0633" [metadata.files] aiofiles = [] @@ -367,7 +372,6 @@ anyio = [] asgi-csrf = [] asgiref = [] certifi = [] -charset-normalizer = [] click = [] click-default-group = [] colorama = [ @@ -387,10 +391,7 @@ markupsafe = [] mergedeep = [] packaging = [] pint = [] -pluggy = [ - {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, - {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, -] +pluggy = [] pyparsing = [] python-baseconv = [] python-multipart = [] @@ -404,4 +405,5 @@ sniffio = [ {file = "sniffio-1.2.0-py3-none-any.whl", hash = "sha256:471b71698eac1c2112a40ce2752bb2f4a4814c22a54a3eed3676bc0f5ca9f663"}, {file = "sniffio-1.2.0.tar.gz", hash = "sha256:c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de"}, ] +typing-extensions = [] uvicorn = [] diff --git a/pyproject.toml b/pyproject.toml index 7f22c25..7f42968 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ authors = ["arne "] [tool.poetry.dependencies] python = "^3.8" -datasette = "^0.57.1" +datasette = "^0.60.1" # datasette-vega = "^0.6.2" # datasette-copyable = "^0.3.1" # datasette-leaflet = "^0.2.2" From b030cf9c3f0c67a04d4653897c01be6853908c70 Mon Sep 17 00:00:00 2001 From: heyarne Date: Wed, 10 Aug 2022 12:51:24 +0200 Subject: [PATCH 14/19] Add indices to tracks.db --- importers/gpx-tracks | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/importers/gpx-tracks b/importers/gpx-tracks index 40fb990..40488aa 100755 --- a/importers/gpx-tracks +++ b/importers/gpx-tracks @@ -24,7 +24,22 @@ while IFS= read -d '' -r file; do spatialite_xml_load -d "$tmp" -x "$file" done < <(find "$gpx_directory" -name '*.gpx' -print0) +indices=( + "gpx_metadata_name" + "gpx_metadata_time" + "gpx_trk_trkseg_trkpt_ele" + "gpx_trk_trkseg_trkpt_extensions" + "gpx_trk_trkseg_trkpt_extensions_heading" + "gpx_trk_trkseg_trkpt_extensions_speed" + "gpx_trk_trkseg_trkpt_hdop" + "gpx_trk_trkseg_trkpt_time" +) +for i in "${indices[@]}" +do + sqlite3 "$tmp" "CREATE INDEX ${i}_ ON $i ( node_value )" +done + mv -f "$tmp" "$target_database" rm -rf "$tmp_dir" -# TODO: Create virtual joined table +# TODO: Create joined view From 26b0180b21a91aa28b06932c5dd815bea796360e Mon Sep 17 00:00:00 2001 From: heyarne Date: Thu, 11 Aug 2022 07:58:56 +0200 Subject: [PATCH 15/19] Add litecli to flake.nix to avoid problems with LD_LIBRARY_PATH --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 173725d..2ff687c 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,7 @@ in pkgs.mkShell rec { name = "datasette"; buildInputs = with pkgs; [ + litecli sqlite libspatialite spatialite_tools From 6c8144f485501264985565abea2a206427b41a45 Mon Sep 17 00:00:00 2001 From: heyarne Date: Thu, 11 Aug 2022 07:59:12 +0200 Subject: [PATCH 16/19] Add datasette-auth-passwords --- poetry.lock | 17 ++++++++++++++++- pyproject.toml | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index b252467..39cabde 100644 --- a/poetry.lock +++ b/poetry.lock @@ -118,6 +118,20 @@ docs = ["sphinx-rtd-theme", "sphinx-autobuild", "codespell"] rich = ["rich"] test = ["pytest (==6.2.5)", "pytest-xdist (==2.5.0)", "pytest-asyncio (==0.16.0)", "beautifulsoup4 (==4.10.0)", "black (==21.12b0)", "pytest-timeout (==2.0.2)", "trustme (==0.9.0)", "cogapp (==3.3.0)"] +[[package]] +name = "datasette-auth-passwords" +version = "1.0" +description = "Datasette plugin for authenticating access using passwords" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +datasette = ">=0.59" + +[package.extras] +test = ["httpx", "pytest-asyncio", "pytest"] + [[package]] name = "h11" version = "0.12.0" @@ -364,7 +378,7 @@ standard = ["websockets (>=9.1)", "httptools (>=0.2.0,<0.3.0)", "watchgod (>=0.6 [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "5a5b2552d65c92a16de778c774221c4f5aa48ae3de787e5a66c1af91cece0633" +content-hash = "2f13cb6360cbe7d09e9a31213add54d287c83c32a8fa42c1bde4a8a94606f18d" [metadata.files] aiofiles = [] @@ -379,6 +393,7 @@ colorama = [ {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] datasette = [] +datasette-auth-passwords = [] h11 = [] httpcore = [] httpx = [] diff --git a/pyproject.toml b/pyproject.toml index 7f42968..7dca143 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,6 +11,7 @@ datasette = "^0.60.1" # datasette-copyable = "^0.3.1" # datasette-leaflet = "^0.2.2" # datasette-leaflet-geojson = "^0.8" +datasette-auth-passwords = "^1.0" [tool.poetry.dev-dependencies] From 7673d544d46e8b638d38970474484d310c212775 Mon Sep 17 00:00:00 2001 From: heyarne Date: Thu, 11 Aug 2022 08:00:30 +0200 Subject: [PATCH 17/19] Add datasette-copyable --- poetry.lock | 30 +++++++++++++++++++++++++++++- pyproject.toml | 5 +---- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 39cabde..97eb089 100644 --- a/poetry.lock +++ b/poetry.lock @@ -132,6 +132,21 @@ datasette = ">=0.59" [package.extras] test = ["httpx", "pytest-asyncio", "pytest"] +[[package]] +name = "datasette-copyable" +version = "0.3.1" +description = "Datasette plugin for outputting tables in formats suitable for copy and paste" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +datasette = ">=0.49" +tabulate = "*" + +[package.extras] +test = ["sqlite-utils", "httpx", "pytest-asyncio", "pytest"] + [[package]] name = "h11" version = "0.12.0" @@ -351,6 +366,17 @@ category = "main" optional = false python-versions = ">=3.5" +[[package]] +name = "tabulate" +version = "0.8.10" +description = "Pretty-print tabular data" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.extras] +widechars = ["wcwidth"] + [[package]] name = "typing-extensions" version = "4.3.0" @@ -378,7 +404,7 @@ standard = ["websockets (>=9.1)", "httptools (>=0.2.0,<0.3.0)", "watchgod (>=0.6 [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "2f13cb6360cbe7d09e9a31213add54d287c83c32a8fa42c1bde4a8a94606f18d" +content-hash = "e787dd6136fe591e949877b795d1d15a0ffc36e51f644025f0bf3e08fca98231" [metadata.files] aiofiles = [] @@ -394,6 +420,7 @@ colorama = [ ] datasette = [] datasette-auth-passwords = [] +datasette-copyable = [] h11 = [] httpcore = [] httpx = [] @@ -420,5 +447,6 @@ sniffio = [ {file = "sniffio-1.2.0-py3-none-any.whl", hash = "sha256:471b71698eac1c2112a40ce2752bb2f4a4814c22a54a3eed3676bc0f5ca9f663"}, {file = "sniffio-1.2.0.tar.gz", hash = "sha256:c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de"}, ] +tabulate = [] typing-extensions = [] uvicorn = [] diff --git a/pyproject.toml b/pyproject.toml index 7dca143..c2989e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,11 +7,8 @@ authors = ["arne "] [tool.poetry.dependencies] python = "^3.8" datasette = "^0.60.1" -# datasette-vega = "^0.6.2" -# datasette-copyable = "^0.3.1" -# datasette-leaflet = "^0.2.2" -# datasette-leaflet-geojson = "^0.8" datasette-auth-passwords = "^1.0" +datasette-copyable = "^0.3.1" [tool.poetry.dev-dependencies] From 9259a89c05d182b026c17bf3081acbf4dbcadd6a Mon Sep 17 00:00:00 2001 From: heyarne Date: Thu, 11 Aug 2022 08:06:01 +0200 Subject: [PATCH 18/19] Set up password auth --- metadata.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/metadata.yml b/metadata.yml index 5720fde..a238c5f 100644 --- a/metadata.yml +++ b/metadata.yml @@ -1,6 +1,14 @@ description: | This is a somewhat random collection of statistics I found on the internet that, let's hope, help me win arguments. +plugins: + datasette-auth-passwords: + diogenes_password_hash: + $env: "DIOGENES_PASSWORD" + actors: + diogenes: + id: "diogenes" + name: "Diogenes" databases: earth: description: | @@ -25,3 +33,6 @@ databases: source: "Our World In Data" source_url: "https://ourworldindata.org/grapher/projected-population-by-country" license: "CC-BY 4.0" + tracks: # this is for authenticated users only + allow: + id: diogenes From 6db343d73e9f9b80a7dfe6e74ebb24b0d143e068 Mon Sep 17 00:00:00 2001 From: heyarne Date: Thu, 11 Aug 2022 08:15:15 +0200 Subject: [PATCH 19/19] Add systemd service --- contrib/diogenes.service | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 contrib/diogenes.service diff --git a/contrib/diogenes.service b/contrib/diogenes.service new file mode 100644 index 0000000..3cd4398 --- /dev/null +++ b/contrib/diogenes.service @@ -0,0 +1,15 @@ +[Unit] +Description=Diogenes Datasette +After=network.target + +[Service] +# Adapt these values how you see fit +Type=simple +User=diogenes +Environment=DATASETTE_SECRET= +Environment=DIOGENES_PASSWORD= +WorkingDirectory=/opt/diogenes +ExecStart=bash -c 'eval "poetry run datasette serve --load-extension=mod_spatialite.so --metadata metadata.yml --setting default_cache_ttl 3600 --setting sql_time_limit_ms 10000 --setting max_returned_rows 999 --cors $(for f in dbs/*; do echo -n "--immutable $f "; done)"' + +[Install] +WantedBy=multi-user.target