Skip to content

Instantly share code, notes, and snippets.

@cuevasclemente
Created May 7, 2015 17:05
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 cuevasclemente/21bf5c2b2f1aefb183ce to your computer and use it in GitHub Desktop.
Save cuevasclemente/21bf5c2b2f1aefb183ce to your computer and use it in GitHub Desktop.
Weather App in Nim
import httpclient
import strutils
import re
var resp = get(url = "http://forecast.weather.gov/MapClick.php?zoneid=NYZ075&TextType=1")
var text = resp.body
for line in splitlines(text):
if line[0..2] == "<b>" or line[0..7] == "</table>":
echo(line.replace(re"\<.*?>"), "\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment