Monthly Archives: June 2005

PyBlosxom Plugins Update

Today I updated all my plugins to the newest versions from Contributed Plugins Pack 1.2.2. Everything went pretty well except for Will Guaraldi’s pycategories plugin which displayed an extra / sign when processing the root directory. I modified the plugin and made a patch that fixes this problem:

--- pycategories.py	2005-06-21 11:23:14.000000000 -0700
+++ pycategories_fixed.py	2005-06-30 13:37:08.838820024 -0700
@@ -185,6 +185,8 @@
                   "flavour":      flavour,
                   "count":        num,
                   "indent":       tab }
+            if item == "":
+                d["fullcategory"] = item

             # and we toss it in the thing
             output.append(item_t % d)

One last note is with the newest version of the comments plugin. If you want to view comments you need to append “viewcomments=yes” to the querystring. I assume this is to allow showing comments only when viewing the blog entry and not when viewing a directory with only one entry. If this is the case I believe checking “bl_type” == “file” as a better method. I plan on editing the plugin to work this way because I believe the querystring method is not very good, and not backwards compatible.

Files:
pycategories.diff

PyBlosxom Plugin: robots.py

The robots.py PyBlosxom plugin will insert the Robots META Tag to your blog entry’s. This is my first PyBlosxom plugin so any comments or suggestions are appreciated.

Download:

http://www.mattweber.org/files/robots.py

Using D-Link DWL-G510 Wireless Card in Linux

Today I bought a D-Link DWL-G510 Wireless G PCI Adapter for one of my linux desktops. Once I got the card installed I was thrilled to find that this card is not natively supported under linux. I thought I was going to have to return the card and get a different one until I remembered reading about using Windows network drivers under linux. Sure enough, this card can be used in linux using a program called NdisWrapper. Here are the steps I took to get it working under a Debian based distribution.

  • Install NdisWrapper:
    ]$ apt-get install ndiswrapper-utils
  • Mount driver CD and install windows drivers:
    ]$ mount /dev/cdrom0 /media/cdrom
    ]$ cd /media/cdrom/Drivers/Drivers
    ]$ ndiswrapper -i NetA3AB.inf
    ]$ ndiswrapper -l (Verify driver was installed correctly)
    
  • Load NdisWrapper module:
    ]$ modprobe ndiswrapper

Now you will be able to find your wireless card as wlan0 and be able to use wireless-tools to setup and configure your wireless settings. You can also scan for wireless networks using the iwlist wlan0 scan command. I would also add ndiswrapper to /etc/modules so the card is loaded on startup.

Directing the Googlebot

While setting up PyBlosxom there were a few things I wanted to be able to do. The most important was being able to direct bots around my site, more specifically, the googlebot. I did some research and found a few sites that explain how the googlebot works and how you can guide it though your site.

I found Scribbling.net’s article, “Help the Googlebot understand your web site” which describes how the googlebot should index a blog. Basically, you want google to index your posts, not your main page. You do this so people can find the actual post about a topic, not your main page that has most likely changed since googlebot last indexed your site. They show that you can use metatags telling bots when and when not to index a page.

To do this using PyBlosxom you can use the comments plugin and “comment-story” flavour file with the meta tag telling googlebot to index this page and the regular “story” flavour file telling it not to index the page. Out of the box, the comments plugin would display comments any time you viewed a page with one post. This is a problem when using the calender and categories plugins because it would show the comments when viewing categories or dates with only one post, even though you were not viewing the actual post. We do not want this because it means that we will be telling google to index directories, not post pages. To fix this I modified the comments plugin so that it will only show comments when viewing an actual post. Here is my modified comments plugin for anyone interested in doing this with their blog.

Blogging with PyBlosxom

Well I finally managed to get my blog moved over to PyBlosxom. Other than laziness on my part, the move went pretty well. I love the fact that I can now work on my blog using WebDAV. WebDAV allows me to post and manage my blog as if I was working with files on my main computer, not a remote server. I love it!!! I would like to thank Eric Gaumer for introducing me to PyBlosxom and WebDAV, and for the PyBlosxom flavour he designed. Thanks.

Anyways, if anyone can find any glitches, flaws, or has any comments regarding my blog, please feel free to leave a comment or drop me an email.