summaryrefslogtreecommitdiffstats
path: root/save-html.c
AgeCommit message (Collapse)Author
2014-08-04HTML: Fix event value fields.Gravatar Gehad elrobey
- The gas event values can contain o2 and he mix in gas change events. - Give a '-' value for events that don't have any sensible values. - Show event value if event type is heading or gaschange. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-25HTML: add event value to the detailed view.Gravatar Gehad elrobey
Event value is important in case of gas change and heading events. The value information show: mix and direction. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-25HTML: Add notes variable to the JSON file even if notes don't existGravatar Gehad elrobey
if dive notes don't exist, notes variable must be added to the javascript containing empty value "--", this is more friendly than just showing 'undefined' Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-25HTML: don't add photos or dive status if exporting list onlyGravatar Gehad elrobey
If export list only option is chosen, photos and dive status must not be added to the export. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-14HTML: Add dive photos to the detailed viewGravatar Gehad elrobey
Dive photos are copied to the photos directory on export. The photos section appears only if photos exist. C++ helper functions are added to copy images to the photos directory, Additionally the photos directory must be passed as a parameter to the write_one_dive function to save photos to it. Some options structure may be needed instead of passing many arguments. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-14HTML: display dive status in detailed viewGravatar Gehad elrobey
Add dive status in the detailed dive view. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11Corrects start and end pressure in HTML exportGravatar Rick Walsh
The start and end pressures were reported the wrong way. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-04HTML: add events to detailed profile viewGravatar Gehad elrobey
Export events to detailed dive view and add events to the profile. Events names must appear on mouse hover. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30HTML: Show nice values when pressure is not availableGravatar Gehad elrobey
Show nice values instead of the undefined when the pressure is not available. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30HTML: Add temperature and pressure curves to the JSON data.Gravatar Gehad elrobey
Add more dive sample details to the JSON data. This is not so optimized some zero values can be ignored. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30HTML: export dive events to detailed viewGravatar Gehad elrobey
Add table of dive events to the dive detailed view. This should view each event, its type and the time this event took place. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-24HTML: Add export list only optionGravatar Gehad elrobey
Exporting small dive list only or choose to export the dive list with all the dive details like the profile, Bookmarks, dive equipments and statistics. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-23Be more consistent in partial pressure namingGravatar Henrik Brautaset Aronsen
Lets just use pO₂ instead of PO2, ppO2, ppO₂, PO₂. They all mean the same, but it's better to be consistent Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-15HTML: Write cylinder data to the JSON files.Gravatar Gehad elrobey
Iterate the cylinders in each dive and write cylinders data to the exported JSON files. Moving the write attribute function to the top of the file. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-15HTML: export DC samples to JSON format.Gravatar Gehad elrobey
-Export Dive computer samples to JSON format, for dive profile plotting. -Add maxdepth and duration to attributes of the JSON dive object. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-15HTML: Report saving to file errors.Gravatar Gehad elrobey
Use subsurface report_error function in save-html and worldmap-save instead of the ridiculous print to standard output. Also use subsurface_fopen for the sake of different platforms. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06HTML: Better quoting to the export stringsGravatar Gehad elrobey
Move the quote function to membuffer.c and adding wrappers that call it from both xml and html exporters to get rid of redundancy. Quote the location, buddy, suit, tags and notes This prevents js code from crashing. [Miika Turkia: minor whitespace and code fix] Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-01Remove some unused variablesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-29HTML: Quote the '<' and '>' operators before inserting break tagsGravatar Gehad elrobey
The smaller than and greater than operators should be quoted before inserting the <br> tags in HTML. Otherwise breaks will be quoted which corrupts the format. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-29Small whitespace fixesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-29Need to quote some more HTML charactersGravatar Miika Turkia
Double quote will break HTML export when it is e.g. within notes. Similarly < and > characters are treated as HTML tags unless quoted properly. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-29Export tags in json arrayGravatar Gehad elrobey
This will help in searching based on tags Also some minor coding-style fixes Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-29Fix json exporter outputGravatar Gehad elrobey
The note is prefixed by a colon Fix the output of Null values of dive master, dive suit, location and buddy. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-29Some fixes for the json exporterGravatar Gehad elrobey
- check for zero Kelvin degrees temperature - show dives in group of trips - show the number of dives starting from 1 as in subsurface application. - produce localized output as selected in the user's preferences. - use &lt; and &gt; on the arrow buttons in the HTML file. - Call the translation functions for text strings Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-29HTML list exporterGravatar Gehad elrobey
Exporting the raw dive list into JSON format for later viewing with html and js files. Also some worldmap code organizations. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>