Generate a help.html with help text at ``output_path`` ``environment`` is a jinja Environment object used to generate the webpage. ``test`` is to generate a stable output for testing only
(output_path, environment, test=False)
| 145 | |
| 146 | |
| 147 | def generate_help(output_path, environment, test=False): |
| 148 | """ |
| 149 | Generate a help.html with help text at ``output_path`` ``environment`` is a |
| 150 | jinja Environment object used to generate the webpage. ``test`` is to |
| 151 | generate a stable output for testing only |
| 152 | """ |
| 153 | if test: |
| 154 | base_context_mapping = base_context_test |
| 155 | else: |
| 156 | base_context_mapping = base_context |
| 157 | template = environment.get_template("help.html") |
| 158 | html = template.render(**base_context_mapping) |
| 159 | write_file(output_path, "help.html", html) |
| 160 | |
| 161 | |
| 162 | def generate( |
no test coverage detected