Module:Number

-- local p = {} local numData = mw.loadData('Module:Number/data')

function p.getNum(frame) local show= frame.args[1] local number={} if numData[show] then number=numData[show][1] else number="0[[Category:"			 .."Broken S link]]" end return number end

function p.current(frame) local show=frame.args[1] local pagename=frame.args[2] local currentDisplay="" local length= mw.ustring.len(show) local par={} if mw.ustring.find(show,'(',1,true)==nil       then par=length        else par=mw.ustring.find(show,'(',1,true)-2 end local title=mw.ustring.sub(show,1,par) if numData[show] then local season=numData[show][2] local suggestedPN="Season " ..season .." ("				..title				..")" if suggestedPN==pagename and numData[show][3]>0 then currentDisplay=" ("						..numData[show][3]						.." aired) " end end return frame:preprocess(currentDisplay) end return p