Modul:Briefspielnews
Zur Navigation springen
Zur Suche springen
Die Dokumentation für dieses Modul kann unter Modul:Briefspielnews/Doku erstellt werden
require("Modul:Hilfsfunktionen")
require("Modul:Text")
local p = {}
--Hole die 500 neuesten Kapitel
function holeKapitel()
local kapitel=mw.smw.ask("{{#ask: [[-has subobject::+]]"
.."|?#-="
.."|?Kurzbeschreibung#="
.."|?Kapitelname ist"
.."|?Reihe ist"
.."|?Kapiteldatum"
.."|limit=500"
.."|order=desc"
.."|sort=Kapiteldatum"
.."|offset=0"
.."|searchlabel=")
if kapitel==nil then
return {}
end
return kapitel
end
--Formatierung der Ausgabe
function ausgabe(kapitel)
local result=""
local tkeys=getSortKeys(kapitel)
for _,k in ipairs(tkeys) do
result=result.."\n*"..kapitel[k][1]
end
return result
end
--Aufzurufende Funktion
function p.news(frame)
local kap=holeKapitel()
return ausgabe(kap)
end
return p