Changes

Jump to navigation Jump to search

Module:Authority control

575 bytes added, 14:38, 16 June 2018
+function p.docFaultyCatList, from sandbox
end
-- Creates a human-readable standalone wikitable version of p.conf , for use in the documentationfunction p.confDocdocConfTable( frame )
local wikiTable = '{| class="wikitable sortable"\n' ..
'! Parameter !! Label !! data-sort-type=number | Wikidata property'
local pid = conf[3]
local args = { id = 'f', pid }
local WPL wpl = frame:expandTemplate{ title = 'Wikidata property link', args = args }
wikiTable = wikiTable .. '\n' ..
'|-\n' ..
'|' .. param .. '||' .. link .. '||data-sort-value=' .. pid .. '|' .. WPLwpl
end
return wikiTable .. '\n|}'
end
 
-- Creates a list of all "** {{clc|Wikipedia articles with faulty authority control identifiers (BPN)}}" type cats, for use in the documentation
function p.docFaultyCatList( frame )
local list = nil
for _, conf in pairs( p.conf ) do
local param = conf[1]
local cat = 'Wikipedia articles with faulty authority control identifiers ('..param..')'
local args = { cat }
local clc = frame:expandTemplate{ title = 'Category link with count', args = args }
if list then list = list .. '\n**' .. clc
else list = '**' .. clc end --first line
end
return list
end
Anonymous user

Navigation menu