Generate a Table of Contents of flight summaries
Usage
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
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
, saving the TOC in output_dir
. The TOC page can either point
to the flight summary reports where they are, or copy them to a single directory.
htmls_reports
should be a vector of HTML filenames including the full path (i.e., the object returned by uas_report
). Reports will
be appear in the Table of Contents in the same order.
The default behavior is to create links to the flight summary reports where they currently are. The function 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
is 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.
To copy the flight summary reports to a common location, pass a value for gather_dir
. gather_dir
should be a 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 = '.'
If gather_dir
does not already exist, R will attempt to create it.
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 that you can use to have additional layers appear on the map. 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 filenames that contain HTML text for a page header
and footer (i.e., for branding elements).