Diferencia entre revisiones de «Módulo:Control de autoridades»

Contenido eliminado Contenido añadido
Paso 9: agrego categorizaciones individuales por cada elemento, incorporadas en la configuración
Paso 10: configuraciones locales: filtro para BNC; doble enlace para BNF; enlace especial para INE; reemplazo para NARA; anulación de SELIBR, KVAB, ANMF, ISCO, CABA y SIPCA porque no funcionan; redirección para PND; y enlaces para WorldCat
Línea 4:
link = mw.ustring.gsub( link, '$1', id )
return '[' .. link .. ' ' .. id .. ']'
end
 
local function bncLink ( id, link, parameter )
-- filtro local del BNC, para evadir multitud de identificadores de Wikidata que no se enlazan adecuadamente
-- véase https://www.wikidata.org/wiki/Wikidata:Database_reports/Constraint_violations/P1890#%22Format%22_violations
if ( string.match( id, '^%d%d%d%d%d%d%d%d%d$' ) ) then
return generic ( id, link, parameter )
end
return false
end
 
local function bnfLink ( id, link, parameter )
-- representación local del BNF, con doble enlace
return generic( id, link, parameter ) .. ' [http://data.bnf.fr/ark:/12148/cb' .. id .. ' (data)]'
end
 
local function ineLink ( id, link, parameter )
-- representación especial del INE, enlace no estándar con cinco parámetros utilizados
local ineMainRE, ineTailRE = '^(%d%d)(%d%d%d)', '(%d%d)(%d%d)(%d%d)'
local codProv, codMuni, codEC, codES, codNUC = string.match( id, ineMainRE .. ineTailRE .. '$' )
if not codEC or not codES or not codNUC then
codProv, codMuni = string.match( id, ineMainRE .. '$' )
if codProv and codMuni then
codEC, codES, codNUC = '00', '00', '00'
else
codProv, codMuni = string.match( id, ineMainRE )
codEC, codES, codNUC = '', '', ''
end
end
if codProv and codMuni then
link = 'http://www.ine.es/nomen2/inicio_a.do?accion=busquedaAvanzada&inicio=inicio_a&subaccion=&botonBusquedaAvanzada=Consultar+selecci%C3%B3n&numPag=0&ordenAnios=ASC&comunidad=00&entidad_amb=no&poblacion_amb=T&poblacion_op=%3D&poblacion_txt=&denominacion_op=like&denominacion_txt=&codProv=$1&codMuni=$2&codEC=$3&codES=$4&codNUC=$5'
link = link:gsub('$1', codProv):gsub('$2', codMuni):gsub('$3', codEC):gsub('$4', codES):gsub('$5', codNUC)
return generic( id, link, parameter )
end
return id
end
 
Línea 29 ⟶ 64:
{ 'BNA', '[[Biblioteca Nacional de la República Argentina|BNA]]', 3788, 'n', 1 },
{ 'BNE', '[[Biblioteca Nacional de España|BNE]]', 950, 'n', 1 },
{ 'BNF', '[[Bibliothèque nationale de France|BNF]]', 268, 'n'bnfLink, 1 },
{ 'BNM', '[[Biblioteca Nacional de México|BNM]]', 4440, 'n', 1 },
{ 'BNC', '[[Biblioteca Nacional de Chile|BNC]]', 1890, 'n'bncLink, 1 },
{ 'CANTIC', '[[Biblioteca de Cataluña|CANTIC]]', 1273, 'n', 1 },
{ 'GND', '[[Integrated Authority File|GND]]', 227, 'n', 1 },
Línea 42 ⟶ 77:
 
{ 'CINII', '[[CiNii]]', 271, 'n', 0 },
{ 'NARA-organization', '[[National Archives and Records Administration|NARA]]', 12231225, 'n', 0 },
{ 'LCCNLCOC', '[[Library of Congress Control Number|LCCN]]', 1144, 'n', 0 },
{ 'SNAC', '[[d:Q29861311|SNAC]]', 3430, 'n', 1 },
Línea 49 ⟶ 84:
{ 'ULAN', '[[Union List of Artist Names|ULAN]]', 245, 'n', 1 },
{ 'ORCID', '[[ORCID]]', 496, 'n', 1 },
-- { 'SELIBR', '[[LIBRIS|SELIBR]]', 906, 'n', 1 },
{ 'BIBSYS', '[[BIBSYS]]', 1015, 'n', 1 },
{ 'UB', '[[Universidad de Barcelona|UB]]', 1580, 'n', 1 },
Línea 58 ⟶ 93:
{ 'SBN', '[[Istituto Centrale per il Catalogo Unico|ICCU]]', 396, 'n', 1 },
 
