function p.nlpLink( id )
--P1695's format regex: 9810[0-9]\d* or A[0-9]{7}[0-9X] (e.g. 9810123456789012345or A10414836) if not string.match( id, '^9810%d+$' ) and not string.match( id, '^A%d%d%d%d%d%d%d[%dX]$' ) then
return false
end
return '[httphttps://maktools.bnwmflabs.org.pl/cgiwikidata-bin/KHW/makwww.exeexternalid-url?BM=01&IM=04&NUp=011695&WIid='..id..' '..id..']'..p.getCatForId( 'NLP' )
end
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
{ 'AGSA', '[[Art Gallery of South Australia|AGSA]]', 6804, p.agsaLink },
{ 'autores.uy', '[[autores.uy]]', 2558, p.autoresuyLink },
{ 'AWR', '[[Australian Women\'s Register|AWR]]', 4186, p.awrLink }, ---[[Australian Women's Register]] DNE as of 8/2019
{ 'BALaT', '[[Royal Institute for Cultural Heritage#Online artworks pages|BALaT]]', 3293, p.balatLink },
{ '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)