Module:InterviewArchive

From JoJo's Bizarre Encyclopedia - JoJo Wiki
Revision as of 02:13, 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:DateParser')
local json = require('mw.loadJsonData')('JoJo Wiki:Interviews')

function p.generateArchive(frame)
    local content = json.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