Author Topic: MidWestWXstory stopped  (Read 1298 times)

0 Members and 1 Guest are viewing this topic.

Offline rrrick8

  • Senior Contributor
  • ****
  • Posts: 225
    • Vermilion weather
MidWestWXstory stopped
« on: April 23, 2017, 09:28:28 PM »
Noticed that the MidWestWXstory page has stopped for almost all, if not all, the different WFO's earlier this month.
Checked around on a few of our members websites and didn't see it working on anyone's.

Haven't seen anything posted on it here either. Was it Curly who got it going last time it went down?
Severe Weather Manager-Vermilion County EMA
CWOP-CW9931 KILDANVI5

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: MidWestWXstory stopped
« Reply #1 on: April 23, 2017, 11:23:36 PM »
I lost my local 'OAX' Weather Story a couple of weeks ago.  Curly is aware of the problem, but he hasn't updated the script because the NWS appears to be in transition from the Central Regional Headquarters to a more national look, but now hosted by the WRH instead of the CRH.  (Notice the Omaha Weather Story, 'OAX', is missing from the map--they've changed the map's URL and name.  Click on one of the images on the national map then click on the pop-up and compare that address with the 'OAX' address.  Then R-click on each of the maps and open the images in new tabs.)  At this time the Weather Stories appear to have penetrated everywhere but the Eastern Region.

Curly has also been busy trying to keep up with the NWS changes to Alerts and Advisories, so the Weather Stories have understandably been placed on the back burner for now until the NWS gets its act together.
« Last Edit: April 23, 2017, 11:25:49 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: MidWestWXstory stopped
« Reply #2 on: April 24, 2017, 05:37:00 AM »
The old Weather Stories were at the CRH using json and now they have migrated to the WFO's where they did away with the json feed. Back to page scraping....

As of last night, there are a few stories still at the CRH that haven't migrated. Almost half of the WFO's have the Weather Story in it's own folder while the rest have the story on their home page.
For now, I'm focusing on getting the WFO stories but the NWS may still do some shuffling in the next week or two.
Here is a breakdown on what I've found:
122 total WFO's.
14 WFO's have the WS at the CRH or don't have a WS.
45 WFO's have the WS on their home page.
35 WFO's have the WS in a separate folder.

There are two positive improvements since the move. More WFO's have the story and additional stories are often included in the main story.

The new script is nearing completion but there are still some errors that needs correcting. Mostly connection errors that I believe are caused by some file shuffling.
Give me a few more days then I will need a few beta testers.


Offline rrrick8

  • Senior Contributor
  • ****
  • Posts: 225
    • Vermilion weather
Re: MidWestWXstory stopped
« Reply #3 on: April 24, 2017, 07:58:53 AM »
Thanks guys.
As always, you know I'm game for the testing.
Severe Weather Manager-Vermilion County EMA
CWOP-CW9931 KILDANVI5

Offline lakevillewx

  • Member
  • *
  • Posts: 8
    • http://www.lakevilleweather.com
Re: MidWestWXstory stopped
« Reply #4 on: May 21, 2017, 10:42:00 PM »
Any progress, Curly?
Kris Pierson - lakevilleweather.com

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: MidWestWXstory stopped
« Reply #5 on: May 22, 2017, 07:13:05 AM »
The Weather Story is still transitioning and will probably be ongoing for the new few months so there will be updates along the way.
Not all WFO's have the new Weather story. Especially the east coast.

You can see it here to find out which WFO's have the story. http://www.weather.ricksturf.com/wxst.php

You can download the updated Weather Story here. http://www.weather.ricksturf.com/scripts/wxStory_inc.zip
The script does delete cache files and is explained in the read me file so be careful with this.

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: MidWestWXstory stopped
« Reply #6 on: May 22, 2017, 08:11:59 AM »
Thanks, Curly, for doing this. We appreciate your time, talent, and generosity. =D> \:D/ =D>
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline lakevillewx

  • Member
  • *
  • Posts: 8
    • http://www.lakevilleweather.com
Re: MidWestWXstory stopped
« Reply #7 on: May 22, 2017, 02:05:59 PM »
Thanks so much! Looking good on my site again.

http://www.lakevilleweather.com/wxstory.php

- Kris
Kris Pierson - lakevilleweather.com

Offline ke9lz

  • De Pere - Athelstane Weather
  • Contributor
  • ***
  • Posts: 143
    • De Pere Weather
Re: MidWestWXstory stopped
« Reply #8 on: May 22, 2017, 03:23:47 PM »
Thanks for getting this script going again Curly!  I was able to get it up and running on one of my sites but not the other.  When accessing it I get the following error: (Parse error: syntax error, unexpected '[' in /home/athelsta/public_html/weather/wxStory_inc.php on line 610).  The address is here http://weather.athelstanewi.com/wxstory.php and was wondering if you had any pointers?

Steve
Steve (KE9LZ)
Athelstane Weather
Blitzortung 1177, 1565


Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: MidWestWXstory stopped
« Reply #9 on: May 22, 2017, 04:01:30 PM »
Check the cache folder and see if there are any files in it.
What version of PHP is installed?

Thanks for getting this script going again Curly!  I was able to get it up and running on one of my sites but not the other.  When accessing it I get the following error: (Parse error: syntax error, unexpected '[' in /home/athelsta/public_html/weather/wxStory_inc.php on line 610).  The address is here http://weather.athelstanewi.com/wxstory.php and was wondering if you had any pointers?

Steve

Offline ke9lz

  • De Pere - Athelstane Weather
  • Contributor
  • ***
  • Posts: 143
    • De Pere Weather
Re: MidWestWXstory stopped
« Reply #10 on: May 22, 2017, 04:14:23 PM »
Cache is empty and the PHP version is 5.3.29.

If I delete line 610 in the wxStory_inc.php file it works.
« Last Edit: May 22, 2017, 08:42:12 PM by ke9lz »
Steve (KE9LZ)
Athelstane Weather
Blitzortung 1177, 1565


Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: MidWestWXstory stopped
« Reply #11 on: May 22, 2017, 08:48:28 PM »
Cache is empty and the PHP version is 5.3.29.

If I delete line 610 in the wxStory_inc.php file it works.

A change was made to the script.
You can either download the program again or fix it as described below.

Open the file wxStory_inc.php
Find this function:
Code: [Select]
function getFileSize($bytes) {
  $precision = 2;
  $units = ['Bytes', 'Kilobytes', 'Megabytes', 'Gigabytes', 'Terabytes'];
  $i = 0;
  while($bytes > 1024) {
    $bytes /= 1024;
    $i++;
  }
  return round($bytes, $precision) . ' ' . $units[$i];
}


Replace all of the above with this:
Code: [Select]
function getFileSize($byts) {
  $prec = 2;
  $size = array("TB", "GB", "MB", "KB", "B");
  $tc = count($size);
  while ($tc-- and $byts > 1024) {
    $byts /= 1024;
  }
  return round($byts, $prec).' '.$size[$tc];
}


Offline ke9lz

  • De Pere - Athelstane Weather
  • Contributor
  • ***
  • Posts: 143
    • De Pere Weather
Re: MidWestWXstory stopped
« Reply #12 on: May 22, 2017, 09:05:51 PM »
That fixed it!  Works perfect.  Thanks!

Steve
Steve (KE9LZ)
Athelstane Weather
Blitzortung 1177, 1565


 

anything