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 know 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: 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.
Yesterday I rewrote the Python version of tumblelog to use
dataclasses. I also started to add type hints, which I finished today.
I pushed version 6.2.0 of tumblelog to
GitHub after thoroughly
testing the new code.
While testing tumblelog I came upon an issue with the calendar
overview for 2026: May
and later had no entries. After some checking I found the bug: the
Markdown file for Plurrrr had two times a date entry for the
24th of May! So i updated both the Perl and Python version
of tumblelog to detect this issue and pushed 6.2.1 to
GitHub.
Jill leaves voice messages to her deceased sister telling her about
her chaotic life in San Francisco. Unwittingly, a mysterious Austin
TX real estate agent begins to receive their confessions..
In the evening Esme and I watched Voicemails for
Isabelle. I liked the movie
and rate it a 7 out of 10.
Baron "Bear" Bailey breaks a novelty charm to force his co-worker
Nikki Freeman to love him, but the supernatural compulsion warps her
mind into violent obsession, trapping him in a nightmare he cannot
wish away.
In the evening Jaiden and I watched
Obsession. Jaiden liked the
movie a lot, she called it the scariest movie she had ever seen. I
liked the movie and rate it a 7 out of 10.
In the evening I pushed a lot of small cosmetic code changes I had
made over the past days to tumblelog to GitHub. Well, first I had to
pull 2 commits I had made via the GitHub site because of a patch by
Jan Neduchal. I used:
git pull --rebase
To get those 2 commits and to replay my 25 new commits on top of those
2. The updated version is now available on GitHub.
Orbiting a planet on the brink of war, scientists test a device to
solve an energy crisis, and end up face-to-face with a dark
alternate reality.
In the evening Jaiden and I watched The Cloverfield
Paradox. Jaiden didn't like
the movie and mostly didn't watch. I think the movie is OK, I watched
it for the second time, and rate it a 6 out of 10.
Discover the unforgettable tales of one of science fiction and
fantasy’s greatest authors in this bundle of Tanith Lee ebooks from
DAW! Meet a Martian vampire desperate to evade the prying eyes of a
private detective in Sabella. Follow people living on the dark side
of a planet that might be about to contact another civilization in
Day by Night. Explore the mysteries of a medieval-inspired world
with a reluctant goddess in The Birthgrave. There are 26 books in
total in this bundle from the master fantasist, so grab them all now
at the price of your choice, and support BINC with your purchase!
In the afternoon I bought the Tanith Lee Collection Humble
Bundle,
26 books in total. It included favorites of mine like Kill The
Death, Tales from the Flat Earth, The Wars of Vis, and The
Birthgrave Trilogy. Sadly, The Blood of Roses is not included, a
book I really would like to reread.
After I mentioned a Jurassic Park anecdote the other
day, I watched the movie
again. I must have seen it at least ten times now. This time, I
researched every computer/software I spotted.
In the early afternoon I watched photos of hardware used in the
Jurassic Park movie. Because I owned SGI
hardware in the past it was a little trip
down memory lane.
Each time I open in vim my freeCodeCamp Python course notes, which is a
Markdown file, it starts folded. I prefer to see the entire file at
start up so I added the following to my vimrc:
autocmd BufRead *.md normal zR
With zR meaning: open all folds in the file. The opposite is zM.
While editing I prefer to toggle folding with za.
Peter Parker tries to stop Adrian 'The Vulture' Toomes from selling
weapons made with advanced Chitauri technology while trying to
balance his life as an ordinary high school student.
In the evening I watched Spider-Man:
Homecoming. I liked the movie
and rate it a 7 out of 10.
Yesterday I learned how to change the margin of the PDF file Pandoc
generates. But I forgot about the paper size. I live in the
Netherlands and A4 is the common format here. First, I wanted to know
how to check the current paper size of a PDF file. This can be done on
the macOS command line as follows:
mdls freecodecamp.pdf |
grep -i page
This reports the number of pages, the height (792 for US letter) and
width (612 for US letter). The values are in PostScript points; 1"
equals 72 points or 8.5" × 11" for US letter.
How to change this? Well, it turns out that with one Pandoc variable
one can control both the margin and the paper size:
-V geometry="margin=1in,a4paper"
So the command for generating the PDF via Pandoc in a Docker container
and viewing the output in the Preview application on macOS becomes:
In the evening I wanted to know at what time exactly I had run a
specific command on the command line of macOS. Could I get the history
of commands entered on the command line with each a time stamp? The
answer is yes, with fc (Fix Command):
fc -li 1
This lists (-l) the history from the start (1) with time stamps in ISO8601
format (-i). Note that without the 1 you get the last maximum 16
commands.
Now I could grep the output of this command. But wait, fc comes with
a match option (-m):
fc -li -m 'docker*' 1
This lists all events in the history that starts with docker and
shows the ISO8601 time stamp.