add metadata

This commit is contained in:
Evgeny
2021-07-30 10:42:12 +03:00
parent 703dff5ffb
commit 572ffcf930
11 changed files with 86 additions and 0 deletions

20
isdayoff-ru-widget.lua Normal file
View File

@@ -0,0 +1,20 @@
-- name = "Сегодня выходной?"
-- description = "Показывает, выходной ли сегодня день (isdayoff.ru)"
-- type = "widget"
-- author = "Evgeny Zobnin (zobnin@gmail.com)"
-- version = "1.0"
function onAlarm()
local dateStr = os.date('%Y%m%d')
net:getText("https://isdayoff.ru/"..dateStr)
end
function onNetworkResult(result)
if result == "0" then
ui:showText("Сегодня рабочий день")
elseif result == "1" then
ui:showText("Сегодня выходной")
else
ui:showText("Ошибка")
end
end