Skip to content

Commit

Permalink
Fix output doc generation
Browse files Browse the repository at this point in the history
  • Loading branch information
kizniche committed Sep 29, 2024
1 parent 7bd255d commit 3b2f3c3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mycodo/scripts/generate_doc_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ def generate_controller_doc(out_file, each_data):
if 'usage' in each_data and each_data['usage']:
out_file.write(f"\nUsage: {each_data['usage']}\n")

if 'options_enabled' in each_data or 'custom_options' in each_data:
if ('options_enabled' in each_data or
'custom_options' in each_data or
'custom_channel_options' in each_data or
'custom_commands' in each_data):
out_file.write('<table><thead><tr class="header"><th>Option</th><th>Type</th><th>Description</th></tr></thead><tbody>')

if 'options_enabled' in each_data and 'i2c_location' in each_data['options_enabled']:
Expand Down Expand Up @@ -248,7 +251,10 @@ def generate_controller_doc(out_file, each_data):
if 'phrase' in each_option:
out_file.write(f"<td>{each_option['phrase']}</td></tr>")

if 'options_enabled' in each_data or 'custom_options' in each_data:
if ('options_enabled' in each_data or
'custom_options' in each_data or
'custom_channel_options' in each_data or
'custom_commands' in each_data):
out_file.write('</tbody></table>')

out_file.write("\n\n")

0 comments on commit 3b2f3c3

Please sign in to comment.