{% extends "_base.html" %} {% block title %}Trends explorer — yt-shorts-trends{% endblock %} {% block content %}

Trends explorer

{% if db_error %}
Could not open trends database at .cache/trends.db. See server log for details.
{% endif %} {% if selected_window is none and not db_error %} {% if shift %} {% set keys = (shift.last_7d.keys() | list) + (shift.prior_7d.keys() | list) %} {% for slug in keys | unique | sort %} {% set last = shift.last_7d.get(slug, 0) %} {% set prior = shift.prior_7d.get(slug, 0) %} {% set delta = last - prior %} {% endfor %}

Based on {{ shift.last_runs }} run(s) in the last 7d, {{ shift.prior_runs }} prior.

{% else %}

No trend data yet

Run python main.py --output at least twice across different days to populate the trend index.

{% endif %} {% endif %} {% if selected_window and not db_error %} {% if window_rows %} {% for row in window_rows %} {% endfor %} {% else %}

No trend data yet

Run python main.py --output at least twice across different days to populate the trend index.

{% endif %} {% endif %} {% endblock %}