minor improvements

This commit is contained in:
topkecleon
2016-01-14 22:39:24 -05:00
parent e04abca769
commit c94c8e3b4d
5 changed files with 54 additions and 5 deletions

View File

@ -26,7 +26,7 @@ local action = function(msg)
url = url .. '&date=' .. URL.escape(input)
date = date .. input
else
date = date .. os.date("%Y-%m-%d")
date = date .. os.date("%F")
end
date = date .. '*\n'
@ -44,9 +44,8 @@ local action = function(msg)
return
end
--local weburl = 'http://apod.nasa.gov/apod/ap' .. date_url .. '.html'
--output = date .. '[' .. jdat.title .. '](' .. weburl .. ')\n'
output = date .. '[' .. jdat.title .. '](' .. jdat.hdurl .. ')\n'
local img_url = jdat.hdurl or jdat.url
output = date .. '[' .. jdat.title .. '](' .. img_url .. ')\n'
if jdat.copyright then
output = output .. 'Copyright: ' .. jdat.copyright