Modul:Briefspielnews: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 26: | Zeile 26: | ||
function ausgabe(kapitel) | function ausgabe(kapitel) | ||
local result="" | local result="" | ||
local tkeys=getSortKeys(kapitel) | |||
--for _,k in ipairs(tkeys) do | --for _,k in ipairs(tkeys) do | ||
Version vom 5. Oktober 2024, 05:40 Uhr
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
result=dump(kapitel,"")
return result
end
--Aufzurufende Funktion
function p.news(frame)
local kapitel=holeKapitel()
return ausgabe(kapitel)
end
return p