rss.lua: Code "verschönert"

This commit is contained in:
Akamaru 2015-12-01 20:53:35 +01:00
parent 1965853444
commit 4d0d39fb41
1 changed files with 2 additions and 3 deletions

View File

@ -14,7 +14,7 @@ local function unescape_for_rss(str)
str = string.gsub(str, "ß", "ß")
str = string.gsub(str, "'", "'")
str = string.gsub(str, "|", "|")
str = string.gsub(str, " ", " ")
str = string.gsub(str, " ", " ")
str = string.gsub(str, "»", "»")
str = string.gsub(str, "ß", "ß")
str = string.gsub(str, "–", "")
@ -165,7 +165,6 @@ local function unsubscribe(id, n)
end
local function cron()
-- sync every 15 mins?
local keys = redis:keys(get_base_redis("*", "subs"))
for k,v in pairs(keys) do
local base = string.match(v, "rss:(.+):subs") -- Get the URL base
@ -190,7 +189,7 @@ local function cron()
else
content = ''
end
text = text .. '[RSS] '.. title .. '\n'..content..'\n\n' .. link .. '\n\n'
text = text..'[RSS] '..title..'\n'..content..'\n\n'..link..'\n\n'
end
if text ~= '' then
local newlast = newentr[1].id