mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Geo taxonomy: save and load the geo taxonomy data with git
This also supports the cloud storage, of course. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
53b805131e
commit
6e81677d89
2 changed files with 25 additions and 1 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue