Skip to content

Instantly share code, notes, and snippets.

@KTamas
Created June 9, 2011 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KTamas/1017474 to your computer and use it in GitHub Desktop.
Save KTamas/1017474 to your computer and use it in GitHub Desktop.
navi.on 'weather', (from, to, message) ->
query =
host: "koponyeg.hu"
port: 80
path: 'idojaras_rss.php?regios=1'
http.get query, (res) ->
body = ""
res.on 'data', (chunk) -> body += chunk
res.on 'end', ->
weatherxml = libxml.parseXmlString(body)
# navi.say to, weatherxml.get('//rss/channel/item/koponyeg:jelenido').attr('homerseklet') + " C"
navi.say to, weatherxml.get('//rss/channel/item/description').text()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment