Wacky weather day

, | Tweet this

Today was one of those weird New England days where every weatherman was right--didn't even matter what they predicted. On the drive to work it was overcast. At around noon it was snowing with heavy gusts of wind that made the snow go horizontal. At like 2, the snow had turned to rain. At 5, it was sunny and while there were a few clouds dotting the sky in wispy trails, there wasn't any evidence of rain or gusty snow. Wacky.

verify_installation for pyblosxom

, | Tweet this

A couple of weeks ago, I checked in code to help out PyBlosxom installation and configuration. I made changes to pyblosxom.cgi so that you could run it from the prompt:


It tells you your Python version, OS name, and then proceeds to verify your config properties (did you specify a valid datadir? does it exist?...) and then initializes all your plugins and executes verify_installation(request) on every plugin you have installed that has the function.

As a plugin developer, you should add a verify_installation function to your plugin module. Something like this (taken from pycategories):

   def verify_installation(request):
       config = request.getConfiguration()

       if not config.has_key("category_flavour"):
           print "missing optional config property 'category_flavour' which allows "
           print "you to specify the flavour for the category link.  refer to "
           print "pycategory plugin documentation for more details."
       return 1

Basically this gives you (the plugin developer) the opportunity to walk the user through configuring your highly complex, quantum-charged, turbo plugin in small baby steps without having to hunt for where their logs might be.

So check the things you need to check, print out error messages (informative ones), and then return a 1 if the plugin is configured correctly or a 0 if it's not configured correctly.

This is not a substitute for reading the installation instructions. But it should be a really easy way to catch a lot of potential problems without involving the web server's error logs and debugging information being sent to a web-browser and things of that nature.

But the printer was just fine...

, | Tweet this

I was printing out the 1,203,481,288 pages involved in my tax return on my HP OfficeJet Series 700 printer which I got from my uncle a million years ago back when printers would print one dot at a time and it sounded like disco music, when suddenly an error message pops up saying in really big letters:


    The computer has lost communication with the printer.

    Cancel printing, turn the printer off, then back on, do the hokey pokey,
    burn incense, twirl three times, tap your heels together and then
    try printing again.

I'm skeptical of stuff like that. I'm a programmer--I'm fully aware that computers and software have no clue what they're doing. My printer was still printing the pages--albeit so incredibly slow that a three-toed sloth would start getting impatient. I figured I'd wait until the printer was done doing whatever it was doing.

I came back 24 days later to discover everything printed out just fine. And in color--I had no clue this was a color printer!

I still don't know what that error was all about. Maybe the software didn't expect the printer to take so damned long? Who knows? Regardless, I'm done filing my taxes, it's 60 degrees outside, and I'm going to go get some breakfast.

Bluesock died on Tuesday; resurrected on Thursday

, | Tweet this

Yea, and lo Bluesock did gasp its last breath early Tuesday morn and exhaled ne'er to be revived again. And lo, all my friends called me up to tell me the news. I submitted two, nay three, tickets in the tech-support ticket system. Minutes turned into hours.

Yea verily yea, Rob of the clan Atha did calleth up the ServerBeach people and gave them angry Texas hell and they agreed to give us some new hardware. Forsooth it turned out to be a defective disk or motherboard or some such hardware issue (or so we think--hard to tell when I'm in Boston and the server liveth in Texas).

Then on the second day, Bluesock rose again with a new mortal coil and the old drive was mounted as a partition of the new. With great speed, we re-configured and re-installed all the stuff we had configured and installed on the original Bluesock.

Then when we were done, it was as if the tragedy had never occurred. The users were happy once more [1].

[1] No users were actually asked--I just assumed.

No more life category

, | Tweet this

"Life" is a stupid category. Everything that was there was just more content anyhow. So into the "Content" category it goes!

I also whacked the 3k category and the misc cateogry.

Every language war ever

, | Tweet this

I keep getting into the classic "your language sucks; mine is better" discussions with various people. Regardless of what they say, I still like Python, C, sort-of like Perl and dislike Java. Some day when I have a free moment or two, I'll remember/learn enough SML/Lisp to like that again as well.

Link to Every Language War Ever

registry v.1.3 released

, | Tweet this

I decided the registry plugin needed to allow users to see all the pending submissions and details therein. So I made some changes:

  • added handling of /registry_queue which shows all the pending submissions.
  • added some code to displaying of the entry so that the "edit" link doesn't appear if there's already a pending change.

Get it on my pyblosxom page.

PyBlosxom 0.9 coming soon.... (revised)

, | Tweet this

We're almost done with 0.9 and the code is baking in CVS and Ted is doing all kinds of crazy stuff with metaweblog, comments, and his Lucene search plugins. When that all gets sorted out, then we'll do a release which has been a long time coming.

In the meantime, if you want to try out what's in CVS, here is a snapshot as of February 24, 2004. Setup is just like PyBlosxom 0.8.1. Features for users are pretty much the same. Biggest changes are architectural which will enable plugins to solve a very wide variety of problems and do all kinds of exciting stuff.

Official announcements and all that on the PyBlosxom site soon. Additionally, I've been working on Planet PyBlosxom, which will provide a centralized newsfeed of PyBlosxom stuff from PyBlosxom users' web-sites via their RSS feeds.

Referral spam from Democrats' blogs

, | Tweet this

I know I'm not the only one who's getting referral spam from John Kerry's blog and blogs of other Democratic candidates. How totally lame and obnoxious.

Anyhow, with the PyBlosxom logstats plugin, I can just hide them all from showing up. POOF!

How to use w.bloggar with pyblosxom

, | Tweet this

I just finished making a bunch of code changes. So if you go this route, you may encounter problems. Having said that, feel free to email me or the pyblosxom-users mailing list with questions. It should be noted I'm posting this entry with w.bloggar right now.

  1. Make sure you have the latest CVS codebase
  2. Add the xmlrpc and xmlrpc_blogger plugins
  3. Read the top of xmlrpc.py and set up the right config.py parameters

The w.bloggar account settings should be as follows:

In the Content Management System section:

  • Blog Tool: "Custom"

In the API Server tab:

  • Host: the name of your server
  • Page: the url of your blog with /RPC at the end (mine is /~willkg/blog/RPC)

In the Custom tab:

  • Posts: "Blogger API"
  • Categories: "Not supported"
  • Templates: "Not Supported"
  • Title Tags: (make both fields blank)
  • Category Tags: (make both fields blank)

When you go to write a new entry, leave the title field blank and do your entire post in the data section with the first line being the title (just like blosxom entries).

One thing you should note is that pyblosxom will take the first line and use that to generate the file name of the entry. So if the title of the entry is "How to use w.bloggar with pyblosxom", the file name ends up being "How_to_use_w_bloggar_with_pyblosxom.txt" which is a little annoying but whatever.

That seems to work for me. Poke me if you have questions and I can update this entry with the adjustments.