rssfeed.lua 772 B

12345678910111213141516171819202122232425
  1. -- Copyright 2012 Manuel Munz <freifunk at somakoma dot de>
  2. -- Licensed to the public under the Apache License 2.0.
  3. local map, section = ...
  4. local utl = require "luci.util"
  5. local form, ferr = loadfile(utl.libpath() .. "/model/cbi/freifunk/widgets/heightwidth.lua")
  6. if form then
  7. setfenv(form, getfenv(1))(m, wdg)
  8. end
  9. local url = wdg:option(Value, "url", translate("URL"))
  10. url.default = "http://global.freifunk.net/rss/all/rss.xml"
  11. local max = wdg:option(Value, "max", translate("Maximal entries to show"))
  12. max.rmempty = true
  13. max.default = "10"
  14. max.datatype = "integer"
  15. local cache = wdg:option(Value, "cache", translate("Cache Time"), translate("Cache downloaded feed for that many seconds."))
  16. cache.rmempty = true
  17. cache.default = "3600"
  18. cache.datatype = "integer"