Module:Fileinfo

local p = {}

function p.fileinfo(frame) local args = require('Module:ProcessArgs').merge(true)

local copyright = args['copyright'] or 'unlicensed' local licenseOptions = { ['fair use']     = 'Fair Use – This file is ed. The individual who uploaded and first used this work on, and subsequent persons who use it, assert that it qualifies as of the material under .', ['public domain'] = 'Public Domain – This file has been released into the by the copyright holder, its copyright has expired, or it is ineligible for copyright. This applies worldwide.', ['permission']   = 'Permission – This file is copyrighted. The copyright holder has given permission for its use.', ['CC-BY-SA']     = 'Creative Commons – This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 License.', ['CC-BY-SA-NC']  = 'Creative Commons – This work is licensed under the Creative Commons Attribution-Non-Commercial-ShareAlike 3.0 License.', ['GFDL']         = 'GFDL – This file is licensed under the GFDL. Permission is granted to copy, distribute and/or modify this image under the terms of the, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.', ['unlicensed']   = 'Unlicensed – This file has been uploaded to  without a license and has consequently been marked for deletion.' }   local ownerOptions = { ['KJPSIE'] = 'Kojima Productions and/or Sony Interactive Entertainment' }   local sourceOptions = { ['DS'] = Death Stranding }   local owner = ownerOptions[ args['owner'] ] or N/A local source = sourceOptions[ args['source'] ] or args['source'] or N/A local fairUseRationale, categories = ,  if copyright == 'fair use' then local hasAttribution, isNotReplaceable

if owner ~= N/A then hasAttribution = 'provides attribution to the copyright holder; ' end

fairUseRationale = ';Rationale: This file ' .. hasAttribution .. 'is only being used for visual and informational purposes; is significant in illustrating a subject (see below); ' .. isNotReplaceable .. 'and does not in any way affect the value of the original work or limit the copyright holder\'s rights or ability to market or sell their product. If you are the copyright holder of this file and feel that its use here does not fall under "fair use", please contact an administrator. '   end

if ownerOptions[owner] then isNotReplaceable = 'is only being used for visual and informational purposes; ' end -- Convert into categories local categories if args['cats'] then local subjects = mw.text.split(args['cats'], ',') for key, val in pairs(subjects) do categories = categories .. ''		end else categories = '' end

local html = { ' ',       '',        'This file is being used on  under the following terms:', ';License: ' .. licenseOptions[copyright], ';Creator/Owner: ' .. owner, ';Source: ' .. source, fairUseRationale, ' ',       categories }

return frame:preprocess( table.concat(html, '\n') ) end

return p --