Takes an onbrand object with a loaded template and displays relevant details about the template.
Value
list with the following elements:
rpttype: Type of report (either PowerPoint or Word)
msgs: Vector of messages with details or any errors that were encountered
txt: Vector of template details in text format
df: Vector of template details in a dataframe
ft: Vector of template details in flextable format
isgood: Boolean variable indicating the current state of the object
Details
Provides relevant details about an onbrand object. For PowerPoint this contains the template names and elements present for that template. For Word it will contain defined text and table styles. This information can be displayed in the console, returned as text or formatted for use in RMarkdown documentation.
Examples
obnd = read_template(
template = file.path(system.file(package="onbrand"), "templates", "report.pptx"),
mapping = file.path(system.file(package="onbrand"), "templates", "report.yaml"))
details = template_details(obnd)
#> Mapping: /private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpbqJJ5c/temp_libpath78f636cc7423/onbrand/templates/report.yaml
#> Report Type: PowerPoint
#> title_slide (master/template)
#> > title (text)
#> > sub_title (text)
#> section_slide (master/template)
#> > title (text)
#> > sub_title (text)
#> title_only (master/template)
#> > title (text)
#> content_text (master/template)
#> > title (text)
#> > sub_title (text)
#> > content_body (text)
#> content_list (master/template)
#> > title (text)
#> > sub_title (text)
#> > content_body (list)
#> two_content_header_list (master/template)
#> > title (text)
#> > sub_title (text)
#> > content_left_header (text)
#> > content_left (list)
#> > content_right_header (text)
#> > content_right (list)
#> two_content_header_text (master/template)
#> > title (text)
#> > sub_title (text)
#> > content_left_header (text)
#> > content_left (text)
#> > content_right_header (text)
#> > content_right (text)
#> two_content_list (master/template)
#> > title (text)
#> > sub_title (text)
#> > content_left (list)
#> > content_right (list)
#> two_content_text (master/template)
#> > title (text)
#> > sub_title (text)
#> > content_left (text)
#> > content_right (text)
obnd = read_template(
template = file.path(system.file(package="onbrand"), "templates", "report.docx"),
mapping = file.path(system.file(package="onbrand"), "templates", "report.yaml"))
details = template_details(obnd)
#> Mapping: /private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpbqJJ5c/temp_libpath78f636cc7423/onbrand/templates/report.yaml
#> Report Type: Word
#> onbrand style (word style, style type)
#> --------------------------------------
#> Code (Code, paragraph)
#> Figure_Caption (graphic title, paragraph)
#> Heading_1 (heading 1, paragraph)
#> Heading_2 (heading 2, paragraph)
#> Heading_3 (heading 3, paragraph)
#> Normal (Normal, paragraph)
#> Notes (Notes, paragraph)
#> TOC (toc 1, paragraph)
#> Table_Caption (table title, paragraph)
#> Table (Table Grid, table)