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, ' ') table.insert(output, "Interview:" .. interview.title .. "") 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')) local interviewees = table.concat(interview.interviewee, ', ') table.insert(output, ' 👤 ' .. interviewees .. ' ') table.insert(output, ' 📜 ') for _, tag in ipairs(interview.tags) do       table.insert(output, frame:preprocess('<' .. tag .. ' >'))   end table.insert(output, '   ') table.insert(output, ' ') table.insert(output, '  ')

return table.concat(output) end

function p.generateArchive(frame) frame:extensionTag( 'templatestyles', '', { src = 'Template:Interview/styles.css' } ); local content = mw.loadJsonData('JoJo Wiki:Interviews').interviews local output = {}

for _, interview in ipairs(content) do       table.insert(output, generateInterview(interview, frame)) end

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

return p