Version 20 of William Jeffrey Rankin

Updated 2004-06-21 13:42:10

Search for my contributions to this Wiki [L1 ].


Some sites of interest:

  • O'Neil & Associates, Inc. [L2 ]: This is where I work, using open source tools like Tcl/Tk, among others. My primary role at O'Neil is that of UI developer for web and client-side software.
  • My personal web site [L3 ]: I maintain some software packages for Sun Solaris. You can find them here, among other things.

Here's a little script that determines the link to the current Astronomy Picture of the Day [L4 ]:

 #!/bin/sh
 # -*- tcl -*-
 # The next line is executed by /bin/sh, but not tcl \
 exec tclsh "$0" ${1+"$@"} 

 package require http

 set base_url http://antwrp.gsfc.nasa.gov/apod
 set site [http::geturl $base_url/astropix.html]
 set html [http::data $site]

 regexp -nocase -linestop {(src="(.*)")} $html match src image

 puts $base_url/$image

Here's the same thing as a TclHttpd template (Note: You'll want to have a 'package require http' in this template, or in the .tml file):

 [
 Doc_Dynamic

 html::set base_url http://antwrp.gsfc.nasa.gov/apod
 html::set template astropix.html

 set site [http::geturl $base_url/$template]
 set html [http::data $site]

 regexp -nocase -linestop {(src="(.*)")} $html match src image

 return
 ]

 <style type="text/css">
     body {
         font-family: Arial, Helvetica, sans-serif;
     }

     img#apod {
         width: 144px;
         border: solid 1px #000000;
     }
 </style>

 <p style="border-top: solid 4px #666666; width: 144px;">
     <span style="font-size: 14px; font-weight: bold; display: block;">
         APOD
     </span>
     <a href="$base_url/$template"
     title="Astronomy Picture of the Day">
         <img src="$base_url/$image" id="apod" alt="" />
     </a>
 </p>

Some pages I've started, or plan on starting:


An Introduction To TclHttpd

This is an introductory presentation that I originally put together for my fellow developers at O'Neil. I hope you find it useful!


Category Person | Category Home Page