Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: extended forecast

From: ralph:abooks at: 7-May-2001 15:33

Very nice, Ryan (I love weather scripts). Here's a modification of your script to make it web-ready. See it in action doing the Asheville, NC weather at: and below is the script itself (mostly Ryan's work, give him all the credit<g>): #!/rebol/rebol --cgi REBOL [] print "Content-Type: text/html^/" ZIP: 28806 ;;; put in your own zip code forecast: func [ ZIP [integer!] {The ZIP code for where you want the forecast} /local weather-URL weather-info future-weather ][ weather-URL: make url! rejoin [{} ZIP {&nav=home}] weather-info: read weather-URL parse/all weather-info [thru "^/." copy text to "$$" (future-weather: copy text)] print future-weather ;; added print function ] print "<h2>Weather for Asheville, North Carolina</h2><br>" forecast ZIP