Module:Qref

local p = {} local qrefExtRefs = { ["BOG"] = "Berserk Official Guidebook", ["SKQA2"] = "Walter Bennet (sender), Puella (translator). \"Writing Miura\". ''\" 'Falcon' or 'Hawk', both mean [鷹] in Japanese. In some dictionaries, 'Falcon' is translated as [隼(はやぶさ)], but there's almost no difference. I used 'Falcon' from the great name of the 'Millennium Falcon' ship in Star Wars. \"'' SkullKnight.net.", ["SKQA9"] = "Walter Bennet (sender), Puella (translator). \"Writing Miura\". ''\" It\'s because I wanted Berserk\'s world to be revealed just that far, not any more than that. The appearance of god in the manga conclusively determines its range. I thought that might limit the freedom of the story development. I myself don't know if the Idea of Evil will show up again in the manga or not. \"'' SkullKnight.net.", ["SKDH"] = "Auturgist (creative consusltant to translator Duane Johnson). \"I'm a guy that works on Dark Horse's translations\". ''\" So sometimes we\'ll work in some subtle reference to other awesome things. For instance, when Guts first gets his iron arm, we had him saying, 'Groovy!' \"'' SkullKnight.net.", } local qrefErrorText = ' Qref not found '

function p.qref(frame) local qrefArgKey = frame.args[1] local qrefKey = qrefArgKey:match('e([0-9A-P]*)') or qrefArgKey local qrefText -- If qrefKey is an episode key if tonumber(qrefKey) or qrefKey:match('0[A-P]') then local episodesManga = mw.loadData( 'Module:Episodes/mangaData' ) local episode = episodesManga[qrefKey] qrefText = 'Berserk, Volume ' .. episode['volume'] .. ', "' .. episode['ename'] .. '"' end return qrefText or qrefExtRefs[qrefKey] or qrefErrorMsg end return p