Module:InterviewArchive

local p = {}

local function generateInterview(interview, frame) local output = {} table.insert(output, ' ') table.insert(output, ' ') if interview.cover ~= '' then table.insert(output, '') else table.insert(output, '') end table.insert(output, ' ') table.insert(output, ' ') table.insert(output, ' ') table.insert(output, '') table.insert(output, ' ') table.insert(output, ' ') if interview.display then table.insert(output, frame:preprocess("")) else table.insert(output, frame:preprocess("")) end table.insert(output, ' ') table.insert(output, ' ') if interview.translation then table.insert(output, frame:preprocess('<' .. interview.translation .. ' >'))   end if interview.transcript then table.insert(output, frame:preprocess('<' .. interview.transcript .. ' >'))   end table.insert(output, frame:preprocess('<' .. interview.media .. ' >'))   table.insert(output, frame:preprocess('<' .. interview.type .. ' >'))   table.insert(output, frame:preprocess('right')) table.insert(output, ' 👤 ') for i, person in ipairs(interview.interviewee) do	 if i > 1 then table.insert(output, ", ") end table.insert(output, frame:preprocess(person)) end

table.insert(output, ' ') table.insert(output, ' 📜 ') for _, tag in ipairs(interview.tags) do       table.insert(output, frame:preprocess('<' .. tag .. ' >'))   end table.insert(output, '   ') return table.concat(output) end

function p.generateArchive(frame) local content = mw.loadJsonData('JoJo Wiki:Interviews').interviews local html = {' '} -- Start the div with the ID 'interview-container' for _, interview in ipairs(content) do       table.insert(html, generateInterview(interview, frame)) end

table.insert(html, ' ') -- End the div with the ID 'interview-container' return table.concat(html) end

return p