[Omaha.pm] My lost week problem..

sidney.omaha.pm@gmail.com sidney.omaha.pm at gmail.com
Thu Dec 29 09:25:29 PST 2005


The week between Christmas and New Years is called, in some circles, the
lost week and in others, cleanup week. Generally, not much  work gets done
but interesting projects that might be useful or helpful if people had time
to play with them are dragged out and finished or dropped. 

I got a late start this year, and I'm afraid my lost week project is beyond
me anyway. So I'm offering it up as a challenge to anyone interested before
I drop it in the circular file. 

At http://samoyed.org/rescue_org.html (Samoyed.org) and 
http://www.samoyedrescue.com/availabledogs.htm (aka SRA) each list Samoyed
dogs living with various rescue groups across the US and Canada while
waiting for good homes. The pages are run by different people who are not
competitive but rather very cooperative. 

The listings on samoyed.org are sent via email to a volunteer who formats
them using an Excel spreadsheet. They are posted by copying and pasting the
speadsheet into a big box on a web form, which runs a perl script which
splits each line on the tabs, dealing with odd line wraps, and formats it
into html table tags. I wrote that script, but do not pretend to remember
it, and expect it's probably a large plate of spagetti. 

The SRA page uses some code supplied by petfinder to display listings from
the petfinder database in an iframe:

      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <th scope="col"><div align="right"><font color="#000098" size="3">
            <!-- Begin Petfinder Pet Scroller Code -->
            <iframe src="http://fpm.petfinder.com/petlist/petlist.cgi?sort=Zip
&shelter=WA159
&shelter=OR11
&shelter=CA123
&shelter=CA634
&shelter=UT15
&shelter=NV42
&shelter=CA741
&shelter=WI55
&shelter=MI69
&shelter=OH135
&shelter=GA31
&shelter=MD50
&shelter=FL148
&shelter=MI491
&shelter=NC364
&status=A&age=&animal=Dog&breed=Samoyed
&title=Samoyeds Available for Adoption
&style=3" WIDTH="600" HEIGHT="420" MARGINWIDTH="0" 
MARGINHEIGHT="0" HSPACE="0" VSPACE="0" FRAMEBORDER="0" 
SCROLLING="yes" BORDERCOLOR="#000000">
            </iframe>
            <!-- End Petfinder Pet Scroller Code -->

            Scroll down to see more dogs
          </font></div></th>
        </tr>
      </table>

Not everyone who rescues dogs is capable of or cares to figure out how to
use petfinder, in case anyone is wondering why we don't just tell people to
get a petfinder account and use the above code on both pages. 

Now what I want to do is change the page at samoyed.org to a script that
reads in the listings formatted from the excel spreadsheet, sorts them by
state and city (probably from a file that gets updated whenever the excel
spreadsheet is pasted into the big box - the sorting by state and city can
be done when that file is created. I think. ) calls up and sorts the
listings from petfinder by state and city (petfinder uses zipcode,) and
conglomerates the two into one sorted and nicely formatted table. If I can
make it work on samoyed.org, I will send the script to SRA, and they will
use it there too if they can run perl scripts - I don't know. 




More information about the Omaha-pm mailing list