💾 Archived View for ew.srht.site › en › 2024 › 20240616-flightlog-12.gmi captured on 2024-06-20 at 11:51:00. Gemini links have been rewritten to link to archived content
View Raw
More Information
⬅️ Previous capture (2024-06-16)
-=-=-=-=-=-=-
2024-06-16
Towards a proper FlightLog 12 -- Reducing Complexity
#flightlog
Complexity and its Little Brother Automation
My technical mind went into overengineering mode.
- How about adding some MetaTags to a gemtext post and extract the post, the tags, the abstract, any timestamps from it and produce separate snippets to be concatenated as indices, included in feeds, and what not.
- And while at it, how about a smarter way of preparing a published state, without scanning all files again for their tags and what not?
- Ok, the price is fairly high, I would have to manually add all these missing MetaTags to some 200 old posts. Sigh.
Resisting the Lure
After making no progress for some time, I reconsidered. The capsule has now been overhauled and much of that growing complexity, äh, mess, rather, was cleared out.
- I completely removed the "Deutsche Abteilung", it was only two or three posts anyway. Should I ever feel the urge, I can add it back in, or set up a separate capsule elsewhere.
- I wanted to remove the ./en sub dir and add a sym-link instead, however, sourcehut ignores anything but ordinary files. For good reasons, that is. So I kept the sub directory in the hope to break not too many external references.
- Reducing languages to just one simplifies scripting quite a bit. So those got a tidy up, as did the Makefile.
- I divided the rather long tag index into one file per tag. That required editing of all posts, but I did that with a simple shell plus perl 1-liner script. It was fortunate, that I had reduced the number of tags previously.
- One file per tag trivially produces a hub (or index) of my ribbons --- small collections of posts about a common theme, linked together to "follow the blue line through the capsule" --- although without any comments.
- I was reminded AGAIN, that grep does return an error, if did not find anything! This is particularly irritating, when using "set -e", which I tend to do.
So, all in all, I'm happy that I could resist the lure of automation, the little brother of complexity.
---
man grep
EXIT STATUS
Normally the exit status is 0 if a line is selected, 1 if no lines were selected, and 2 if an error occurred. However, if the -q or --quiet or --silent is used and a line is selected, the exit status is 0 even if an error occurred.
Home