{ 'NARA-person', '[[National Archives and Records Administration|NARA]]', 1222, 'n', 0 },
{ 'CensoGuia', '[[Censo-Guía de Archivos de España e Iberoamérica]]', 3998, 'n', 'Censo-Guía' },
{ 'Libraries.org', '[[Libraries.org]]', 4848, 'n', 1 },
Línea 68 ⟶ 102:
{ 'SAW', '[[Academia Sajona de Ciencias de Leipzig|SAW]]', 3411, 'n', 1 },
{ 'KNAW', '[[Real Academia de Artes y Ciencias de los Países Bajos|KNAW]]', 2454, 'n', 1 },
-- { 'KVAB', '[[Real Academia Flamenca de Ciencias y Artes de Bélgica|KVAB]]', 3887, 'n', 1 },
{ 'Leopoldina', '[[Deutsche Akademie der Naturforscher Leopoldina|Leopoldina]]', 3413, 'n', 1 },
{ 'CONICET', '[[CONICET]]', 3900, 'n', 1 },
{ 'Grierson', '[[Directorio de científicos argentinos Dra. Grierson|Grierson]]', 3946, 'n', 1 },
{ 'RANM', '[[Real Academia Nacional de Medicina|RANM]]', 3945, 'n', 1 },
-- { 'ANMF', '[[Académie Nationale de Médecine|ANMF]]', 3956, 'n', 1 },
 
{ 'Léonore', '[[Base Léonore|Léonore]]', 640, 'n', 0 },
Línea 89 ⟶ 123:
{ 'TLS', '[[Theaterlexikon der Schweiz|TLS]]', 1362, 'n', 0 },
 
-- { 'ISCO', '[[d:Q1233766|ISCO]]', 952, 'n', 1 },
{ 'AAT', '[[Art & Architecture Thesaurus|AAT]]', 1014, 'n', 1 },
{ 'BDCYL', '[[Biblioteca Digital de Castilla y León|BDCYL]]', 3964, 'n', 1 },
Línea 129 ⟶ 163:
{ 'Galicianaobra', '[[Galiciana]]', 3004, 'n', 'Galiciana obra' },
 
{ 'INE', '[[Instituto Nacional de Estadística (España)|INE]]', 772, 'n'ineLink, 1 },
{ 'TGN', '[[Getty Thesaurus of Geographic Names|TGN]]', 1667, 'n', 1 },
{ 'SNCZI-IPE-EMBALSE', '[[Sistema Nacional de Cartografía de Zonas Inundables|SNCZI]]-[[Inventario de Presas y Embalses de España|IPE]]', 4568, 'n', 'SNCZI-IPE embalse' },
Línea 138 ⟶ 172:
{ 'HCDN', '[[Cámara de Diputados de la Nación Argentina|Estadísticas HCDN]]', 4693, 'n', 1 },
{ 'HCDNbio', '[[Cámara de Diputados de la Nación Argentina|Biografía HCDN]]', 5225, 'n', 1 },
-- { 'Legislatura CABA', '[[Legislatura de la Ciudad de Buenos Aires|Legislatura CABA]]', 4667, 'n', 1 },
{ 'Asamblea de Madrid', '[[Asamblea de Madrid]]', 4797, 'n', 1 },
 
Línea 163 ⟶ 197:
{ 'IGPCV', '[[Inventario General del Patrimonio Cultural Valenciano|IGPCV]]', 2473, 'n', 1 },
{ 'BDI-IAPH', '[[Instituto Andaluz del Patrimonio Histórico|IAPH]]', 3318, 'n', 1 },
-- { 'SIPCA', '[[SIPCA]]', 3580, 'n', 1 },
{ 'PWJCYL', '[[Junta de Castilla y León|Patrimonio Web JCyL]]', 3177, 'n', 'Patrimonio Web JCyL' },
{ 'DocomomoIberico', '[[Fundación Docomomo Ibérico|Docomomo Ibérico]]', 3758, 'n', 'Docomomo Ibérico' },
Línea 176 ⟶ 210:
conf.aliases = {
{ 'Wd', 'Wikidata' },
{ 'PND', 'GND' },
}
 
Línea 398 ⟶ 433:
if wikidataIds[1] then
parentArgs[id..f] = wikidataIds[1]
end
end
 
--Worldcat
if id == 'issn' and parentArgs[id..f] and parentArgs[id..f] ~= '' then -- 'issn' is the first element following the 'wikidata' item
table.insert( elements, createRow( id, '', parentArgs[id..f], '[//www.worldcat.org/identities/' .. parentArgs['worldcatid'..f] .. ' WorldCat]', false ) ) --Validation?
elseif id == 'viaf' and parentArgs[id..f] and string.match( parentArgs[id..f], '^%d+$' ) and not parentArgs['worldcatid'..f] then -- Hackishly copy the validation code; this should go away when we move to using P1793 and P1630
table.insert( elements, createRow( id, '', parentArgs[id..f], '[//www.worldcat.org/identities/containsVIAFID/' .. parentArgs[id..f] .. ' WorldCat]', false ) )
elseif id == 'lccn' and parentArgs[id..f] and parentArgs[id..f] ~= '' and not parentArgs['viaf'..f] and not parentArgs['worldcatid'..f] then
local lccnParts = splitLccn( parentArgs[id..f] )
if lccnParts and lccnParts[1] ~= 'sh' then
table.insert( elements, createRow( id, '', parentArgs[id..f], '[//www.worldcat.org/identities/lccn-' .. lccnParts[1] .. lccnParts[2] .. '-' .. lccnParts[3] .. ' WorldCat]', false ) )
end
end