Skip to content

Instantly share code, notes, and snippets.

@meskarune
meskarune / weather.lua
Last active May 6, 2022 05:07
lua weather script
#!/usr/bin/lua
-- load the http socket module
http = require("socket.http")
-- load the json module
json = require("json")
api_url = "http://api.openweathermap.org/data/2.5/weather?"
-- http://openweathermap.org/help/city_list.txt , http://openweathermap.org/find
cityid = "5128581"