Skip to content

Commit

Permalink
Looped filter info, included string formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jaladh-singhal committed Jun 13, 2019
1 parent 1a76fc2 commit 1396598
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
20 changes: 9 additions & 11 deletions docs/_templates/facility_page.rst
Expand Up @@ -27,17 +27,15 @@ Following **Instruments** are present:
{% endfor %}

{% for filter_info in inst_data.itertuples() %}
* - {{ filter_info[0] }}
- {{ filter_info[1] }}
- {{ filter_info[2] }}
- {{ filter_info[3] }}
- {{ filter_info[4] }}
- {{ filter_info[5] }}
- {{ filter_info[6] }}
- {{ filter_info[7] }}
- {{ filter_info[8] }}
- {{ filter_info[9] }}
- {{ filter_info[10]|replace('_ ','\_ ') }}
{% for info in filter_info %}
{% if loop.first %}
* - {{ info }}
{% elif loop.last %}
- {{ info|replace('_ ','\_ ') }}
{% else %}
- {{ info }}
{% endif %}
{% endfor %}
{% endfor %}


Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -229,4 +229,4 @@ def setup(app):
os.makedirs('_facility_pages', exist_ok=True)
for facility in facility_list:
shutil.copyfile('_templates/facility_page.rst',
os.path.join('_facility_pages', facility + '.rst'))
os.path.join('_facility_pages', '{0}.rst'.format(facility)))

0 comments on commit 1396598

Please sign in to comment.