Generate a Table of Contents of flight summaries

uas_toc(
  html_reports,
  output_dir = ".",
  output_fn = "index.html",
  gather_dir = NULL,
  toc_title = "UAS Flight Summaries",
  toc_desc = NULL,
  fltmap_show = TRUE,
  fltmap_kml = FALSE,
  fltmap_base = NULL,
  header_html = NULL,
  footer_html = NULL,
  overwrite_toc = FALSE,
  overwrite_gather = FALSE,
  open_toc = FALSE,
  quiet = FALSE
)

Arguments

html_reports

HTML file names of flight summaries

output_dir

Output directory

output_fn

Output file name

gather_dir

Subdirectory of output_dir where HTML files will be copied

toc_title

Title to show at the top of the Table of Contents

toc_desc

A short description to appear under the title

fltmap_show

Show a map of all flight areas, logical

fltmap_kml

Create a KML of all flight areas, logical

fltmap_base

A list object containing of background KML files and their symbology for the flight map, see Details.

header_html

HTML file name or URL to use as a page header

footer_html

HTML file name or URL to use as a page footer

overwrite_toc

Overwrite existing file, logical

overwrite_gather

Subdirectory of output_dir where HTML files will be copied

open_toc

Open the table of contents in a browser when done, logical

quiet

Suppress messages, logical

Details

This function generates a master Table of Contents HTML page for a set of individual flight summaries created by uas_report.

htmls_reports should be a vector of HTML filenames, including the full path. Reports will be appear in the Table of Contents in the same order. To link to the reports, R will attempt to create relative paths from the output_dir to the locations of the htmls_reports. At a minimum, this requires output_dir and htmls_reports to be on the same volume. Preferably output_dir will be a parent directory of htmls_reports. If your HTML reports are scattered across many directories, consider using gather_dir which will put them all in one place.

gather_dir specifies an optional sub-directory of output_dir where the HTML files in htmls_reports (and any associated files such as thumbnails) will be copied. gather_dir should be relative to output_dir (not an absolute path). To copy HTML files in output_dir itself (i.e., not a sub-directory), set gather_dir = '.' Links in the TOC will then point to the copies of the HTML files in gather_dir. If gather_dir does not already exist, R will attempt to create it. To link to the HTML files where they currently are (i.e., not make copies), let gather_dir = NULL (the default).

If fltmap_show = TRUE, the Table of Contents will include an interactive map showing the flight areas of all the flight summaries on the page. fltmap_base is an optional list of lists you can use to include additional base layers. Currently only polygon and polyline KML files are supported as additional base layers. Each list element should be a named list with three elements: kml_fn (a KML file name), color (a named color or hex code for the outline), and weight (outline thickness in pixels).

header_html and footer_html allow you to specify a page header and footer, i.e., to add branding elements to the TOC.

See also