QZ qz thoughts
a blog from Eli the Bearded
Tag search results for blosxom|administrivia Page 2 of 6

May Updates


A bunch of things of small changes this first week of May.

  1. The qzpostfilt tool has a bug fix with inline <code> and a new close & open paragraph operator: .pp
  2. The is a search box on the blog to run tag searches
  3. The aaa_tags and paginateqz plugins have slight changes to make search results and later pages marked as such
  4. There are flavour template and css changes to go with that
  5. I have finished going through all old blog posts and fixing the easily fixable links.
  6. I have gone through all the old blog posts and fixed non-UTF-8 characters and title formatting.

UTF-8 Fixes


It looks like there will only be documentation fixes to the bug I filed about the open pragma not working with the FileHandle module. The pragma lets you specify the expected encoding of all files being open()ed. The FileHandle module provides an alternative syntax for open(). The original blosxom code used that alternative syntax. So depending on the code path, the expected encoding was one thing or another.

I've patched blosxom again to not use FileHandle and specify all UTF-8 input. Net result is two fewer lines of code, because I can use "goes out of scope" to automatically close file handles now. That didn't work with one global $fh. One of Rael Dornfest's original points of pride about Blosxom is how few lines of code were used to implement it, so I feel good about this patch.

(Most people don't care about how many lines of code are used; particularly when it means skimping on features. But it certainly worked for me.)

Along with this change, my /qz/plugins/flavour_dir was modified significantly to match. It originally was based on Blosxom's own template reader, so it had the same use FileHandle issue. I made slight changes to a couple of other plugins to ensure UTF-8 handling, too, but those are minor.

Now I can have a link to the UTF-8 post like so:

/qz/blosxom?tag=utf-8✓
without having the UTF-8 check character come out as mojibake.

Twitter Redux


To go along with the revived blog, I'm going to try to revive my Twitter account, also long dormant. I've added it to the side bar under the "contact" heading.

I've been working on blog stuff almost every day for the last week, but there's not a lot to show for it. Most of the work has been going through old posts, looking for dead links to fix or update. That's slow and not very visible work, yet afterwards I feel like I've done stuff for the blog and don't need to do more.

The other thing I've been doing is figuring out why UTF-8 works in tags but not in body text. And the answer seems to be the Perl module FileHandle used by blosxom, which is a wrapper around IO::File these days, doesn't respect the use open IO => ':utf8' pragma. I've filed a bug report but I'll probably have to modify the code to fix that in a more timely fashion. sigh I was hoping to not have to make so many updates to the blosxom program itself.

Improved Tags Plugin


First major revision to the aaa_tags plugin. Several new features with this.

  1. AND search for multiple tags. Use ^ to separate tags.
  2. OR search for multiple tags. Use | to separate tags.
  3. NOT search for excluding tags. Prefix with ~ to exclude.
  4. All of those can be (crudely) combined for a complex search. Use , to combine them.
  5. Multiple uses of tag= CGI parameter allowed, if individual words, they will be considered an OR list.
  6. UTF-8 tags are now allowed.
    Tags can be ASCII letters, numbers, hyphen and underscore, plus any Unicode codepoints above U+00A0 (A0 is non-breaking space; that is not allowed in tags).
  7. If there are stories before filter() but the tag search has removed them all by the end of filter(), then story() will (attempt to) display an error page. Due to the way date filtering works in blosxom, story() may not get the chance. But it works for date unfiltered stuff.
  8. New template for that error: aaa_nothing_left
  9. New interpolatable variables.
    • Configuration parameters $aaa_tags::top_count and $aaa_tags::threshold
    • $aaa_tags::frequent_tags has a list of tags, much like the old $aaa_tags::top_tags, but alpha-sorted and a list of all tags with more than $aaa_tags::threshold uses.
    • $aaa_tags::this_search_terse has a value suitable for stuffing into a tag= CGI parameter for repeating the current search. Can be used anywhere.
    • $aaa_tags::this_search_verbose has a text description of the search, only for use in the error template.
    • $aaa_tags::this_search_table has a table of usage frequencies of the tags in the current search, only for use in the error template.

This is a lot of new code. There are probably bugs lurking in all of this. I've only done cursory testing, but I've been very happy with the results.

Reviews from 2020
/qz/blosxom?tag=review^2020
2003, 2004, 2005, 2006, 2007, and 2008 posts without "deadlink" tag (but see below)
/qz/blosxom?tag=2003|2004|2005|2006|2007|2008,~deadlink
Posts from 2020 not tagged with "blog"
/qz/blosxom?tag=2020,~blog
Blosxom or "administrivia" posts, as two tags
/qz/blosxom?tag=blosxom&tag=administrivia
UTF-8 tag, unique to this specific post.
/qz/blosxom?tag=utf-8✓
A search that will return no results.
/qz/blosxom?tag=blog,~blog

Testing this has made me realize (a) I've got a real problem with bad "deadlink" tagging, as in posts that should have that tag don't; and (b) the deadlink test was kinda flawed in that in only looked for 200 responses so sites that redirected http: to https: got mistakenly flagged. I need to fix both of those issues before the results of the example deadlink search reflect what really should be called deadlinks.