{% for fn in sorted(filestats.keys()) %} {% if not filestats[fn]["is_dir"] %} {{ filestats[fn]["formatted_stat"] }} {{ fn }} dl {% else %} {{ filestats[fn]["formatted_stat"] }} {{ fn }} {% end %} {% end %}