<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" value="initial-scale=1">
        <title>Python dependencies report</title>

        <style>{{ minified_stylesheet }}</style>
        <link rel="icon" type="image/x-icon" href="data:image/x-icon;base64,{{ base64_favicon }}">
    </head>
    <body>
        <div class="wrapper">
            <h1>Python dependencies monitor</h1>
            {% if requires_updates|length > 0 %}
                <h2 class="warn">Some dependencies needs updates</h2>
            {% else %}
                <h2 class="ok">All dependencies are up to date!</h2>
            {% endif %}

            <hr>

            {% if requires_updates|length > 0 %}
                {% for dependency in requires_updates %}
                    <div class="dependency">
                        <h3>
                            {{ dependency.package }}
                            <small>{{ dependency.latest_release }}</small>
                        </h3>
                        <p>
                            Released on
                            {{ dependency.latest_update|format_day }}.
                        </p>
                        <ul>
                            {% for project in dependency.requires_updates.keys()|sort %}
                                <li>
                                    <b>{{ project }}</b> needs to be updated on
                                    {% for file in dependency.requires_updates[project] %}
                                        {% if loop.revindex == 2 %}
                                            {% set suffix = " and " %}
                                        {% elif loop.revindex == 1 %}
                                            {% set suffix = "" %}
                                        {% else %}
                                            {% set suffix = ", " %}
                                        {% endif %}
                                        <code>{{ file }}</code>{{ suffix }}
                                    {% endfor %}
                                </li>
                            {% endfor %}
                        </ul>
                    </div>
                {% endfor %}

                <hr>
            {% endif %}

            <footer>
                Made with &#9829; by Pietro Albini<br>
                Generated with
                <a href="http://trackdeps.pietroalbini.io">trackdeps</a>,
                a Python library released under the MIT license.
            </footer>
        </div>
    </body>
</html>
