reorganization

This commit is contained in:
Evgeny
2021-08-06 14:43:34 +03:00
parent 372ec8578d
commit 1e9b33eaea
52 changed files with 1044 additions and 20 deletions

21
ru/isdayoff-ru-widget.lua Normal file
View File

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