The RSS Feed is working

Posted on October 28th, 2004 in by jud || Add A Comment

I’ve fixed up the RSS feed, so it should be working. Still no
atom feed yet. :(

Add A Comment

Smart bookmarks with Firefox keywords

Posted on October 28th, 2004 in by jud || 1 Comment

slamm showed me a cool trick with Firefox that I didn’t know. Firefox
allows you to save a bookmark as a shortcut that will accept variable
substitution. It’s more difficult to describe than to do, but here’s the
scoop. If you have a site that you need to enter in some text to get search results, then
there’s a good shot you can create a keyword shorcut.

For example, bugzilla has a user query form /buzilla/edituser.cgi. This
form accepts a single parameter, a userid, and displays information
about users who match. If you are a bugzilla administrator (as I am),
this is a page that gets used frequently. Rather than clicking on my
bookmark, clicking to the form and then hitting submit, I can simply
create a keyword shortcut so that when I type “bzu jdagnall”, I get information about user *jdagnall*.

But since most of you don’t use bugzilla, I’ll give you an example of how we would create a shortcut for the IMDB, the Internet Movie DataBase.

The IMDB has a search engine that can be used to get information about movies. Instead of having to click on my IMDB shortcut and then
go to the search box, type in my search terms and then hit the “search” button, I can simply create a keyword search called “imdb” and type
directly into my browser from ANY page.

In order to make a shortcut, we need to get a URL that is used to generate some results. Typically, we can do this by modifying an existing results
page. So when we’re done, we’ll be able to type “imbd donnie darko” into the browser’s URL bar, and immeditely get a search results from the IMDB about
the movie *Donnie Darko*.

Here’s what you do:

1. Go to the [IMDB](http://www.imdb.org)

2. Type “darko” into the search box, and hit “search”. This gives a search [results page](http://www.imdb.com/find?q=darko;tt=on;nm=on;mx=20) that
we will use to create our special keyword search. It’s typically *much* easier to start with a valid search results URL than to try to figure out the correct
syntax on our own.

3. Create a new bookmark from the page.

4. Right click on the bookmark you just created, and select “Properties”. (You could also use the “Bookmars” sidebar)

5. Edit the URL, replacing “darko” with the string “%s”. This can be a little tricky. Typically, the browser must
encode special characters like the space (which becomes a “+”, or “%20”), so be try to use only a single word as a search term when you’re building your keyword shortcut.
Sections of the URL are typically separated by the & symbol, you’ll want to leave that.

> http://www.imdb.com/find?q=donnie;tt=on;nm=on;mx=20

becomes

> http://www.imdb.com/find?q=%s;tt=on;nm=on;mx=20

Firefox will replace “%s” with anything you want, and then run the search and show you the results.

6. Once you have added “%s”, create a name for your keyword search (“imdb” in this case) and use the “keyword” field to record it.

7. Close the bookmark.

8. Now you’re ready for a new search.

9. Click on the Location Bar in firefox (or press CTRL-L) and type **imdb two towers**

This should bring up a search that includes the movie *The two towers*

Add in the “Location Bar” keyboard shortcut (Alt-D or CTRL-L) and you can really fly:
Just type:

> CTRL-L imdb suburbia [enter]

And you’ll find a strange but very cool movie from the early nineties. This is how the various Firefox search shortcuts work, like typing “goog
some special word” and getting a google search for “some special word”. I
just never realized this, or dug around enough to modify any of them on my
own. Very cool!

1 Comment

The RSS and Atom feeds are broken.

Posted on October 27th, 2004 in by jud || Add A Comment

Unfortunately, it looks like my RSS and Atom feeds are now broken.
I’ll work on getting them back up soon.

Add A Comment

Sand & Tufa #1: A new Mono Lake Summer ’04 photo

Posted on October 27th, 2004 in by jud || Add A Comment

I have posted
Sand & Tufa #1,
the third shot from my
Mono Lake Summer ’04 collection.

This was taken very close to
Big and Small, a mile or so beyond the Navy Beach Tufa area.

Add A Comment

Tufa Fortress: A new Mono Lake Summer ’04 photo

Posted on October 26th, 2004 in by jud || Add A Comment

I’ve posted a new photo,
TufaFortress, a new photo in my Mono Lake Summer ’04 collection.

I spent two evening at the South Tufa Preserve, and this was my favorite from the lot. I used a polarizer, creating a
little more drama in the clear sky.

The full title to this picture should be “Waiting at the gates of the tufa fortress”. Perhaps you can see why.

Add A Comment

Switching from blosxom to pyblosxom

Posted on October 26th, 2004 in by jud || Add A Comment

That didn’t take long. 24 hours later and I’ve switched to using python and
pyblosxom.

I’d looked at pyblosxom originally, but decided to use the perl version
instead since it appeared to have more plugins. However, I’d much rather
be working on python code, and after a closer look, I saw that pyblosxom
appeared to have all the plugins I really need.

Unfortunately, the pyblosxom setup was much more complex. Fortunately, all
the data is compatible. Here’s what I did to switch from blosxom to pyblosxom:

  1. Download pyblosxom
  2. Download pyxml
  3. extract each of the tarballs e.g.:
        $ tar xzvf fn.gz        # replace fn.tgz with the appropriate filename
        
  4. Build each module. This was a little trickier because I run python2.4
    (pre-release) on my staging server, but my ISP provider only runs 2.3.4. So I
    need to force my local (staging) server to use python2.3:

        $ python2.3 setup.py build
        
  5. Now, because I don’t have root access on my ISP’s server, I need
    to install the python files in a local root. This is done using the –home
    option during module installation, which puts everything in a home directory:

        $ cd pyblosxom-1-0-0
        $ python2.3 setup.py install --home $HOME
        

    Now I have a ~/lib, and pehaps a ~/bin and ~/share directory. The
    share directory can be discarded, since I just install the files from
    the extracted tarball directory.

  6. Now I need to get python to use this new directory. My first thought was
    to set the PYTHONPATH environmental variable to use $HOME/lib/python.
    However, since my ISP is running an older apache that doesn’t support the
    SetEnv directive, I simply used the “codebase” config parameter in config.py.
    Unfortunately I’ll have hardcode the path into any other python cgi script.
    Hmmm. Perl is looking a little better :)

    So I set:

        py["codebase"] = "/path/to/my/home/lib/python"
        
  7. Now to install the executables, I basically followed the install
    instructions. Since my blog lives at /blog, and not in a cgi-bin directory, I
    install it into my $DOCROOT (e.g. ~/public_html)

        $ cp web/pyblosxom.cgi $DOCROOT/pyblosxom.cgi      
        $ cp web/config.cgi    $DOCROOT/public_html/config.py
        
  8. However, since my ISP has python 1.5.1 as python, I need to specifify
    that the script should use python2.3. I replace the first line of
    pyblosxom.cgi with “#!/usr/bin/env python.2.3”
  9. After moving the config and pyblosxom files, I modified the config file
    to use all the same settings as blosxom, except I created a pyplugin
    directory so I could keep both pyblosxom and blosxom active during testing
    and deployment.
  10. After some testing, things were working well. I installed the file
    plugin so that I could share page static page items between my php and
    pyblosxom, and I moved the primary blog over to pyblossom.

That’s it. I moved pyblog.cgi to blog.cgi, and now pyblosxom is the default
engine. Next on my todo list is to install the reStructuredText plugin,
because I HATE hand-coding xhtml.

Add A Comment

Big and Small, Mono Lake: A new photograph

Posted on October 25th, 2004 in by jud || Add A Comment

As night closed in, the tufa
took on an alien character, and I was struck by the feeling that I was in a
cemetary…

This is the first image from my April trip to Mono Lake.

Add A Comment

My site got smarter!

Posted on October 25th, 2004 in by jud || Add A Comment

I have just released a new version of the site, based on the PHP templating
engine Smarty.

Smarty is co-authored by my
friend, core PHP devloper, and coworker at Yahoo!,
Andrei Zmievski.

I’ve also changed the design and layout a bit, and moved this blog
into the main site instead of my demo site.

Add A Comment

Google vs. dagnall.net: my site is not indexed

Posted on October 24th, 2004 in by jud || Add A Comment

When I switched to the new PHP version of my site, I began to see a strange
problem: Google was no longer indexing my site on a regular basis. My site
would go from being #1 in a search for “Jud Dagnall” to somewhere down in the
second page with only a reference to an old guestbook page. However, every few
months it would jump back up. Yahoo was giving the results correctly (at least
for MY version of correct, since all the other Jud Dagnall references were
indeed about me!). So I’ve been a bit puzzled. Finally, just this morning I
came across a page
that describes the problem and suggests a solution.

In a nutshell, he suggests that the problem is that apache wasn’t associating
php with text/html content type requests. Here’s his fix: Add the
following to the apache config file:

 
    AddHandler php-script php
    AddType text/html php 

However, this does not seem to work for me. When I put it into a .htaccess
file, only part of my page renders. Furthermore, I am not able to
reproduce the bad behavior:

    $ curl -S -H "Accept: text/html" http://www.dagnall.net

This attempts to retrieve the header for a page, only accepting text/html
content types.

However, the page renders correctly, and I get text/html returnethe text of the php page is returnedd. I can request ANY content
type, and it still returns text/html.

I’ll need to investigate further.

Add A Comment

I’m trying out blosxom

Posted on October 24th, 2004 in by jud || Add A Comment

As the first step in yet another site upgrade, I’m trying out the blosxom software. I’m not too happy about
using perl again on my site (I’m trying to use PHP and python for everything
these days), but I’m very happy about a simple plug and play setup. However,
since I’m already using PHP to generate my page layout, the hassle of
combining perl and php components may be too much.

Add A Comment