From 6e81677d89591099266c1d94e06afbf54dbb6358 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 1 Jul 2015 12:29:32 -0700 Subject: Geo taxonomy: save and load the geo taxonomy data with git This also supports the cloud storage, of course. Signed-off-by: Dirk Hohndel --- save-git.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'save-git.c') diff --git a/save-git.c b/save-git.c index a18ef8f84..ff82ca841 100644 --- a/save-git.c +++ b/save-git.c @@ -897,6 +897,14 @@ static void save_divesites(git_repository *repo, struct dir *tree) show_utf8(&b, "description ", ds->description, "\n"); show_utf8(&b, "notes ", ds->notes, "\n"); show_gps(&b, ds->latitude, ds->longitude); + if (prefs.geocoding.enable_geocoding) + for (int j = 0; j < ds->taxonomy.nr; j++) { + struct taxonomy *t = &ds->taxonomy.category[j]; + if (t->category != NONE) { + put_format(&b, "geo cat %d origin %d ", t->category, t->origin); + show_utf8(&b, "", t->value, "\n" ); + } + } blob_insert(repo, subdir, &b, mb_cstring(&site_file_name)); } } -- cgit v1.2.3-70-g09d2