March 06, 2006 Archives

Mon Mar 6 20:36:31 NZDT 2006

Remembering Categories

Nanoblogger wants you to remember the numeric ids for your categories, and doesn't seem to let you refer to them by name (which isn't unreasonable, as the names may have spaces and other metacharacters in them, and therefore might make quoting a big chore).

But it's difficult to remember them all the time, so I have hacked the build_catlinks() in plugins/blog_links.sh :-

    cat_id=`basename $cat_index .html | cut -c5-`
    cat <<-EOF
        <!-- $cat_id $NB_CategoryTitle --> \
          <a href="\${ARCHIVES_PATH}$cat_index"> \
          $cat_id $NB_CategoryTitle</a> ($cat_total) <br />

This creates a new value, $cat_id, made from $cat_index (which is the filename of the category datafile, e.g. cat_1.html) by stripping off the extension, and then the first four characters. This value is then added into the comment section, and the output text.

Unseen in the code snippet here is that the output from build_catlinks() is sorted (so the $cat_id in the comment is used to get them in the right order), and then the comment block is removed from the final HTML.

Another satisfying nanoblogger hack.


Posted by Jim Cheetham | Permanent Link

Mon Mar 6 14:04:00 NZDT 2006

IRC and antivirus

Oh, I know it's old news now, but I was very amused (“rofl”) with The Register's article about Symantec Norton antivirus booting people off their IRC connections when someone says the magic words "startkeylogger"!
http://www.theregister.co.uk/2006⁄03/03/symantec_security_glitch/

It's all over google as well, if you should care to look. At the moment, I'm typing from a windows box, with a Symantec product running … but it's not one of the Norton ones, so I was able to say these naughty words on a friendly IRC channel (one inhabited by non-Windows people, so no-one was disconnected!)


Posted by Jim Cheetham | Permanent Link