Module:InterviewArchive

From JoJo's Bizarre Encyclopedia - JoJo Wiki
Revision as of 02:15, 7 May 2023 by Vish (talk | contribs)
Jump to navigation Jump to search

Documentation for this module may be created at Module:InterviewArchive/doc

local p = {}
local dateParser = require('Module:InterviewUtils')

function p.generateArchive(frame)
    local content = mw.loadJsonData('JoJo Wiki:Interviews').interviews
    local output = {}

    for _, interview in ipairs(content) do
        local template = frame:expandTemplate{title = 'Interview', args = {interview.title, interview.shortName}}
        table.insert(output, template)
    end

    return table.concat(output, '\n')
end

return p