cleanup more, fixing archives

This commit is contained in:
Tyrel Souza 2023-07-20 23:18:29 -04:00
parent 0636c94472
commit 525ad0cd65
No known key found for this signature in database
GPG Key ID: F3614B02ACBE438E
6 changed files with 26 additions and 29 deletions

View File

@ -28,21 +28,13 @@ This returned me a ``<ebooklib.epub.EpubBook object...>`` , seeing I had an Epub
.. code:: python .. code:: python
['add_author', 'add_item', 'add_metadata', 'add_prefix', ['add_author', 'add_item', 'add_metadata', 'add_prefix',
'bindings', 'bindings', 'direction', 'get_item_with_href', 'get_item_with_id',
'direction', 'get_items', 'get_items_of_media_type', 'get_items_of_type',
'get_item_with_href', 'get_item_with_id', 'get_items', 'get_metadata', 'get_template', 'guide',
'get_items_of_media_type', 'get_items_of_type', 'get_metadata', 'items', 'language', 'metadata', 'namespaces', 'pages', 'prefixes',
'get_template', 'guide', 'reset', 'set_cover', 'set_direction', 'set_identifier', 'set_language',
'items', 'set_template', 'set_title', 'set_unique_metadata', 'spine',
'language', 'templates', 'title', 'toc', 'uid', 'version']
'metadata',
'namespaces',
'pages', 'prefixes',
'reset',
'set_cover', 'set_direction', 'set_identifier', 'set_language', 'set_template', 'set_title', 'set_unique_metadata', 'spine',
'templates', 'title', 'toc',
'uid',
'version']
Of note, the ``get_item_with_X`` entries caught my eye, as well as ``spine``. For my file, ``book.spine`` looks like it gave me a bunch of tuples of ID and a ``"yes"`` string of which I had no Idea what was. I then noticed I had a ``toc`` property, assuming that was a Table of Contents, I printed that out and saw a bunch of ``epub.Link`` objects. This looks like something I could use. Of note, the ``get_item_with_X`` entries caught my eye, as well as ``spine``. For my file, ``book.spine`` looks like it gave me a bunch of tuples of ID and a ``"yes"`` string of which I had no Idea what was. I then noticed I had a ``toc`` property, assuming that was a Table of Contents, I printed that out and saw a bunch of ``epub.Link`` objects. This looks like something I could use.

View File

@ -10,7 +10,7 @@ I have struggled a lot to get the firmware on, due to the not great interface th
The issue is, that it prompts you to change the password, but then when you change it on the page you land on, nothing connects anymore and you can't access the router. The issue is, that it prompts you to change the password, but then when you change it on the page you land on, nothing connects anymore and you can't access the router.
The solution is to click "Set Passwordf" in the Administration menu on the left, and set it there. The solution is to click "Set Password" in the Administration menu on the left, and set it there.
Even though there is a prompt to set the password on every page, that will change other settings too and break things. Even though there is a prompt to set the password on every page, that will change other settings too and break things.
The router isn't great, and the software is awful so thats why I'm installing OpenWRT anyway. The router isn't great, and the software is awful so thats why I'm installing OpenWRT anyway.

View File

@ -2,3 +2,5 @@
pub: pub:
venv/bin/invoke publish venv/bin/invoke publish
live:
venv/bin/invoke livereload

View File

@ -110,6 +110,17 @@
{% block content %} {% block content %}
{% endblock %} {% endblock %}
{% block archives %}
<div class="archives">
<h2>Archives of {{ SITENAME }}</h2>
{% for article in dates %}
{% if loop.index > 1 %}
<dt>{{ article.locale_date }}</dt>
<dd><a href='{{ article.url }}'>{{ article.title }}</a></dd>
{% endif %}
{% endfor %}
</div>
{% endblock %}
</div><!-- end #mainContent --> </div><!-- end #mainContent -->
@ -176,6 +187,7 @@
{% endif %} {% endif %}
</ul> </ul>
</div><!-- end #sidebar --> </div><!-- end #sidebar -->
</div><!-- end #container --> </div><!-- end #container -->
{% include 'analytics.html' %} {% include 'analytics.html' %}

View File

@ -3,7 +3,7 @@
{% block content %} {% block content %}
{% if articles %} {% if articles %}
{% for article in articles %} {% for article in articles %}
{% if loop.index <= 3 %} {% if loop.index <= 1 %}
<div class="blogItem"> <div class="blogItem">
<h2><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h2> <h2><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h2>
<h3>{{ article.locale_date }}</h3> <h3>{{ article.locale_date }}</h3>
@ -11,17 +11,6 @@
<h3 class="blogMeta">{% if not SUPPRESS_ITEM_CATEGORIES %}Category: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>{% endif %} | {% if article.tags %} Tags: {% for tag in article.tags %} <span><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> {% if not loop.last %} / {% endif %} </span> {% endfor %}</h3>{% endif %}</div> <h3 class="blogMeta">{% if not SUPPRESS_ITEM_CATEGORIES %}Category: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>{% endif %} | {% if article.tags %} Tags: {% for tag in article.tags %} <span><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> {% if not loop.last %} / {% endif %} </span> {% endfor %}</h3>{% endif %}</div>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<div class="archives">
<h2>Archives of {{ SITENAME }}</h2>
{% for article in dates %}
{% if loop.index > 3 %}
<dt>{{ article.locale_date }}</dt>
<dd><a href='{{ article.url }}'>{{ article.title }}</a></dd>
{% endif %}
{% endfor %}
</div>
{% endif %} {% endif %}
{% endblock content %} {% endblock content %}

View File

@ -1,2 +1,4 @@
{% extends "index.html" %} {% extends "index.html" %}
{% block title %}{{ SITENAME }} - {{ tag }}{% endblock %} {% block title %}{{ SITENAME }} - {{ tag }}{% endblock %}
{% block archives %}{% endblock %}