Changes

Jump to navigation Jump to search

Module:Authority control

230 bytes added, 01:34, 10 September 2019
m
174 revisions imported
function p.reroLink( id )
--P3065's format regex: 0[1-2]-[A-Z][0Z0-9]{1,910} (e.g. 02-A012345678) if not string.match( id, '^0[1-2]%-[A-Z%d][A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?$' ) then
return false
end
end
function p.createRow( id, label, rawValue, link, withUid , specialCat )
if link then
if withUid then
end
local catName = 'Wikipedia articles with faulty '..(specialCat or id)..' identifiers'
return '* <span class="error">The '..id..' id '..rawValue..' is not valid.</span>[[Category:'..catName..']]'..p.redCatLink(catName)..'\n'
end
{ 'BIBSYS', '[[Bibsys|BIBSYS]]', 1015, p.bibsysLink },
{ 'Bildindex', '[[Marburg Picture Index|Bildindex]]', 2092, p.bildLink },
-- { 'BNC', '[[Biblioteca Nacional de Chile|BNC]]', 1890, p.bncLink }, --initially commented due to excessive WD ID errors(many bad IDs since removed)
{ 'BNE', '[[Biblioteca Nacional de España|BNE]]', 950, p.bneLink },
{ 'BNF', '[[Bibliothèque nationale de France|BNF]]', 268, p.bnfLink },
{ 'NLI', '[[National Library of Israel|NLI]]', 949, p.nliLink },
{ 'NLP', '[[National Library of Poland|NLP]]', 1695, p.nlpLink },
-- { 'NLR', '[[National Library of Romania|NLR]]', 1003, p.nlrLink }, --initially commented due to excessive WD ID errors(conflated with National Library of Russia IDs)
{ 'NSK', '[[National and University Library in Zagreb|NSK]]', 1375, p.nskLink },
{ 'NTA', '[[Royal Library of the Netherlands|NTA]]', 1006, p.ntaLink },
{ 'PIC', '[[:d:Q23892012|PIC]]', 2750, p.picLink },
{ 'RID', '[[ResearcherID]]', 1053, p.ridLink },
-- { 'RERO', '[[RERO (Library Network of Western Switzerland)|RERO]]', 3065, p.reroLink }, --initially commented due to excessive WD ID errors(regex fixed/relaxed)
{ 'RKDartists', '[[Netherlands Institute for Art History#Online artist pages|RKD]]', 650, p.rkdartistsLink },
{ 'RKDID', '[[:d:Q17299580|RKDimages ID]]', 350, p.rkdidLink },
--Use QID= parameter for testing/example purposes only
local itemId = nil
if testcases or talkspace namespace ~= 0 then if local qid = parentArgs['qid'] or parentArgs['QID'] if qid then itemId = 'Q'..mw.ustring.gsub(parentArgs['QID']qid, '^[Qq]', '')
itemId = resolveEntity._id(itemId) --nil if unresolvable
end
local val = parentArgs[params[1]]
if val and val ~= '' then
table.insert( elements, p.createRow( params[1], params[2]..':', val, params[4]( val ), true , params.category ) )
rct = rct + 1
end
local Navbox = require('Module:Navbox')
local elementsCat = ''
if rct > 13 = 20 then
local catName = 'AC with '..rct..' elements'
elementsCat = '[[Category:'..catName..']]'..p.redCatLink(catName)

Navigation menu