Module:File

local f = {}

function f.main(frame) local description if frame.args["description"]=="" or frame.args["description"]==nil then description="No description provided " else description=frame.args["description"] end local type = mw.ustring.lower(frame.args["type"] or "") local source if frame.args["source"]=="" or frame.args["description"]==nil then source="No source specified " else source=frame.args["source"] end local result = {} local t = {} t = { ['art'] = "Official artwork ", ['arts'] = "Official artwork ", ['artwork'] = "Official artwork ", ['art work'] = "Official artwork ", ['official artwork'] = "Official artwork ", ['official artworks'] = "Official artwork ", ['official art'] = "Official artwork ", ['official arts'] = "Official artwork ", ['audio'] = "Audio ", ['music'] = "Audio ", ['song'] = "Audio ", ['songs'] = "Audio ", ['sound'] = "Audio ", ['boxart'] = "Box art ", ['box art'] = "Box art ", ['boxarts'] = "Box art ", ['box arts'] = "Box art ", ['chart'] = "Chart/diagram ", ['diagram'] = "Chart/diagram ", ['fanart'] = "Fan art ", ['fanarts'] = "Fan art ", ['fan art'] = "Fan art ", ['fanartwork'] = "Fan art ", ['flag'] = "Flag ", ['flags'] = "Flag ", ['logo'] = "Logotype ", ['logotype'] = "Logotype ", ['logomark'] = "Logotype ", ['wordmark'] = "Logotype ", ['map'] = "Map ", ['maps'] = "Map ", ['photo'] = "Photograph ", ['photos'] = "Photograph ", ['photograph'] = "Photograph ", ['photography'] = "Photograph ", ['scan'] = "Scan ", ['scans'] = "Scan ", ['magazine'] = "Scan ", ['screenshot'] = "Screenshot ", ['screenshots'] = "Screenshot ", ['screen shot'] = "Screenshot ", ['printscreen'] = "Screenshot ", ['print screen'] = "Screenshot ", ['prtscr'] = "Screenshot ", ['sprite'] = "Sprite ", ['sprites'] = "Sprite ", ['spritesheet'] = "Sprite ", ['sprite sheet'] = "Sprite ", ['user'] = "User image ", ['user image'] = "User image ", ['user img'] = "User image ", ['vector'] = "Vector graphic ", ['svg'] = "Vector graphic ", ['video'] = "Video ", ['videos'] = "Video ", ['movie'] = "Video ", ['film'] = "Video ", ['short'] = "Video ", ['wiki'] = "Wiki image " }	type = t[type] or "No type specified. " local license = mw.title.getCurrentTitle:getContent if license:find('%{%{License%-') then license = "" else license = "" end local panel = ' File information  '.. license ..'' if mw.title.getCurrentTitle.namespace ~= 6 then panel = "Hey! The module does not spawn here because it's intended to be used on File pages only." end table.insert(result, panel) return table.concat(result, "") end

return f