Author Topic: New Plugin - Weather  (Read 16915 times)

malfacine

  • Full Member
  • ***
  • Posts: 33
  • fliper80s@me.com
    • View Profile
New Plugin - Weather
« on: May 29, 2016, 08:26:55 AM »
New Plugin Weather
usage inside of plugin.nut

Works os Windows, Linux and OSX

Extract inside the folder plugins....

Thanks for liquid8 for helping me with file-format module...

https://onedrive.live.com/redir?resid=C85434BAA340DA03!2824&authkey=!AEQekLzhTetnL4g&ithint=file%2czip

kent79

  • Hero Member
  • *****
  • Posts: 842
    • View Profile
Re: New Plugin - Weather
« Reply #1 on: May 30, 2016, 03:58:25 AM »
New Plugin Weather
usage inside of plugin.nut

Works os Windows, Linux and OSX

Extract inside the folder plugins....

Thanks for liquid8 for helping me with file-format module...

https://onedrive.live.com/redir?resid=C85434BAA340DA03!2824&authkey=!AEQekLzhTetnL4g&ithint=file%2czip

Thank you so much. Could you provide a sample layout to apply the plugin. Thanks

malfacine

  • Full Member
  • ***
  • Posts: 33
  • fliper80s@me.com
    • View Profile
Re: New Plugin - Weather
« Reply #2 on: May 30, 2016, 08:43:24 AM »
Code: [Select]
//
 fe.load_module("file-format");
 local xmlSettings = xml.loadFile( FeConfigDirectory + "/plugins/weather/weather_data.xml");
 local query = xmlSettings.getChild("query");
 local results = query.getChild("results");
 local channel = results.getChild("channel");
 local item = channel.getChild("item");
 local condition = item.getChild("yweather:condition");

 fe.add_text(condition.attr["temp"] + "° " + condition.attr["text"], 0, 0, 100, 20 );

example to use

kent79

  • Hero Member
  • *****
  • Posts: 842
    • View Profile
Re: New Plugin - Weather
« Reply #3 on: May 30, 2016, 09:05:06 AM »
Code: [Select]
//
 fe.load_module("file-format");
 local xmlSettings = xml.loadFile( FeConfigDirectory + "/plugins/weather/weather_data.xml");
 local query = xmlSettings.getChild("query");
 local results = query.getChild("results");
 local channel = results.getChild("channel");
 local item = channel.getChild("item");
 local condition = item.getChild("yweather:condition");

 fe.add_text(condition.attr["temp"] + "° " + condition.attr["text"], 0, 0, 100, 20 );

example to use

Where to get weather_data.xml file?

malfacine

  • Full Member
  • ***
  • Posts: 33
  • fliper80s@me.com
    • View Profile
Re: New Plugin - Weather
« Reply #4 on: May 30, 2016, 10:21:12 AM »
Code: [Select]
//
 fe.load_module("file-format");
 local xmlSettings = xml.loadFile( FeConfigDirectory + "/plugins/weather/weather_data.xml");
 local query = xmlSettings.getChild("query");
 local results = query.getChild("results");
 local channel = results.getChild("channel");
 local item = channel.getChild("item");
 local condition = item.getChild("yweather:condition");

 fe.add_text(condition.attr["temp"] + "° " + condition.attr["text"], 0, 0, 100, 20 );

example to use

Where to get weather_data.xml file?

the plugin generate the data file...

install on plugins path, active plugin and configure with your code city
incorporate code on your layout

Mayki07

  • Full Member
  • ***
  • Posts: 31
    • View Profile
Re: New Plugin - Weather
« Reply #5 on: May 30, 2016, 02:51:21 PM »
It works perfectly. Thank you.  ;)
How to set text RGB for the weather?
Somehow go see icons for the weather?



kent79

  • Hero Member
  • *****
  • Posts: 842
    • View Profile
Re: New Plugin - Weather
« Reply #6 on: May 30, 2016, 02:57:32 PM »
It works perfectly. Thank you.  ;)
How to set text RGB for the weather?
Somehow go see icons for the weather?



I am still not working. Could you provide theme's code to me for testing?  Thanks  :)

malfacine

  • Full Member
  • ***
  • Posts: 33
  • fliper80s@me.com
    • View Profile
Re: New Plugin - Weather
« Reply #7 on: May 30, 2016, 03:26:37 PM »
It works perfectly. Thank you.  ;)
How to set text RGB for the weather?
Somehow go see icons for the weather?



I am still not working. Could you provide theme's code to me for testing?  Thanks  :)

What is your operating system?

kent79

  • Hero Member
  • *****
  • Posts: 842
    • View Profile
Re: New Plugin - Weather
« Reply #8 on: May 30, 2016, 07:02:45 PM »
Windows 10 x64  :)

Mayki07

  • Full Member
  • ***
  • Posts: 31
    • View Profile
Re: New Plugin - Weather
« Reply #9 on: May 31, 2016, 02:14:21 PM »
Weather works in Windows 10, but does not work on my Raspberry Pi Floobs image... >:(

malfacine

  • Full Member
  • ***
  • Posts: 33
  • fliper80s@me.com
    • View Profile
Re: New Plugin - Weather
« Reply #10 on: May 31, 2016, 03:22:48 PM »
I do not test on Linux-like systems, the logic should work because the "wget" is universal in linux ...
I will test it on a virtual machine with linux...

need feedback of users to improve....

kent79

  • Hero Member
  • *****
  • Posts: 842
    • View Profile
Re: New Plugin - Weather
« Reply #11 on: May 31, 2016, 11:12:31 PM »
I am still not working. No anything show on screen after I put the code. Could you provide basic theme with sample code for testing. Thanks.  :)

xbs

  • Sr. Member
  • ****
  • Posts: 180
    • View Profile
Re: New Plugin - Weather
« Reply #12 on: June 01, 2016, 07:00:23 AM »
Working here (XP) and available on  Simulacra layout.

Is it possible to add location?
e.g. Lisbon, 24° Sunny

kent79

  • Hero Member
  • *****
  • Posts: 842
    • View Profile
Re: New Plugin - Weather
« Reply #13 on: June 01, 2016, 07:25:11 AM »
Working here (XP) and available on  Simulacra layout.

Is it possible to add location?
e.g. Lisbon, 24° Sunny

xbs, could you upload your Simulacra's theme nut file for me ? Thanks

xbs

  • Sr. Member
  • ****
  • Posts: 180
    • View Profile
Re: New Plugin - Weather
« Reply #14 on: June 01, 2016, 08:38:43 AM »
It's on the layout thread.