{% set i = 1 %}

{{dir.title()}}

{% set well_filenames = []%} {% set wellnames = [] %} {% for wellname in dir.files %} {% if wellname.filename().find('well') == 0 %} {% set _ = wellnames.append(wellname) %} {% endif %} {% endfor %} {% for wellname in wellnames %} {% set well_path = plots_dir + dir.path + '/' + wellname.filename() %} {% set _ = well_filenames.append(wellname.filename()) %} {% if path_exists(well_path) %} {% set cp = get_embedded_config(well_path) %} {% if cp.check_option(wellname.filename(), 'filenames') %} {% set _ = well_filenames.extend(get_embedded_config(well_path).get(wellname.filename(), 'filenames').split(',')) %} {% endif %} {% if not cp.check_option(wellname.filename(), 'collapse') %} {{ setup_template_render(well_path, None) }} {% else %}

{% if cp.check_option(wellname.filename(), 'title') %} W{{loop.index}}. {{cp.get(wellname.filename(), 'title')}} {% else %} W{{loop.index}}. {{wellname.filename()}} {% endif %}

{{setup_template_render(well_path, None) }}
{% endif %} {% endif %} {% endfor %}
{% if dir.files %}

Additional Files

The following files were also found in this directory:
{% set count = [1] %} {% for file in dir.files %} {% if path_exists(file.path) %} {% set cp = get_embedded_config(file.path) %} {% if not file.filename() in well_filenames %}

{% if cp.check_option(file.filename(), 'title') %} B{{count|length}}. {{cp.get(file.filename(), 'title')}} {% else %} B{{count|length}}. {{file.filename()}} {% endif %}

{{file.render()}}
{% set _ = count.append(1) %} {% endif %} {% endif %} {% endfor %}
{% endif %}