{% macro entry_rows(entry, index, home=false) %} {# On section and subcategory pages the group heading already names the row's use case #} {% set grouped_page = entry_groups and not group_categories %} {% set section_path = "/categories/" ~ parent_category.slug ~ "/" if parent_category else current_path %} {{ index }} {{ entry.name }} {% if entry.subcategories %}{{ entry.subcategories[0].name }}{% else %}{{ entry.categories[0] if home else category.name }}{% endif %} {% if entry.downloads is not none %}{{ "{:,}".format(entry.downloads) }}{% elif entry.source_type == 'Stdlib' %}Stdlib{% elif entry.bundled %}Bundled{% elif entry.badge %}{{ entry.badge }}{% else %}Not on PyPI{% endif %} {% if entry.stars is not none %}{{ "{:,}".format(entry.stars) }}{% elif entry.source_type %}{{ entry.source_type }}{% else %}—{% endif %} {% if entry.last_commit_at %}{% else %}—{% endif %} {% for subcat in entry.subcategories %} {{ subcat.name }} {% endfor %} {% for cat in entry.categories %} {{ cat }} {% endfor %} {% if entry.groups %} {% set group_url = filter_urls[entry.groups[0]] %} {{ entry.groups[0] }} {% endif %} {% if entry.source_type == 'Stdlib' %} Stdlib {% endif %} {% if entry.description %}
{{ entry.description | safe }}
{% endif %}
{% if entry.also_see %}
Also see: {% for see in entry.also_see %}{{ see.name }}{% if not loop.last %}, {% endif %}{% endfor %}
{% endif %}
{% if entry.owner %}{{ entry.owner }}/{% endif %}{{ entry.url | replace("https://", "") }} {% if entry.stars is not none %}/{{ "{:,}".format(entry.stars) }} stars{% endif %} {% if entry.last_commit_at %}/{% endif %}
{% endmacro %}