owm.xjs script for 5 day / 3 hour forcast:ããTell me what you think, pleaseãã<?xjsã(function () {ã try {ã load('geoip.js');ã var geoip = get_geoip( http_request.header['x-forwarded-for']ã|| http_request.remote_ip);ã require('openweathermap.js', 'OpenWeatherMap');ã var owm = new OpenWeatherMap();ã var wq = { units: 'metric', mode: 'json' };ãã var ts = Math.round((new Date()).getTime() / 1000);ãã if (geoip.latitude && geoip.longitude) {ã wq.lat = geoip.latitude;ã wq.lon = geoip.longitude;ã } else ã if (geoip.cityName) {ã wq.q = geoip.cityName;ã }ãã var city = geoip.cityName + ', ' + geoip.countryName; // ForãDisplay Onlyã ã var fc = owm.call_api('forecast', wq);ãã writeln('<center>OpenWeatherMap 5 Day/3 Hour Forecast for ' +ãcity + '</center><hr><br>');ãã fc.list.forEach(function (e) {ã if(e.dt >= ts-9900) { // Doesn't list weather 15ãminutes prior to next 3 hour block ã writeln(system.timestr(e.dt) + ': <br>');ã writeln('<imgãsrc=
http://openweathermap.org/img/wn/'+e.weather[0].icon+'@2x.png height=50ãwidth=50>');ã writeln(e.main.temp_max+'°C, ' ); ã writeln(e.weather[0].main + ', ' +ãe.weather[0].description); ã
writeln(e.clouds.all + '% clouds');ã writeln();ã print("<br><br><br>");ã }ã });ã}ãcatch (err) {ã writeln('ERROR: ' + err + '<br><br>'); ã }ã}) ();ããããMy doctor said I have the body of a 25 year old ... and the mind of a 10 :-/ãã---ã þ Synchronet þ AlleyCat! BBS -
http://alleycat.synchro.net:81ã