2023-10-27

Back's still out, so not much done.

I did get a little work done trying to build a hat for my rpi. I started with kicad, giving it another shot. The schematic capture was rough but doable but I couldn't get the board layout to work to save my life. I gave it an hour then figured out how to get Eagle working. Then I had a working schematic and PCB within an hour.

I also wanted to get a page on this blog of tags sorted by page count:

def counted(tags):
    return sorted(tags, reverse=True, key=lambda tag : len(tag[1]))

JINJA_FILTERS = {
    "chronologically": chrono_articles,
    "sort_by_article_count": partial(sorted,
        key=lambda tag: len(tag[1]), reverse=True),
}

DIRECT_TEMPLATES = [
    "index",
    "authors",
    "tags",
    "archives",
    "tag-counts"
]

I then created a tag-counts.html page in my templates:

{% extends "base.html" %}
{% block content_title %}{% endblock %}
{% block content %}
{% if articles %}
<ul>
{% for tag, articles in tags|sort_by_article_count %}
<li><a href="/tag/{{ tag }}">{{ tag }}
({{ articles | length }} posts)</li>
{% endfor %}
{% endif %}
{% endblock content %}

Now, there's a tag-counts.html page available.


Tags: , , , ,