Модуль:AllPages
Документацію для цього модуля можна створити у Модуль:AllPages/документація
local p = {}
function p.listSeasons(frame)
local seasons = {
"Дев'ятий сезон", "Восьмий сезон", "Сьомий сезон", "Шостий сезон", "П'ятий сезон", "Четвертий сезон", "Третій сезон", "Другий сезон", "Перший сезон"
-- Add or remove seasons as needed
}
local output = {}
local count = 0
for _, season in ipairs(seasons) do
if mw.title.new(season).exists then
table.insert(output, string.format('<p>[[%s|%s]]</p>', season, season))
count = count + 1
if count >= 9 then
break
end
end
end
return table.concat(output, "\n")
end
return p