Connective Tissue

Here is what Unisys' actions did.

Old code:

wget -N -nd

New Code:

wget -O nhc_basins_current_status.txt
grep "Forecast Discussion" nhc_basins_current_status.txt > nhc_Forecast_Discussion_links.txt
awk -F'"' '{print $4}' nhc_Forecast_Discussion_links.txt > nhc_end_links.txt
while read l; do 
	echo "$l" > nhc_links_to_get.txt
done < nhc_end_links.txt
while read l; do
	wget -P /home/jay/data/nhc_basins/ $l 
done < nhc_links_to_get.txt
for fname in /home/jay/data/nhc_basins/*; do
	grep "" $fname  | awk '{gsub("<title>", "");print}' | awk '{gsub("", "Forecast Discussion", "");print}' | awk '{gsub("Forecast Discussion", "");print}' | awk -F"(" '{print $1}'
	grep -A 8 "INIT" $fname

The two code blocks do the same.

I have things like this scattered through out the data-acquisition side of the programming.  When I redesigned the site this last year,  I made most everything modularized.  That is, you have a bunch of small blocks of code called by a unifying script rather than having one script with all the code in it.  Thus, repairing the site should be a little less than trivial, but doable just the same.

I'm just really exhausted from visiting my mom yesterday.  I should have the code repaired and the site back up and running within a few days if my body doesn't disown me.

Jay C. "Jazzy_J" Theriot

{ Add a Comment }

One HUGE step closer to re-activating Storm Tracking

I have successfully began extracting the following information from the National Hurricane Center automatically:
  Subtropical Storm Oscar  
INIT  27/0900Z 27.3N  47.0W   45 KT  50 MPH
 12H  27/1800Z 27.1N  49.1W   45 KT  50 MPH
 24H  28/0600Z 26.2N  52.0W   50 KT  60 MPH
 36H  28/1800Z 25.7N  54.6W   55 KT  65 MPH...TROPICAL CYCLONE
 48H  29/0600Z 25.9N  56.6W   60 KT  70 MPH
 72H  30/0600Z 28.4N  57.4W   65 KT  75 MPH
 96H  31/0600Z 35.0N  52.0W   70 KT  80 MPH
120H  01/0600Z 45.0N  39.0W   60 KT  70 MPH...POST-TROP/EXTRATROP
This doesn't look like much, but this is the exact format I need to start tracking again.  It would be up and running, but I have to check on a game I am running today.  If all is well with the progression of the game, I should have the hurricane tracking up this afternoon!!! Jay C. "Jazzy_J" Theriot

{ Add a Comment }

%d bloggers like this: