Page 2 of 380 FirstFirst 12341252102 ... LastLast
Results 11 to 20 of 3796

Thread: Conky Weather Forecast Python Script

  1. #11
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by killerwhale65 View Post
    Now i am having an issue with the wind direction arrows (see screenshot).
    Code:
    ${execi 3600 python conky/conkyForecast.py --location=BEXX0008 --datatype=WD}
    needs to become

    Code:
    ${execi 3600 python conky/conkyForecast.py --location=BEXX0008 --datatype=BF}
    wind direction will return in the form SSW or NE etc, so is not suitable for use with a custom font. You'll end up with multiple characters and square boxes here and there. BF converts wind direction toa single character mapped to the arrows font.

    The details of the BF datatype were mentioned in dev history, and in the previous thread posts when the dev was done, but were missing from the usage help, I've updated the first post to include a small mention...

    You should be home and dry now

    Please post your final screenshot and conkyrc when you're happy, it should help others in need of a good example!

    Cheers

  2. #12
    Join Date
    Oct 2007
    Location
    Belgium
    Beans
    73
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Conky Weather Forecast Python Script

    ok thanks, that should do it.

    I will for sure post a screenshot along with the codes when it is finished.

    In the mean time, i still have a few questions:
    -the weather.com 10-day forecast is probably not included in the feed?
    -What exactly is "night output" (--night)
    -Is it compatible with the other weather fonts that are available on the net?

    Thanks!

    Matt

  3. #13
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by killerwhale65 View Post
    ok thanks, that should do it.

    I will for sure post a screenshot along with the codes when it is finished.

    In the mean time, i still have a few questions:
    -the weather.com 10-day forecast is probably not included in the feed?
    -What exactly is "night output" (--night)
    -Is it compatible with the other weather fonts that are available on the net?

    Thanks!

    Matt
    Hi Matt

    1. No, for the forecast there is only 5 days, today and the next four, so you can use: startday=0 - for today up to startday=4 for the 5th day.

    2. You can have a "double" output for each day, if you use --night it will switch output to night data, if omitted day output will be output. weather.com switches to the night time data output around 6pm. I don't bother, I sleep at night.

    3. Maybe, but I don't think so. As the script calls the font by "location" if another font has the same type of symbols in the same location yes, but chances of that happening are probably not good.

    For example: lets say the font here has the sunny symbol a "B" but another font has it at "S" and you use the other font, the script will call for "B" and that might be: Thunderstorm.

    Hope this helps.
    Bruce

  4. #14
    Join Date
    Oct 2007
    Location
    Belgium
    Beans
    73
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Conky Weather Forecast Python Script

    ok, thanks, and what exactly is meant by "night output"? What will be different then? Sorry but i dont have a clue of what to expect from it.

    thanks!

  5. #15
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by killerwhale65 View Post
    ok, thanks, and what exactly is meant by "night output"? What will be different then? Sorry but i dont have a clue of what to expect from it.

    thanks!
    Hi again...

    To be absolutely honest I'm not sure. For me a forecast covers the 24 hours. Like I said I don't use the -night command and my conky shows the forecast fine.

    Guess I'll do a test weather conky with two identical sets of lines except the second set will have a -night option in it and see what's what.

    I'll be back.
    Bruce

    PS: Anyone else care to explain what's what here I'm listening too!

  6. #16
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by killerwhale65 View Post
    ok, thanks, and what exactly is meant by "night output"? What will be different then? Sorry but i dont have a clue of what to expect from it.

    thanks!
    The night option displays data in the night section of the forecast data from the xoap weather feed, the only way to really explain this is to show you the data returned from the site. You can see below the 2 sections of forecast xml, <part p="d"> starts the day time data, <part p="n"> starts the night time data. As you can see the temperature doesn't fit into the day or night section and is general data for the whole 24hr period.

    Code:
        <day d="1" t="Tuesday" dt="Jul 29">
          <hi>24</hi>
          <low>14</low>
          <sunr>5:10 AM</sunr>
          <suns>8:52 PM</suns>
          <part p="d">
            <icon>30</icon>
            <t>Partly Cloudy</t>
            <wind>
              <s>24</s>
              <gust>N/A</gust>
              <d>192</d>
              <t>SSW</t>
            </wind>
            <bt>P Cloudy</bt>
            <ppcp>20</ppcp>
            <hmid>65</hmid>
          </part>
          <part p="n">
            <icon>29</icon>
            <t>Partly Cloudy</t>
            <wind>
              <s>24</s>
              <gust>N/A</gust>
              <d>195</d>
              <t>SSW</t>
            </wind>
            <bt>P Cloudy</bt>
            <ppcp>20</ppcp>
            <hmid>76</hmid>
          </part>
        </day>
    So I think the datatypes that can differ between night and day are:

    • WF
    • CC
    • CT
    • PC
    • WD
    • WS
    • WG
    • HM


    Thanks for all the good questions, makes for a better solution. I'll be updating the help details to suit when you've got all the answers you need

  7. #17
    Join Date
    Oct 2007
    Location
    Belgium
    Beans
    73
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Conky Weather Forecast Python Script

    thanks, i think i will try it once, to fully understand and maybe make use of it.

    Well if you want more questions:
    -can the wind speed be displayed in beaufort?
    -can de sunrise/set time be in 24H format?

    Thanks once again. It is nice to have a contribtution with such a level of support!

  8. #18
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by killerwhale65 View Post
    thanks, i think i will try it once, to fully understand and maybe make use of it.

    Well if you want more questions:
    -can the wind speed be displayed in beaufort?
    -can de sunrise/set time be in 24H format?

    Thanks once again. It is nice to have a contribtution with such a level of support!
    Never come across "beaufont", tell us the conversion formula to get to it from m/s or mph etc and I'll add a --beaufort option which will convert speed output

    For the 24hr time would it be a good idea to base time on the system locale setting for time format? I've already figured that stuff out for my google calendar script. It would mean it is displayed based on any one system's setup, rather than directly through script arguments.

    We are all happy to help here, enough people have helped us over the course of time...

  9. #19
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by killerwhale65 View Post
    thanks, i think i will try it once, to fully understand and maybe make use of it.

    Well if you want more questions:
    -can the wind speed be displayed in beaufort?
    -can de sunrise/set time be in 24H format?

    Thanks once again. It is nice to have a contribtution with such a level of support!
    beaufort ... OH that will be fun: Beaufort scale

    24 hours format!!! What a genius. Why didn't I think of that.
    {alter ego; you just answered that dummy: genius}

    Quote Originally Posted by kaivalagi View Post
    Never come across "beaufont", tell us the conversion formula to get to it from m/s or mph etc and I'll add a --beaufort option which will convert speed output

    For the 24hr time would it be a good idea to base time on the system locale setting for time format? I've already figured that stuff out for my google calendar script. It would mean it is displayed based on any one system's setup, rather than directly through script arguments.

    We are all happy to help here, enough people have helped us over the course of time...
    Formula in the above link, have fun. Not a sea going type here but will be nice to see.

    OK, I'm waiting for the 24 hours stuff now too! (Thanks Matt!)

    CHIMO!
    Bruce

  10. #20
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by killerwhale65 View Post
    can the wind speed be displayed in beaufort?
    Quote Originally Posted by Bruce M. View Post
    beaufort ... OH that will be fun: Beaufort scale
    Should have known to go to wikipedia!

    Here goes...

    V = 0.836 x B^(3/2) m/s
    V = 0.836 x B^(3/2) x 3.6 kph
    B = (1.196172249 x (V x 0.278)) ^(2/3)

    That would make 20kph = 3.53 => 4 B ... sounds about right?

    I suppose it needs to be rounded up to the nearest whole number? Worse case on the scale then...

    Edit: In python that would be:
    Code:
    beaufont=str(int(math.ceil(math.pow(float(windspeedkph)*0.332270069, 2.0/3.0))))
    Last edited by kaivalagi; July 28th, 2008 at 08:30 PM.

Page 2 of 380 FirstFirst 12341252102 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •