Fix gopher template

This commit is contained in:
Good Evening 2018-10-10 01:08:22 +03:00
parent 999c644869
commit c88a972177

View File

@ -1,11 +1,15 @@
gopher://{{data['ip']}}/ gopher://{{data['ip']}}/
Dirs: Dirs:
{% for dir in [f for f in self._host['data']['files'] if f['type'] == '1'] -%} {% for node in data['files'] -%}
+ {{dir['path']}} {% if node['type'] == '1' -%}
+ {{node['path']}}
{% endif -%}
{% endfor -%} {% endfor -%}
Other nodes: Other nodes:
{% for file in [f for f in self._host['data']['files'] if f['type'] != '1' and f['type'] != 'i'] -%} {% for node in data['files'] -%}
+ {{file['path']}} {% if node['type'] != '1' and node['type'] != 'i' -%}
{{file['name']}} + {{node['path']}}
{{node['name']}}
{% endif -%}
{% endfor -%} {% endfor -%}
Geo: {{data['geo']['country']}}/{{data['geo']['city']}} Geo: {{data['geo']['country']}}/{{data['geo']['city']}}