In the early afternoon I fixed a bug in the create_page function of
the Python version of tumblelog. If one used, for example, \1 in
the blog title the program would stop with an PatternError exception
stating "invalid group reference 1". The reason for this is that the
sub method processes any backslash characters unless a function
call is used. I explain this in more detail in Python re.sub
gotcha.
Now, in the updated version, all substitutes are properly using a
function call (lambda) instead of a string to prevent this issue from
occuring. While it's unlikely someone uses, for example, \1 as an
argument to --label-format and blowing up the archive, I decided to
fix that substitution as well: better safe than sorry.
As usual the latest version is available on
GitHub.
Even later in the afternoon I learned that the Python module argpase
supports positional arguments. So I removed the manual filename
fetching. I also changed the parser call to parse_args instead of
parse_known_args so tumblelog now warns if one has a typo in an
option name.
I also made sure that an issue with the filename or the template
filename printed a nice error message instead of a noisy stack trace.
Moreover, I now use a context object to pass around four common
arguments. This reduces the number of parameters of several functions.
And just after I had pushed 6.5.3 to GitHub I discovered another issue
in the Python version: if you create a site without a blog, just
pages, the archive is still partially generated. So I fixed this bug
and pushed 6.5.4 to GitHub.
A family of four is suddenly sealed inside their house with no way
out and must work together to survive against both their dwindling
resources and the mysterious, looming threat that is keeping them
trapped.
In the evening Jaiden, Alice, Esme, and I watched The Last
House. The movie was OK and I
rate it a 6 out of 10.
Last monday I bumped into a bug regarding how the archive of
tumblelog is rendered if the blog only has a date of which the year
and ISO year differ, for example 2018-12-31. No link was generated to
the 2019 calendar page while the page itself was generated.
The next day, while checking a calendar page on my phone I noticed
that the months didn't fit on the small screen.
And today I fixed both issues and did some more finetuning. Note that
because I changed _tumblelog.scss you have to regenerate the style
sheet for your site using sass.
The changelog for 6.5.0 is as follows:
Use grid and flex instead of float in .tl-archive
(styles/_tumblelog.scss)
Make month in calendar view smaller on small screens
(styles/_tumblelog.scss)
Fix bug regarding year not showing in Archive for e.g. 2025-12-31
Use assert instead of raising RuntimeError (tumblelog.py)
Format year correctly in create_year_pages (tumblelog.py)
Catch yaml.YAMLError instead of yaml.parser.ParserError (tumblelog.py)
Simplify create_archive to make every year count
As usual the latest version is available on
GitHub.