mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Desktop: add export to html
Add the export of environmental parameters in star widgets to .html format. The dive rating is always shown both in the condensed as well as in the expanded view. The other five environmental variables are only shown in the expanded view. Only those star widgets with a rating are shown: if a star widget has not been rated in the UI, then it is assumed unrated and is not indicated in the expanded view. Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9006e3d102
commit
7c024f12d2
2 changed files with 26 additions and 8 deletions
|
@ -355,6 +355,10 @@ void write_one_dive(struct membuffer *b, struct dive *dive, const char *photos_d
|
|||
put_HTML_coordinates(b, dive);
|
||||
put_format(b, "\"rating\":%d,", dive->rating);
|
||||
put_format(b, "\"visibility\":%d,", dive->visibility);
|
||||
put_format(b, "\"current\":%d,", dive->current);
|
||||
put_format(b, "\"wavesize\":%d,", dive->wavesize);
|
||||
put_format(b, "\"surge\":%d,", dive->surge);
|
||||
put_format(b, "\"chill\":%d,", dive->chill);
|
||||
put_format(b, "\"dive_duration\":\"%u:%02u min\",",
|
||||
FRACTION(dive->duration.seconds, 60));
|
||||
put_string(b, "\"temperature\":{");
|
||||
|
@ -512,8 +516,13 @@ void export_translation(const char *file_name)
|
|||
write_attribute(b, "Advanced_Search", translate("gettextFromC", "Advanced search"), ", ");
|
||||
|
||||
//Dive expanded view
|
||||
|
||||
write_attribute(b, "Rating", translate("gettextFromC", "Rating"), ", ");
|
||||
write_attribute(b, "WaveSize", translate("gettextFromC", "WaveSize"), ", ");
|
||||
write_attribute(b, "Visibility", translate("gettextFromC", "Visibility"), ", ");
|
||||
write_attribute(b, "Current", translate("gettextFromC", "Current"), ", ");
|
||||
write_attribute(b, "Surge", translate("gettextFromC", "Surge"), ", ");
|
||||
write_attribute(b, "Chill", translate("gettextFromC", "Chill"), ", ");
|
||||
write_attribute(b, "Duration", translate("gettextFromC", "Duration"), ", ");
|
||||
write_attribute(b, "DiveMaster", translate("gettextFromC", "Divemaster"), ", ");
|
||||
write_attribute(b, "Buddy", translate("gettextFromC", "Buddy"), ", ");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue