internet_earthquakes.pl

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

internet_earthquakes.pl

ricks03


Tired of the earthquake code not working in my old version of MH, I
went to fix it by downloading the newest version, and it doesn't work
out of the box. Reviewing the documentation within
internet_earthquakes.pl, I can see enough to know it's been majorly
changed, but not quite enough information to figure out how to get it
working again. reviewing the mailing list history, again not quite
enough information foe me to get it working. Can someone provide some
guidance on what I need to do?

Looks like I need:
/code/common/internet_earthquakes.pl
/bin/get_earthquakes
/bin/get_earthquakes.bat
{data_dir}/web/earthquakes.dbm   (do I have to create the database? How? )

Anything else?

That's going to output:
{data_dir}/web/earthquakes.txt
{data_dir}/web/earthquakes.gif (which I assume surfaces somewhere in
the new code, but I just care about the parsing of the text file)

Is the updated earthquakes.txt going to honor the old settings in
mh.private.ini:
Earthquake_Count=2
Earthquake_Magnitudes=300 0  #any magnitude w/i 600 miles

?

Thanks for any guidance you might provide.

Rick



Rick Steeves

A bicycle sails
On an ocean of freedom
I am the captain


------------------------------------------------------------------------------
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: internet_earthquakes.pl

Craig Lindholm

I haven't looked at earthquakes yet, but I have taken a quick look at iridium flares. I am seeing a general pattern of URLs being hard coded in the files. The web being what it is, hard coding links is probably not the best way, as 2 months later it'll change.

If you haven't done so yet, check the URLs.

Sent from my email program



Tired of the earthquake code not working in my old version of MH, I
went to fix it by downloading the newest version, and it doesn't work
out of the box. Reviewing the documentation within
internet_earthquakes.pl, I can see enough to know it's been majorly
changed, but not quite enough information to figure out how to get it
working again. reviewing the mailing list history, again not quite
enough information foe me to get it working. Can someone provide some
guidance on what I need to do?

Looks like I need:
/code/common/internet_earthquakes.pl
/bin/get_earthquakes
/bin/get_earthquakes.bat
{data_dir}/web/earthquakes.dbm   (do I have to create the database? How? )

Anything else?

That's going to output:
{data_dir}/web/earthquakes.txt
{data_dir}/web/earthquakes.gif (which I assume surfaces somewhere in
the new code, but I just care about the parsing of the text file)

Is the updated earthquakes.txt going to honor the old settings in
mh.private.ini:
Earthquake_Count=2
Earthquake_Magnitudes=300 0  #any magnitude w/i 600 miles

?

Thanks for any guidance you might provide.

Rick



Rick Steeves

A bicycle sails
On an ocean of freedom
I am the captain


------------------------------------------------------------------------------
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: internet_earthquakes.pl

kent S
I too recently tried to get this working. In get_earthquakes, I changed
the url, and the new csv file has slightly different columns, so I
modified the parsing for that also.

I have two problems (both probably operator related).

The first is that I don't know how to make the get_earthquake script run
automatically. Do I just put it in cron?

The other is it seems like the history is deleted, I'm using the "hourly
file" and I only seem to see what in that file.

If you want a copy of my file I can send it to you privately, or post to
the list if it is generally acceptable.



On Thu, 2015-11-19 at 06:19 -0800, Craig Lindholm wrote:

> I haven't looked at earthquakes yet, but I have taken a quick look at
> iridium flares. I am seeing a general pattern of URLs being hard coded
> in the files. The web being what it is, hard coding links is probably
> not the best way, as 2 months later it'll change.
>
> If you haven't done so yet, check the URLs.
>
> Sent from my email program
>
>
>
> Tired of the earthquake code not working in my old version of MH, I
> went to fix it by downloading the newest version, and it doesn't work
> out of the box. Reviewing the documentation within
> internet_earthquakes.pl, I can see enough to know it's been majorly
> changed, but not quite enough information to figure out how to get it
> working again. reviewing the mailing list history, again not quite
> enough information foe me to get it working. Can someone provide some
> guidance on what I need to do?
>
> Looks like I need:
> /code/common/internet_earthquakes.pl
> /bin/get_earthquakes
> /bin/get_earthquakes.bat
> {data_dir}/web/earthquakes.dbm   (do I have to create the database?
> How? )
>
> Anything else?
>
> That's going to output:
> {data_dir}/web/earthquakes.txt
> {data_dir}/web/earthquakes.gif (which I assume surfaces somewhere in
> the new code, but I just care about the parsing of the text file)
>
> Is the updated earthquakes.txt going to honor the old settings in
> mh.private.ini:
> Earthquake_Count=2
> Earthquake_Magnitudes=300 0  #any magnitude w/i 600 miles
>
> ?
>
> Thanks for any guidance you might provide.
>
> Rick
>
>
>
> Rick Steeves
>
> A bicycle sails
> On an ocean of freedom
> I am the captain
>
>
> ------------------------------------------------------------------------------
> ________________________________________________________
> To unsubscribe from this list, go to:
> https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>
>
> ------------------------------------------------------------------------------
> ________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>



------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: internet_earthquakes.pl

Tony Yates-3
Hi,

I too had a hack at this a couple of years ago.

If you activate the internet_earthquakes.pl in common code through the  
web interface it sets up the environment to call get_earthquakes on  
the hour.

I'm using the following source file at USGS:

http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.csv

Regards,

Tony..

Quoting kent S <[hidden email]>:

> I too recently tried to get this working. In get_earthquakes, I changed
> the url, and the new csv file has slightly different columns, so I
> modified the parsing for that also.
>
> I have two problems (both probably operator related).
>
> The first is that I don't know how to make the get_earthquake script run
> automatically. Do I just put it in cron?
>
> The other is it seems like the history is deleted, I'm using the "hourly
> file" and I only seem to see what in that file.
>
> If you want a copy of my file I can send it to you privately, or post to
> the list if it is generally acceptable.
>
>
>
> On Thu, 2015-11-19 at 06:19 -0800, Craig Lindholm wrote:
>> I haven't looked at earthquakes yet, but I have taken a quick look at
>> iridium flares. I am seeing a general pattern of URLs being hard coded
>> in the files. The web being what it is, hard coding links is probably
>> not the best way, as 2 months later it'll change.
>>
>> If you haven't done so yet, check the URLs.
>>
>> Sent from my email program
>>
>>
>>
>> Tired of the earthquake code not working in my old version of MH, I
>> went to fix it by downloading the newest version, and it doesn't work
>> out of the box. Reviewing the documentation within
>> internet_earthquakes.pl, I can see enough to know it's been majorly
>> changed, but not quite enough information to figure out how to get it
>> working again. reviewing the mailing list history, again not quite
>> enough information foe me to get it working. Can someone provide some
>> guidance on what I need to do?
>>
>> Looks like I need:
>> /code/common/internet_earthquakes.pl
>> /bin/get_earthquakes
>> /bin/get_earthquakes.bat
>> {data_dir}/web/earthquakes.dbm   (do I have to create the database?
>> How? )
>>
>> Anything else?
>>
>> That's going to output:
>> {data_dir}/web/earthquakes.txt
>> {data_dir}/web/earthquakes.gif (which I assume surfaces somewhere in
>> the new code, but I just care about the parsing of the text file)
>>
>> Is the updated earthquakes.txt going to honor the old settings in
>> mh.private.ini:
>> Earthquake_Count=2
>> Earthquake_Magnitudes=300 0  #any magnitude w/i 600 miles
>>
>> ?
>>
>> Thanks for any guidance you might provide.
>>
>> Rick
>>
>>
>>
>> Rick Steeves
>>
>> A bicycle sails
>> On an ocean of freedom
>> I am the captain
>>
>>
>> ------------------------------------------------------------------------------
>> ________________________________________________________
>> To unsubscribe from this list, go to:
>> https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>>
>>
>> ------------------------------------------------------------------------------
>> ________________________________________________________
>> To unsubscribe from this list, go to:  
>> https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>>
>
>
>
> ------------------------------------------------------------------------------
> Go from Idea to Many App Stores Faster with Intel(R) XDK
> Give your users amazing mobile app experiences with Intel(R) XDK.
> Use one codebase in this all-in-one HTML5 development environment.
> Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
> http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
> ________________________________________________________
> To unsubscribe from this list, go to:  
> https://lists.sourceforge.net/lists/listinfo/misterhouse-users


--
Tony Yates                                     [hidden email]
                                                [hidden email]
------------------------------------------------------------------------

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: internet_earthquakes.pl

kent S
I'll have to double check, mine doesn't seem to run every hour.<-likely
a pebkac.

I'll switch back to using all_day instead of all hour, I'd still like to
keep a longer history, >>TODO

I made the URL a mh.ini parameter, I think had to tell

my $equakeurl = $config_parms{EarthQuake_URL};
my $getURLcmd = "wget --quiet $equakeurl";
system($getURLcmd . " -O $f_cnss_merged_txt");


to parse the file I did what is below. The fixed width pattern matching
gave me a headache so I did a split and an "if"


  my ($qdate1, $qtime, $qlatd, $qlong, $qdept, $qmagn, $qmagt, $qnst,
$qgap, $qdmin, $qrms, $qsrc, $qid, $qup, $qloca, $qtyp) = split(",",
$line);
  if ($qdate1 ne 'time') {
   my($qdate,$qtime) = split("T",$qdate1);
#if (my ($qdate, $qtime, $qlatd, $qlong, $qdept, $qmagn, $qmagt, $qnst,
$qgap, $qdmin, $qrms, $qsrc, $qid, $qup, $qloca, $qtyp) =
#      $line =~ m!^(.{10})T(.{8}),(%d),(%d),(%d),(%d),(%d),(%d),(%d),(%
d),(%d),(\w)(.{24})(".+?"),(\w)!) {





On Wed, 2015-11-25 at 08:01 +0000, Tony Yates wrote:

> Hi,
>
> I too had a hack at this a couple of years ago.
>
> If you activate the internet_earthquakes.pl in common code through the  
> web interface it sets up the environment to call get_earthquakes on  
> the hour.
>
> I'm using the following source file at USGS:
>
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.csv
>
> Regards,
>
> Tony..
>
> Quoting kent S <[hidden email]>:
>
> > I too recently tried to get this working. In get_earthquakes, I changed
> > the url, and the new csv file has slightly different columns, so I
> > modified the parsing for that also.
> >
> > I have two problems (both probably operator related).
> >
> > The first is that I don't know how to make the get_earthquake script run
> > automatically. Do I just put it in cron?
> >
> > The other is it seems like the history is deleted, I'm using the "hourly
> > file" and I only seem to see what in that file.
> >
> > If you want a copy of my file I can send it to you privately, or post to
> > the list if it is generally acceptable.
> >
> >
> >
> > On Thu, 2015-11-19 at 06:19 -0800, Craig Lindholm wrote:
> >> I haven't looked at earthquakes yet, but I have taken a quick look at
> >> iridium flares. I am seeing a general pattern of URLs being hard coded
> >> in the files. The web being what it is, hard coding links is probably
> >> not the best way, as 2 months later it'll change.
> >>
> >> If you haven't done so yet, check the URLs.
> >>
> >> Sent from my email program
> >>
> >>
> >>
> >> Tired of the earthquake code not working in my old version of MH, I
> >> went to fix it by downloading the newest version, and it doesn't work
> >> out of the box. Reviewing the documentation within
> >> internet_earthquakes.pl, I can see enough to know it's been majorly
> >> changed, but not quite enough information to figure out how to get it
> >> working again. reviewing the mailing list history, again not quite
> >> enough information foe me to get it working. Can someone provide some
> >> guidance on what I need to do?
> >>
> >> Looks like I need:
> >> /code/common/internet_earthquakes.pl
> >> /bin/get_earthquakes
> >> /bin/get_earthquakes.bat
> >> {data_dir}/web/earthquakes.dbm   (do I have to create the database?
> >> How? )
> >>
> >> Anything else?
> >>
> >> That's going to output:
> >> {data_dir}/web/earthquakes.txt
> >> {data_dir}/web/earthquakes.gif (which I assume surfaces somewhere in
> >> the new code, but I just care about the parsing of the text file)
> >>
> >> Is the updated earthquakes.txt going to honor the old settings in
> >> mh.private.ini:
> >> Earthquake_Count=2
> >> Earthquake_Magnitudes=300 0  #any magnitude w/i 600 miles
> >>
> >> ?
> >>
> >> Thanks for any guidance you might provide.
> >>
> >> Rick
> >>
> >>
> >>
> >> Rick Steeves
> >>
> >> A bicycle sails
> >> On an ocean of freedom
> >> I am the captain
> >>
> >>
> >> ------------------------------------------------------------------------------
> >> ________________________________________________________
> >> To unsubscribe from this list, go to:
> >> https://lists.sourceforge.net/lists/listinfo/misterhouse-users
> >>
> >>
> >> ------------------------------------------------------------------------------
> >> ________________________________________________________
> >> To unsubscribe from this list, go to:  
> >> https://lists.sourceforge.net/lists/listinfo/misterhouse-users
> >>
> >
> >
> >
> > ------------------------------------------------------------------------------
> > Go from Idea to Many App Stores Faster with Intel(R) XDK
> > Give your users amazing mobile app experiences with Intel(R) XDK.
> > Use one codebase in this all-in-one HTML5 development environment.
> > Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
> > http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
> > ________________________________________________________
> > To unsubscribe from this list, go to:  
> > https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>
>



------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: internet_earthquakes.pl

ricks03
Were these changes ever checked in to core? I'm looking at GitHub, and in the get_earthquakes code I see: 
my $getURLcmd = 'net_ftp -passive 1 -command get -server hazards.cr.usgs.gov ';
$getURLcmd .= ' -user anonymous -password anonymous';
system( $getURLcmd
      . " -file $f_cnss_merged_txt -file_remote cnss/cnss_14.fing " );

If I FTP into  hazards.cr.usgs.gov and go look in /cnss there's nocnss_14.fing  file (or in fact any file), so that clearly won't work. 

The CSV files now looks to resides at (?):
http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.csv

I see Tony's mods in : https://github.com/tony451/misterhouse/tree/tymods/bin  which changes the grab method to wget (with the updated URL). 

On Wed, Nov 25, 2015 at 11:30 AM, kent S <[hidden email]> wrote:
I'll have to double check, mine doesn't seem to run every hour.<-likely
a pebkac.

I'll switch back to using all_day instead of all hour, I'd still like to
keep a longer history, >>TODO

I made the URL a mh.ini parameter, I think had to tell

my $equakeurl = $config_parms{EarthQuake_URL};
my $getURLcmd = "wget --quiet $equakeurl";
system($getURLcmd . " -O $f_cnss_merged_txt");


to parse the file I did what is below. The fixed width pattern matching
gave me a headache so I did a split and an "if"


  my ($qdate1, $qtime, $qlatd, $qlong, $qdept, $qmagn, $qmagt, $qnst,
$qgap, $qdmin, $qrms, $qsrc, $qid, $qup, $qloca, $qtyp) = split(",",
$line);
  if ($qdate1 ne 'time') {
   my($qdate,$qtime) = split("T",$qdate1);
#if (my ($qdate, $qtime, $qlatd, $qlong, $qdept, $qmagn, $qmagt, $qnst,
$qgap, $qdmin, $qrms, $qsrc, $qid, $qup, $qloca, $qtyp) =
#      $line =~ m!^(.{10})T(.{8}),(%d),(%d),(%d),(%d),(%d),(%d),(%d),(%
d),(%d),(\w)(.{24})(".+?"),(\w)!) {





On Wed, 2015-11-25 at 08:01 +0000, Tony Yates wrote:
> Hi,
>
> I too had a hack at this a couple of years ago.
>
> If you activate the internet_earthquakes.pl in common code through the
> web interface it sets up the environment to call get_earthquakes on
> the hour.
>
> I'm using the following source file at USGS:
>
> http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.csv
>
> Regards,
>
> Tony..
>
> Quoting kent S <[hidden email]>:
>
> > I too recently tried to get this working. In get_earthquakes, I changed
> > the url, and the new csv file has slightly different columns, so I
> > modified the parsing for that also.
> >
> > I have two problems (both probably operator related).
> >
> > The first is that I don't know how to make the get_earthquake script run
> > automatically. Do I just put it in cron?
> >
> > The other is it seems like the history is deleted, I'm using the "hourly
> > file" and I only seem to see what in that file.
> >
> > If you want a copy of my file I can send it to you privately, or post to
> > the list if it is generally acceptable.
> >
> >
> >
> > On Thu, 2015-11-19 at 06:19 -0800, Craig Lindholm wrote:
> >> I haven't looked at earthquakes yet, but I have taken a quick look at
> >> iridium flares. I am seeing a general pattern of URLs being hard coded
> >> in the files. The web being what it is, hard coding links is probably
> >> not the best way, as 2 months later it'll change.
> >>
> >> If you haven't done so yet, check the URLs.
> >>
> >> Sent from my email program
> >>
> >>
> >>
> >> Tired of the earthquake code not working in my old version of MH, I
> >> went to fix it by downloading the newest version, and it doesn't work
> >> out of the box. Reviewing the documentation within
> >> internet_earthquakes.pl, I can see enough to know it's been majorly
> >> changed, but not quite enough information to figure out how to get it
> >> working again. reviewing the mailing list history, again not quite
> >> enough information foe me to get it working. Can someone provide some
> >> guidance on what I need to do?
> >>
> >> Looks like I need:
> >> /code/common/internet_earthquakes.pl
> >> /bin/get_earthquakes
> >> /bin/get_earthquakes.bat
> >> {data_dir}/web/earthquakes.dbm   (do I have to create the database?
> >> How? )
> >>
> >> Anything else?
> >>
> >> That's going to output:
> >> {data_dir}/web/earthquakes.txt
> >> {data_dir}/web/earthquakes.gif (which I assume surfaces somewhere in
> >> the new code, but I just care about the parsing of the text file)
> >>
> >> Is the updated earthquakes.txt going to honor the old settings in
> >> mh.private.ini:
> >> Earthquake_Count=2
> >> Earthquake_Magnitudes=300 0  #any magnitude w/i 600 miles
> >>
> >> ?
> >>
> >> Thanks for any guidance you might provide.
> >>
> >> Rick
> >>
> >>
> >>
> >> Rick Steeves
> >>
> >> A bicycle sails
> >> On an ocean of freedom
> >> I am the captain
> >>
> >>
> >> ------------------------------------------------------------------------------
> >> ________________________________________________________
> >> To unsubscribe from this list, go to:
> >> https://lists.sourceforge.net/lists/listinfo/misterhouse-users
> >>
> >>
> >> ------------------------------------------------------------------------------
> >> ________________________________________________________
> >> To unsubscribe from this list, go to:
> >> https://lists.sourceforge.net/lists/listinfo/misterhouse-users
> >>
> >
> >
> >
> > ------------------------------------------------------------------------------
> > Go from Idea to Many App Stores Faster with Intel(R) XDK
> > Give your users amazing mobile app experiences with Intel(R) XDK.
> > Use one codebase in this all-in-one HTML5 development environment.
> > Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
> > http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
> > ________________________________________________________
> > To unsubscribe from this list, go to:
> > https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>
>



------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users



------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users