Varia's Common Fun(d) - {{ year }}

{% set check = namespace(color=False, quarter=False) %} {% for row in data %} {% set rowloop = loop %} {% set extracheck = namespace(bold=False) %} {% set supercheck = namespace(items=[]) %} {% for cell in row %} {% if rowloop.index > 33 %} {% set check.color = 'highlight' %} {% else %} {% if loop.index < 5 %} {% set check.color = 'out' %} {% elif loop.index < 8 %} {% set check.color = 'in' %} {% else %} {% set check.color = 'black' %} {% endif %} {% endif %} {% if 'QUARTER' in cell|string or 'COMMON' in cell|string or 'TOTAL' in cell|string %} {% set extracheck.bold = True %} {% if 'QUARTER 1' in cell|string %} {% set check.quarter = Q1 %} {% elif 'QUARTER 2' in cell|string %} {% set check.quarter = Q2 %} {% elif 'QUARTER 3' in cell|string %} {% set check.quarter = Q3 %} {% elif 'QUARTER 4' in cell|string %} {% set check.quarter = Q4 %} {% endif %} {% elif 'infrastructure' in cell|string %} {% for row in check.quarter %} {% if 'infrastructure' in row[6] or 'treat' in row[6] %}
{{ supercheck.items.append(row[0]) }}
{% endif %} {% endfor %} {% elif 'EUR' in cell|string %} {% set cell = cell.replace('EUR', '') %} {% if extracheck.bold %} {% if loop.index > 8 %} {% if rowloop.index > 30 %} {% set check.color = 'highlight' %} {% endif %} {% endif %} {% else %} {% endif %} {% elif '- - -' in cell|string %} {%- elif cell|string == '' -%} {% else %} {% endif %} {% endfor %} {% endfor %}
{{ cell }} {{ cell }} {% if supercheck %}
    {% for item in supercheck.items %}
  • {{ item }}
  • {% endfor %}
{% endif %}
{{ '€ {:,.2f}'.format(cell|float) }}{{ '€ {:,.2f}'.format(cell|float) }} {{ cell }} 

This page is based on the financial spreadsheets of Varia. They are synced to the server with Syncthing (located at /srv/train-your-core/finances/) and processed with a Python script (located at /var/www/intranet/common-fund). This page is updated every night (using the cron.sh script in the same folder)!

Link to common fun(d) pad: https://pad.vvvvvvaria.org/common-fund-ins-and-outs

Link to the code to make this page: https://git.vvvvvvaria.org/varia/common-fund-status-viewer