Loading ...
Sorry, an error occurred while loading the content.

Re: [linuxham] No script WX for Mac OS X

Expand Messages
  • Dave
    I can confirm that on my Mac running 10.7.2 and Fldigi 3.21.33, this one works. 73 Dave ... Dave Wright K3DCW www.k3dcw.net Real radio bounces off the sky
    Message 1 of 5 , Jan 1, 2012
    • 0 Attachment
      I can confirm that on my Mac running 10.7.2 and Fldigi 3.21.33, this one works. 

      73

      Dave
      ----
      Dave Wright
      K3DCW
      www.k3dcw.net


      "Real radio bounces off the sky"

      On Jan 1, 2012, at 5:02 PM, Brian Miezejewski wrote:

       

      The group post from within Yahoo messed up the new lines/line feeds location so I am reposting both scripts from my e-mail.

      For MAC:

      <EXEC>curl -s www.weather.gov/xml/current_obs/KMDQ.xml | awk 'BEGIN{FS="[\<]|[\>]"}{
      if($2=="weather"){print "WX: "$3}
      if($2=="temperature_string"){print "Temp: "$3}
      if($2=="wind_string"){print "Wind: "$3}
      if($2=="pressure_in"){print "Baro: "$3}
      }'</EXEC>

      For Linux:

      <EXEC>wget -q -O - www.weather.gov/xml/current_obs/KMDQ.xml | awk 'BEGIN{FS="[\<]|[\>]"}{
      if($2=="weather"){print "WX: "$3}
      if($2=="temperature_string"){print "Temp: "$3}
      if($2=="wind_string"){print "Wind: "$3}
      if($2=="pressure_in"){print "Baro: "$3}
      }'</EXEC>

      Not that the first new line/line feed comes after just before the first "if", NOT after the awk as Yahoo did it.

      Cheers,
      Brian
      K5HFI


    • w1hkj
      The original Perl script also works if you make the following substitution: Replace system wget www.weather.gov/xml/current_obs/$wxsta.xml 2 /dev/null ; with
      Message 2 of 5 , Jan 2, 2012
      • 0 Attachment
        The original Perl script also works if you make the following substitution:

        Replace
        system "wget www.weather.gov/xml/current_obs/$wxsta.xml 2>/dev/null";

        with
        system "curl www.weather.gov/xml/current_obs/$wxsta.xml >$wxsta.xml
        2>/dev/null"

        Tested on PowerPC G4, OS X version 10.4.11 and Intel Core 2 Duo, OS X
        version 10.6.8

        73, Dave, W1HKJ
      • Graham Saville
        This Email was sent on 03/01/12 at 08:57 In Reply to: Re: [linuxham] No script WX for Mac OS X Hi fldigi, I use the following in Linux: you need weather-utils
        Message 3 of 5 , Jan 3, 2012
        • 0 Attachment
          This Email was sent on 03/01/12 at 08:57
          In Reply to: Re: [linuxham] No script WX for Mac OS X

          Hi fldigi,
          I use the following in Linux: you need weather-utils this can be
          downloaded from repositories, and the macro is <EXEC>weather-util
          luton</EXEC>. You can either edit the .weatherrc file and make an alias
          for your local airport ICAO code (in my case Luton=EGGW) and also set
          what is shown or you can put in place of the "Luton" the ICAO code in
          the macro but this will show all of the WX report which could be
          lengthy, best to refer to the weather-util man page.


          Best 73
          From Graham G1RNZ
          Good DX.


          On 01/01/12 21:54, bski wrote:
          > One last try from a different angle. The following macro does NOT need a script downloaded and should work on a recent MAC as is. Note that you will still need to replace "KMDQ" in "www.weather.gov/xml/current_obs/KMDQ.xml" by selecting the closest station to you from http://www.weather.gov/xml/current_obs/ as documented in the getwx.pl script. (Where the new line/line feeds come is important in this script so they should not be moved.)
          >
          > <EXEC>curl -s www.weather.gov/xml/current_obs/KMDQ.xml | awk 'BEGIN{FS="[\<]|[\>]"}{
          > if($2=="weather"){print "WX: "$3}
          > if($2=="temperature_string"){print "Temp: "$3}
          > if($2=="wind_string"){print "Wind: "$3}
          > if($2=="pressure_in"){print "Baro: "$3}
          > }'</EXEC>
          >
          > For Linux users that want to try this try the following. It works on my Ubuntu VM, but I have not tried it on any other Linux distos.
          >
          > <EXEC>wget -q -O - www.weather.gov/xml/current_obs/KMDQ.xml | awk 'BEGIN{FS="[\<]|[\>]"}{
          > if($2=="weather"){print "WX: "$3}
          > if($2=="temperature_string"){print "Temp: "$3}
          > if($2=="wind_string"){print "Wind: "$3}
          > if($2=="pressure_in"){print "Baro: "$3}
          > }'</EXEC>
          >
          >
          > Cheers,
          > Brian
          > K5HFI
          >
          >
          >
          >
          > ------------------------------------
          >
          > Yahoo! Groups Links
          >
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.