local p = local uc =
local page_content = local function get_section(frame, page_name, section_name) if page_content[page_name]
local function transclude(frame, entry, year, article) local s = " " s = frame:preprocess(s) .. get_section(frame, article, uc[entry]) s = mw.ustring.gsub(s, '
+%s*%c*', ) return mw.ustring.match(s, '.*%*.*%a.+')end
function p.main(frame) local decade = mw.text.trim(frame.args[1] or frame:getParent.args[1] or '0') local result = local article_list = local year_list =
if decade:sub(1, 1)
'-0' and -1 or 0) do table.insert(article_list, frame:expandTemplate) table.insert(year_list, decade .. math.abs(i)) end else for i = (decade
' .. uc[entry] .. '
for i, article in ipairs(article_list) do table.insert(result, transclude(frame, entry, year_list[i], article)) end end return table.concat(result)end
return p