Module write_html

Source
Expand description

Write a single HTML file from a single EBML file input

Some assumptions are made:

  • Common HTML assets (CSS, template images) are in a folder ../assets/
  • Cross-crate knowledge of the Process struct is required

A single public function performs this HTML writing task, which calls private functions to write their portions of the HTML file.

FunctionsΒ§

compose_bottom_of_html_file πŸ”’
Close html
compose_html_body πŸ”’
Body portion, which is the bulk of the HTML file. The composition is broken up into other sequential functions:
compose_html_body_end_of_sections_and_banners πŸ”’
Close out the sections, and include the process document’s header and footer banners
compose_html_body_rev_req_page πŸ”’
Revisions and Requirements pages
compose_html_body_section πŸ”’
Write every Section in the Process, sequentially. Include Steps within Sections and SubSteps within Steps.
compose_html_body_section_step_action_sequence πŸ”’
Print ActionSequence type SubStep
compose_html_body_section_step_command πŸ”’
Print Command type SubStep
compose_html_body_section_step_context πŸ”’
Print Context type SubStep
compose_html_body_section_step_image πŸ”’
Print Image type SubStep
compose_html_body_section_step_objective πŸ”’
Print Objective type SubStep
compose_html_body_section_step_out_of_scope πŸ”’
Print Out of Scope type SubStep
compose_html_body_section_step_table πŸ”’
Print an arbitrary table in its own div element, based on the contents of a β€œTable” struct (including a caption)
compose_html_body_section_step_verification πŸ”’
Print Verification type SubStep
compose_html_body_section_step_warning πŸ”’
Print Warning type SubStep
compose_html_body_title_page πŸ”’
The Title Page
compose_html_body_toc πŸ”’
Table of Contents page, and the Subject/Product Resources page…
compose_html_head πŸ”’
Head portion, which references external style files, stored in the Process struct at β€œTemplates”
compose_top_of_html_file πŸ”’
Basic doctype declaration and html opening
generate_complete_html
Single public function that writes out a specially-formatted HTML file β€œfilename” according to the data stored in the Process struct β€œp”