Documentación del módulo [ ver ] [ editar ] [ historial ] [ purgar ]
Este módulo contiene el código de la plantilla {{ Control de autoridad }}. Consulte su documentación.
Parámetros, propiedades de Wikidata y categorías de seguimiento
Parámetro | Etiqueta | Propiedad de Wikidata | Seguimiento de categorías y recuentos de páginas | |||
---|---|---|---|---|---|---|
Artículos | Paginas de usuario | Misc. paginas | IDs defectuosos | |||
AAG | AAG | P3372 : ID de artista de la Auckland Art Gallery | 1,772 | 0 | 1 | 0 |
ACM-DL | ACM DL | P864 : ID de autor de la biblioteca digital de ACM | 1,578 | 2 | 3 | 0 |
ADB | ADB | P1907 : ID de diccionario australiano de biografía | 6.558 | 0 | 1 | 9 |
AGSA | AGSA | P6804 : ID de creador de la galería de arte de Australia Meridional | 2.004 | 0 | 1 | 0 |
autores.uy | autores.uy | P2558 : ID de autores.uy | 763 | 0 | 1 | 0 |
AWR | AWR | P4186 : ID de registro de mujeres australianas | 1,505 | 0 | 1 | 0 |
BALaT | BALaT | P3293 : ID de objeto BALaT | 49 | 0 | 1 | 0 |
BIBSYS | BIBSYS | P1015 : ID DE BIBSYS | 73,411 | 0 | 15 | 0 |
Bildindex | Bildindex | P2092 : Bildindex der Kunst und Architektur ID | 66 | 0 | 1 | 0 |
BNC | BNC | P1890 : ID CCAB | 1.066 | 0 | 3 | 0 |
BNE | BNE | P950 : ID de la Biblioteca Nacional de España | 88,888 | 1 | 12 | 3 |
BNF | BNF | P268 : Bibliothèque nationale de France ID | 291,839 | 3 | 64 | 6 |
Botánico | Botánico | P428 : abreviatura del autor botánico | 5.618 | 0 | 1 | 0 |
BPN | BPN | P651 : Identificación de Biografisch Portaal van Nederland | 7.135 | 0 | 1 | 0 |
CÁNTICO | CÁNTICO | P1273 : ID CÁNTICO | 29,429 | 0 | 4 | 0 |
CINII | CiNii | P271 : ID de autor de CiNii (libros) | 28.138 | 0 | 12 | 0 |
CWGC | CWGC | P1908 : ID de persona CWGC | 1.981 | 0 | 1 | 0 |
DAAO | DAAO | P1707 : ID de DAAO | 949 | 0 | 1 | 9 |
DBLP | DBLP | P2456 : ID de autor de DBLP | 6.460 | 4 | 4 | 3 |
DIB | DIB | P6829 : ID de diccionario de biografía irlandesa | 5.128 | 0 | 1 | 0 |
DSI | DSI | P2349 : ID de la base de datos de ilustradores científicos de Stuttgart | 3.406 | 0 | 1 | 0 |
RÁPIDO | RÁPIDO | P2163 : ID RÁPIDA | 3.743 | 0 | 3 | 0 |
FNZA | FNZA | P6792 : Buscar ID de artistas de Nueva Zelanda | 980 | 0 | 1 | 1 |
GND | GND | P227 : GND ID | 396,664 | 27 | 399 | 9 |
HDS | HDS | P902 : ID de HDS | 8.547 | 0 | 4 | 0 |
IAAF | IAAF | P1146 : ID de atleta de World Athletics | 18,949 | 0 | 1 | 0 |
UCIC | UCIC | P396 : ID de autor de SBN | 15,761 | 0 | 6 | 0 |
ICIA | ICIA | P1736 : Centro de información para la identificación del artista de arte israelí | 456 | 0 | 1 | 0 |
IEU | IEU | P9070 : Enciclopedia de Internet de la identificación de Ucrania | 599 | 0 | 1 | 2 |
ISNI | ISNI | P213 : ISNI | 511,456 | 25 | 156 | 9 |
Joconde | Joconde | P347 : ID de trabajo de Joconde | 250 | 0 | 1 | 0 |
KULTURNAV | KulturNav | P1248 : KulturNav-ID | 4.623 | 0 | 1 | 2 |
LCCN | LCCN | P244 : ID de autoridad de la Biblioteca del Congreso | 669,406 | 27 | 534 | 5 |
LIR | LIR | P886 : ID reticista léxico isórico | 114 | 0 | 1 | 0 |
LNB | LNB | P1368 : ID de LNB | 19.683 | 0 | 3 | 0 |
Léonore | Léonore | P640 : Léonore ID | 5.653 | 0 | 7 | 1 |
MAMÁ | MAMÁ | P6366 : ID académico de Microsoft | 43,591 | 1 | 1 | 15 |
MBA | MBA | P434 : ID de artista de MusicBrainz | 133,648 | 1 | 55 | 0 |
MBAREA | MBAREA | P982 : ID de área de MusicBrainz | 29,054 | 0 | 1 | 0 |
MBI | MBI | P1330 : ID del instrumento MusicBrainz | 296 | 0 | 1 | 0 |
MBL | MBL | P966 : ID de etiqueta de MusicBrainz | 3.826 | 0 | 2 | 2 |
MBP | MBP | P1004 : ID de lugar de MusicBrainz | 5.392 | 0 | 1 | 0 |
MBRG | MBRG | P436 : ID de grupo de lanzamiento de MusicBrainz | 111,604 | 0 | 1 | 0 |
MBS | MBS | P1407 : ID de la serie MusicBrainz | 216 | 0 | 1 | 0 |
MBW | Trabajo MBW | P435 : ID de trabajo de MusicBrainz | 25,731 | 0 | 1 | 0 |
Pop | Pop | P549 : ID del proyecto de genealogía matemática | 13,869 | 1 | 2 | 0 |
NARA | NARA | P1225 : Identificador de archivos nacionales de EE . UU. | 19,643 | 0 | 1 | 0 |
NCL | NBL | P1048 : NCL ID | 539 | 0 | 1 | 1 |
NDL | NDL | P349 : ID de la Biblioteca Nacional de Dietas | 56,748 | 0 | 27 | 0 |
GNV | GNV | P2041 : ID de artista de la Galería Nacional de Victoria | 2.845 | 0 | 1 | 0 |
NKC | NKC | P691 : ID AUT NKCR | 166,948 | 0 | 17 | 0 |
NLA | NLA | P409 : ID de Bibliotecas de Australia | 39,386 | 1 | 13 | 0 |
NLG | NLG | P3348 : Identificación de la Biblioteca Nacional de Grecia | 19,522 | 0 | 3 | 0 |
NLI | NLI | P949 : Identificación de la Biblioteca Nacional de Israel | 49,161 | 0 | 13 | 0 |
NLK | NLK | P5034 : Identificación de la Biblioteca Nacional de Corea | 32,259 | 0 | 6 | 0 |
PNL | PNL | P1695 : ID de NLP (único) | 35,453 | 0 | 5 | 0 |
NLR | NLR | P1003 : Identificación de la Biblioteca Nacional de Rumania | 155 | 0 | 1 | 3 |
NSK | NSK | P1375 : NSK ID | 9,653 | 0 | 3 | 0 |
NTA | NTA | P1006 : Tesauro nacional para ID de autor | 222,707 | 0 | 31 | 0 |
ORCID | ORCID | P496 : ID de ORCID | 11,350 | 420 | 75 | 1 |
FOTO | FOTO | P2750 : ID del catálogo de identidades de los fotógrafos | 10.044 | 0 | 2 | 0 |
PLWABN | PLWABN | P7293 : PLWABN ID | 121,466 | 0 | 6 | 1 |
Publons | Publons | P3829 : ID de autor de Publons | 1.801 | 0 | 6 | 1 |
RERO | RERO | P3065 : ID RERO | 20,298 | 0 | 8 | 6 |
DESHACERSE | InvestigadorID | P1053 : ID del investigador | 2.614 | 23 | 17 | 5 |
RISMO | RISMO | P5504 : ID RISM | 229 | 0 | 0 | 0 |
RKDartists | RKD | P650 : ID de RKDartists | 34,517 | 0 | 6 | 1 |
RKDID | ID de RKDimages | P350 : ID de RKDimages | 695 | 0 | 1 | 0 |
RSL | RSL | P947 : RSL ID (persona) | 840 | 0 | 7 | 0 |
SELIBR | SELIBR | P906 : ID SELIBR | 38,679 | 0 | 27 | 9 |
SIKART | SIKART | P781 : ID SIKART | 1.129 | 0 | 1 | 0 |
ID de SNAC | SNAC | P3430 : ID DE ARCA DE SNAC | 130.039 | 0 | 3 | 0 |
SUDOC | SUDOC | P269 : IdRef ID | 238,810 | 7 | 60 | 0 |
S2AuthorId | S2AuthorId | P4012 : ID de autor de Semantic Scholar | 1.435 | 3 | 4 | 0 |
TA98 | TA98 | P1323 : Terminologia Anatomica 98 ID | 2,874 | 0 | 1 | 0 |
TDVİA | TDVİA | P7314 : TDV İslam Ansiklopedisi ID | 1,759 | 0 | 2 | 0 |
TE | TE | P1693 : Terminología embriológica | 160 | 0 | 1 | 0 |
TePapa | TePapa | P3544 : ID de agente de Te Papa | 3.314 | 0 | 1 | 0 |
TH | TH | P1694 : Terminología Histológica | 301 | 0 | 1 | 0 |
TLS | TLS | P1362 : ID de Theaterlexikon der Schweiz | 575 | 0 | 1 | 3 |
Trove | Trove | P1315 : ID de tesoro de la NLA | 62,932 | 2 | 6 | 6 |
UKPARL | UKPARL | P6213 : Identificador del Parlamento del Reino Unido | 1.061 | 0 | 1 | 2 |
ULAN | ULAN | P245 : Lista de unión de ID de nombres de artistas | 45,974 | 0 | 11 | 0 |
Congreso de Estados Unidos | Congreso de Estados Unidos | P1157 : Bioidentificación del Congreso de EE . UU. | 12.806 | 0 | 1 | 1 |
VcBA | VcBA | P8034 : ID de VcBA de la Biblioteca del Vaticano | 40.579 | 0 | 1 | 5 |
VIAF | VIAF | P214 : ID de VIAF | 901,937 | 98 | 1,142 | 2 |
WORLDCATID | Identidades de WorldCat | P7859 : ID de identidad de WorldCat | 757,639 | 0 | dieciséis | 0 |
- | WorldCat-LCCN | - | 4.204 | - | - | - |
- | WorldCat-VIAF | - | 144,970 | - | - | - |
Categorías de seguimiento adicionales
Este módulo también implementa las siguientes categorías de seguimiento ocultas:
- Categoría: páginas con categorías de control de autoridad vinculadas en rojo (0): categoría de error para identificar las categorías que faltan
- Categoría: artículos de Wikipedia con identificadores de control de autoridad obsoletos (0) - corregir / migrar / eliminar ID obsoletos
- Categoría: artículos de Wikipedia con identificadores de control de autoridad suprimidos (10,360) - solo seguimiento (sin error)
- Categoría: artículos de Wikipedia con múltiples identificadores (46,927) - solo seguimiento (sin error)
- Categoría: Páginas que usan control de autoridad con parámetros (1333): migre los ID a Wikidata, si es posible (sin error)
- Categoría: Páginas que usan control de autoridad con parámetros diferentes en Wikidata (393) - determine / elimine ID incorrectos y migre a Wikidata
- Categoría: páginas que usan control de autoridad con parámetros que coinciden con todos los de Wikidata (2): los parámetros de la plantilla se pueden eliminar de manera segura
- Categoría: VIAF no en Wikidata (579) - migrar ID a Wikidata, si es posible (sin error)
- Categoría: VIAF diferente en Wikidata (86) - resolver, si es posible
Numero de identificadores
- Categoría: AC con 0 elementos (657,205)
- Categoría: AC con 25 elementos (567)
- Categoría: AC con 26 elementos (402)
- Categoría: AC con 27 elementos (352)
- Categoría: AC con 28 elementos (232)
- Categoría: AC con 29 elementos (193)
- Categoría: AC con 30 elementos (125)
- Categoría: AA con 31 elementos (95)
- Categoría: AC con 32 elementos (59)
- Categoría: AC con 33 elementos (42)
- Categoría: AC con 34 elementos (24)
- Categoría: AC con 35 elementos (13)
- Categoría: AC con 36 elementos (4)
- Categoría: AC con 37 elementos (7)
- Categoría: AC con 38 elementos (2)
- Categoría: AC con 39 elementos (1)
- Categoría: AC con 40 elementos (0)
- Categoría: AC con 41 elementos (0)
- Categoría: AC con 42 elementos (0)
- Categoría: AC con 43 elementos (0)
- Categoría: AC con 44 elementos (0)
- Categoría: AC con 45 elementos (0)
Ver también
- m: mapa de Interwiki - definición de prefijos de interwiki personalizados globales
require ( 'Módulo: No globales' )local p = {} título local = mw . título . getCurrentTitle () espacio de nombres local = título . espacio de nombres casos de prueba locales = ( string.sub ( título . subpageText , 1 , 9 ) == 'casos de prueba' )- [[============================================ ============================]]- [[Funciones de categoría]]- [[============================================ ============================]]función p . getCatForId ( id ) catName local = ''si espacio de nombres == 0 entoncescatName = 'Artículos de Wikipedia con' .. id .. 'identificadores'elseif espacio de nombres == 2 y no título . isSubpage entoncescatName = 'Páginas de usuario con' .. id .. 'identificadores'demáscatName = 'Páginas varias con' .. id .. 'identificadores'finalreturn '[[Categoría:' .. catName .. ']]' .. p . redCatLink ( catName )finalfunción p . redCatLink ( catName ) --catName == 'Blah' (no 'Categoría: Blah', no '[[Categoría: Blah]]')si catName y catName ~ = '' y casos de prueba == falso y mw . título . nuevo ( catName , 14 ). existe == falsoluegoreturn '[[Categoría: Páginas con categorías de control de autoridad vinculadas en rojo]]'finalvolver ''finalfunción p . createRow ( id , etiqueta , rawValues , enlace , enlaces , withUid , specialCat ) catName local = 'Artículos de Wikipedia con fallas' .. ( specialCat o id ) .. 'identificadores'si los enlaces entonces - todos los enlaces [] usan withUid = false; no se necesita cheque fila local = '* ' .. etiqueta totlen local = 0porque yo , l en ipairs ( enlaces ) hagosi i == 1 entonces fila = fila ... ''else fila = fila .. ',' finalsi yo entoncesfila = fila .. '' .. l .. ''demásrow = row .. ' El' .. id .. 'id' .. rawValues [ i ] .. 'no es válido. [[Category:' .. catName . . ']]' .. pág . redCatLink ( catName )finaltotlen = totlen + # rawValues [ i ] + 3 - 3 caracteres enlaces b / nfinalsi totlen > 79 entoncesfila = cadena.gsub ( fila , '"nowrap"' , '""' ) - evitar [[Serie A – Z]]finalvolver fila .. ' \ n 'elseif enlace entoncessi con Uid entoncesreturn '* ' .. etiqueta .. '' .. enlace .. ' \ n 'finalreturn '* ' .. etiqueta .. '' .. enlace .. ' \ n 'finalreturn '* El' .. id .. 'id' .. rawValues .. 'no es válido. [[Category:' .. catName .. ']]' . . p . redCatLink ( catName ) .. ' \ n 'final- [[============================================ ============================]]- [[Funciones de formato de propiedad]]- [[============================================ ============================]]- Si un enlace tiene una entrada adecuada en la tabla global de prefijos interwiki en [[: m: Interwiki_map]], considere la posibilidad de enrutar a través de este prefijo en lugar de como URL de enlace externo. Esto facilitará el mantenimiento futuro, ya que las actualizaciones necesarias del enlace se pueden realizar de forma centralizada allí en lugar de actualizar este módulo. El icono de "enlace externo" desaparecería para tales entradas.función p . aagLink ( id )--Regex de formato de P3372: \ d + (por ejemplo, 1)si no es id : match ( '^% d + $' ) entoncesdevolver falsofinalreturn '[https://www.aucklandartgallery.com/explore-art-and-ideas/artist/' .. id .. '/' .. id .. ']' .. p . getCatForId ( 'AAG' )finalfunción p . acmLink ( id )--Regex de formato de P864: \ d {11} (por ejemplo, 12345678901)si no es id : match ( '^% d% d% d% d% d% d% d% d% d% d% d $' ) entoncesdevolver falsofinalreturn '[https://dl.acm.org/profile/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'ACM-DL' )finalfunción p . adbLink ( id )--Regex de formato de P1907: [az] [- az] + - ([1-2] \ d | [1-9]) \ d {0,3} (por ejemplo, barton-sir-edmund-toby-71)si no es id : match ( '^ [az] [- az] + - [1-2]% d% d?% d?% d? $' ) y no id : match ( '^ [az] [- az] + - [1-9]% d?% d?% d? $' ) entoncesdevolver falsofinalreturn '[http://adb.anu.edu.au/biography/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'ADB' )finalfunción p . agsaLink ( id )--Regex de formato de P6804: [1-9] \ d * (por ejemplo, 3625)si no es id : match ( '^ [1-9]% d * $' ) entoncesdevolver falsofinalreturn '[https://www.agsa.sa.gov.au/collection-publications/collection/creators/_/' .. id .. '/' .. id .. ']' .. p . getCatForId ( 'AGSA' )finalfunción p . autoresuyLink ( id )--Regex de formato de P2558: [1-9] \ d {0,4} (por ejemplo, 12345)si no es id : match ( '^ [1-9]% d?% d?% d?% d? $' ) entoncesdevolver falsofinalreturn '[https://autores.uy/autor/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'autores.uy' )finalfunción p . awrLink ( id )--Regex de formato de P4186: (([AZ] {3} \ d {4}) | ([AZ] {2} \ d {5})) [az] (por ejemplo, PR00768b)si no es id : match ( '^ [AZ] [AZ] [AZ]% d% d% d% d [az] $' ) y no id : match ( '^ [AZ] [AZ]% d% d% d% d% d [az] $' ) luegodevolver falsofinalreturn '[http://www.womenaustralia.info/biogs/' .. id .. '.htm' .. id .. ']' .. p . getCatForId ( 'AWR' )finalfunción p . balatLink ( id )--Regex de formato de P3293: \ d + (por ejemplo, 1)si no es id : match ( '^% d + $' ) entoncesdevolver falsofinalreturn '[http://balat.kikirpa.be/object/104257' .. id .. '' .. id .. ']' .. p . getCatForId ( 'BALaT' ) - no https a fecha de 9/2019finalfunción p . bibsysLink ( id )--Regex de formato de P1015: [1-9] \ d * o [1-9] (\ d {0,8} | \ d {12}) (por ejemplo, 1234567890123)--TODO: seguimiento @ [[d: Charla de propiedad: P1015 # Discrepancia entre las 2 restricciones de expresiones regulares]] o escalar / investigarsi no es id : match ( '^ [1-9]% d?% d?% d?% d?% d?% d?% d?% d? $' ) y no id : match ( '^ [1-9]% d% d% d% d% d% d% d% d% d% d% d% d $' ) entoncesdevolver falsofinalreturn '[https://authority.bibsys.no/authority/rest/authorities/html/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'BIBSYS' )finalfunción p . bildLink ( id )--Regex de formato de P2092: \ d + (por ejemplo, 1)si no es id : match ( '^% d + $' ) entoncesdevolver falsofinalreturn '[https://www.bildindex.de/document/obj' .. id .. '' .. id .. ']' .. p . getCatForId ( 'Bildindex' )finalfunción p . bncLink ( id )--Regex de formato de P1890: \ d {9} (por ejemplo, 123456789)si no es id : match ( '^% d% d% d% d% d% d% d% d% d $' ) entoncesdevolver falsofinalreturn '[http://www.bncatalogo.cl/F?func=direct&local_base=red10&doc_number=' .. id .. '' .. id .. ']' .. p . getCatForId ( 'BNC' )finalfunción p . bneLink ( id )--Regex de formato de P950: (XX | FF | a) \ d {4,7} | (bima | bimo | bica | bis [eo] | bivi | Mise | Mimo | Mima) \ d {10} (por ejemplo, XX1234567)si no es id : match ( '^ [XF] [XF]% d% d% d% d% d?% d?% d? $' ) y no id : match ( '^ a% d% d% d% d% d?% d?% d? $' ) y no id : match ( '^ bi [mcsv] [aoei]% d% d% d% d% d% d% d% d% d% d $' ) y no id : match ( '^ Mi [sm] [eoa]% d% d% d% d% d% d% d% d% d% d $' ) entoncesdevolver falsofinalreturn '[http://catalogo.bne.es/uhtbin/authoritybrowse.cgi?action=display&authority_id=' .. id .. '' .. id .. ']' .. p . getCatForId ( 'BNE' ): sin https a fecha de 9/2019finalfunción p . bnfLink ( id )--Regex de formato de P268: \ d {8} [0-9bcdfghjkmnpqrstvwxz] (por ejemplo, 123456789)si no es id : match ( '^ c? b?% d% d% d% d% d% d% d% d [0-9bcdfghjkmnpqrstvwxz] $' ) entoncesdevolver falsofinal--Añadir el prefijo cb si se ha eliminadosi no es id : match ( '^ cb. + $' ) entoncesid = 'cb' .. idfinalreturn '[https://catalogue.bnf.fr/ark:/12148/' .. id .. '' .. id .. '] [https://data.bnf.fr/ark:/12148/' .. id .. '(datos)]' .. p . getCatForId ( 'BNF' )finalfunción p . botanistLink ( id )--Regex de formato de P428: ('t)? (D')? (De)? (La)? (Van (der)?)? (Ma? C)? (De)? (Di)? \ P {Lu }? C? ['\ P {Ll}] * ([-'.] * (Furgoneta)? (Y)? (D [ae] [nr]? [-])? (Ma? C)? [\ p {Lu} bht]? C? ['\ p {Ll}] *) * \.? ?¿F?\.? (por ejemplo, L.)- no se puede implementar fácilmente / significativamente en la expresión regular de Lua desde "(esto)?" No se permite...si no mw . ustring . match ( id , "^ [% u% l% d%. '-] + $" ) entonces --mejor que nadadevolver falsofinal id2 local = id : gsub ( '+' , '%% 20' )return '[https://www.ipni.org/ipni/advAuthorSearch.do?find_abbreviation=' .. id2 .. '' .. id .. ']' .. p . getCatForId ( 'Botánico' )finalfunción p . bpnLink ( id )--Regex del formato de P651: \ d {6,8} (por ejemplo, 00123456)si no es id : match ( '^% d% d% d% d% d% d% d% d $' ) y --original format regex, cambiado 8/2019 a not id : match ( '^ 0?% d% d% d% d% d% d% d $' ) y --permitir 1-2 ceros iniciales, permitido por el sitio web no id : match ( '^ 0? 0?% d% d% d% d% d% d $' ) entoncesdevolver falsofinalreturn '[http://www.biografischportaal.nl/en/persoon/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'BPN' ): sin https a fecha de 9/2019finalfunción p . canticLink ( id )--Regex de formato de P1273: a \ d {7} [0-9x] (p. Ej., A10640745)si no es id : match ( '^ a% d% d% d% d% d% d% d [% dx] $' ) entoncesdevolver falsofinalreturn '[http://cantic.bnc.cat/registres/CUCId/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'CANTIC' ): sin https a fecha de 10/2019finalfunción p . ciniiLink ( id )--Regex de formato de P271: DA \ d {7} [\ dX] (por ejemplo, DA12345678)si no es id : match ( '^ DA% d% d% d% d% d% d% d [% dX] $' ) entoncesdevolver falsofinalreturn '[https://ci.nii.ac.jp/author/' .. id .. '? l = en' .. id .. ']' .. p . getCatForId ( 'CINII' )finalfunción p . cwgcLink ( id )--Regex de formato de P1908: [1-9] \ d * (por ejemplo, 75228351)si no es id : match ( '^ [1-9]% d * $' ) entoncesdevolver falsofinalreturn '[https://www.cwgc.org/find-war-dead/casualty/' .. id .. '/' .. id .. ']' .. p . getCatForId ( 'CWGC' )finalfunción p . daaoLink ( id )--Regex de formato de P1707: [az \ -] + \ d * (por ejemplo, rolf-harris)si no es id : match ( '^ [az% -] +% d * $' ) entoncesdevolver falsofinalreturn '[https://www.daao.org.au/bio/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'DAAO' )finalfunción p . dblpLink ( id )--Regex de formato de P2456: \ d {2,3} / \ d + (- \ d +)? | [Az] / [a-zA-Z] [0-9A-Za-z] * (- \ d +)? (por ejemplo, 123/123)si no es id : match ( '^% d% d% d? /% d + $' ) y no id : match ( '^% d% d% d? /% d +% -% d + $' ) y no id : match ( '^ [az] / [a-zA-Z] [0-9A-Za-z] * $' ) y no id : match ( '^ [az] / [a-zA-Z] [0-9A-Za-z] *% -% d + $' ) entoncesdevolver falsofinalreturn '[https://dblp.org/pid/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'DBLP' )finalfunción p . dibLink ( id )--Regex del formato de P6829: a \ d {4} \ d? (- [AD])? (por ejemplo, a1953)si no es id : match ( '^ a% d% d% d% d% d?% -? [AD]? $' ) entoncesdevolver falsofinalreturn '[https://dib.cambridge.org/viewReadPage.do?articleId=' .. id .. '' .. id .. ']' .. p . getCatForId ( 'DIB' )finalfunción p . dsiLink ( id )--Regex de formato de P2349: [1-9] \ d * (por ejemplo, 1538)si no es id : match ( '^ [1-9]% d * $' ) entoncesdevolver falsofinalreturn '[http://www.uni-stuttgart.de/hi/gnt/dsi2/index.php?table_name=dsi&function=details&where_field=id&where_value=' .. id .. '' .. id .. ']' . . p . getCatForId ( 'DSI' )finalfunción p . fastLink ( id )--Regex del formato de P2163: [1-9] \ d {0,7} (por ejemplo, 1916996)si no es id : match ( '^ [1-9]% d?% d?% d?% d?% d?% d?% d? $' ) entoncesdevolver falsofinalreturn '[http://id.worldcat.org/fast/' .. id .. '/' .. id .. ']' .. p . getCatForId ( 'RÁPIDO' )finalfunción p . fnzaLink ( id )--Regex de formato de P6792: [1-9] \ d * (por ejemplo, 9785)si no es id : match ( '^ [1-9]% d * $' ) entoncesdevolver falsofinalreturn '[https://findnzartists.org.nz/artist/' .. id .. '/' .. id .. ']' .. p . getCatForId ( 'FNZA' )finalfunción p . gndLink ( id )--Regex de formato de P227: 1 [012]? \ D {7} [0-9X] | [47] \ d {6} - \ d | [1-9] \ d {0,7} - [0- 9X] | 3 \ d {7} [0-9X] (p. Ej., 4079154-3)si no es id : match ( '^ 1 [012]?% d% d% d% d% d% d% d [0-9X] $' ) y no id : match ( '^ [47]% d% d% d% d% d% d% -% d $' ) y no id : match ( '^ [1-9]% d?% d?% d?% d?% d?% d?% d?% - [0-9X] $' ) y no id : match ( '^ 3% d% d% d% d% d% d% d [0-9X] $' ) entoncesdevolver falsofinalreturn '[https://d-nb.info/gnd/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'GND' )finalfunción p . hdsLink ( id )--Regex de formato de P902: \ d {6} (por ejemplo, 050123)si no es id : match ( '^% d% d% d% d% d% d $' ) entoncesdevolver falsofinalreturn '[https://hls-dhs-dss.ch/fr/articles/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'HDS' )finalfunción p . iaafLink ( id )--Regex de formato de P1146: [0-9] [0-9] * (por ejemplo, 012)si no es id : match ( '^% d + $' ) entoncesdevolver falsofinalreturn '[https://www.iaaf.org/athletes/_/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'IAAF' )finalfunción p . iciaLink ( id )--Regex de formato de P1736: \ d + (por ejemplo, 1)si no es id : match ( '^% d + $' ) entoncesdevolver falsofinalreturn '[https://www.imj.org.il/artcenter/newsite/en/?artist=' .. id .. '' .. id .. ']' .. p . getCatForId ( 'ICIA' )finalfunción p . ieuLink ( id )--Regex de formato de P9070: [AZ] \\ [AZ] \\ [A-Za-z0-9] + (por ejemplo, K \ Y \ Kyiv)si no es id : match ( '^ [AZ] \\ [AZ] \\ % w + $' ) entoncesdevolver falsofinalreturn '[http://www.encyclopediaofukraine.com/display.asp?linkpath=pages \\ ' .. id .. '' .. id .. ']' .. p . getCatForId ( 'IEU' )finalfunción p . isniLink ( id )id = p . validateIsni ( id ) --eg 0000-0000-6653-4145si no id entoncesdevolver falsofinalreturn '[https://isni.org/isni/' .. id .. '' .. id : sub ( 1 , 4 ) .. '' .. id : sub ( 5 , 8 ) .. '' . . id : sub ( 9 , 12 ) .. '' .. id : sub ( 13 , 16 ) .. ']' .. p . getCatForId ( 'ISNI' ): no https a fecha de 9/2019finalfunción p . jocondeLink ( id )--Regex de formato de P347: [\ -0-9A-Za-z] {11} (por ejemplo, 12345678901) expresión regular local = '^' .. string.rep ( '[% -0-9A-Za-z]' , 11 ) .. '$'si no es id : match ( regex ) entoncesdevolver falsofinalreturn '[https://www.pop.culture.gouv.fr/notice/joconde/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'Joconde' )finalfunción p . kulturnavLink ( id )--Regex de formato de P1248: [0-9a-f] {8} \ - [0-9a-f] {4} \ - [0-9a-f] {4} \ - [0-9a-f] { 4} \ - [0-9a-f] {12} (p. Ej., 12345678-1234-1234-1234-1234567890AB)si no es id : match ( '^% x% x% x% x% x% x% x% x% -% x% x% x% x% -% x% x% x% x% -% x% x % x% x% -% x% x% x% x% x% x% x% x% x% x% x% x $ ' ) entoncesdevolver falsofinalreturn '[http://kulturnav.org/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'KULTURNAV' ) - no https a fecha de 9/2019finalfunción p . lccnLink ( id ) partes locales = p . splitLccn ( id ) --eg n78039510si no partes entoncesdevolver falsofinal lccnType local = partes [ 1 ] ~ = 'sh' y 'nombres' o 'sujetos'id = partes [ 1 ] .. partes [ 2 ] .. p . añadir ( partes [ 3 ], '0' , 6 )return '[https://id.loc.gov/authorities/' .. lccnType .. '/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'LCCN' )finalfunción p . lirLink ( id )--Regex de formato de P886: \ d + (por ejemplo, 1)si no es id : match ( '^% d + $' ) entoncesdevolver falsofinalreturn '[http://www.e-lir.ch/e-LIR___Lexicon.' .. id .. '.450.0.html' .. id .. ']' .. p . getCatForId ( 'LIR' ): sin https a fecha de 9/2019finalfunción p . lnbLink ( id )--Regex de formato de P1368: \ d {9} (por ejemplo, 123456789)si no es id : match ( '^% d% d% d% d% d% d% d% d% d $' ) entoncesdevolver falsofinalreturn '[https://kopkatalogs.lv/F?func=direct&local_base=lnc10&doc_number=' .. id .. '& P_CON_LNG = ENG' .. id .. ']' .. p . getCatForId ( 'LNB' )finalfunción p . leonoreLink ( id )--Regex de formato de P640: LH / \ d {1,4} / \ d {1,3} | 19800035 / \ d {1,4} / \ d {1,5} (Bis)? | C / 0 / \ d {1,2} (p. ej., LH / 2064/18)si no es id : match ( '^ LH /% d% d?% d?% d? /% d% d?% d? $' ) y --IDs de LH / 1/1 a LH / 2794/54 ( legionarios) no id : match ( '^ 19800035 /% d% d?% d?% d? /% d% d?% d?% d?% d? $' ) y --ID de 19800035/1/1 a 19800035 / 385/51670 (legionarios que murieron 1954-1977 y algunos que murieron <1954) no id : match ( '^ C / 0 /% d% d? $' ) luego --IDs de C / 0/1 a C / 0/84 (84 legionarios famosos)devolver falsofinalreturn '[http://www.culture.gouv.fr/public/mistral/leonore_fr?ACTION=CHERCHER&FIELD_1=COTE&VALUE_1=' .. id .. '' .. id .. ']' .. p . getCatForId ( 'Léonore' ) - sin https a fecha de 9/2019finalfunción p . maLink ( id )--Regex de formato de P6366: [1-9] \ d {4,9} (por ejemplo, 1498221862)si no es id : match ( '^ [1-9]% d% d% d% d% d?% d?% d?% d?% d? $' ) entoncesdevolver falsofinalreturn '[https://academic.microsoft.com/v2/detail/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'MA' )finalfunción p . mbaLink ( id )--Regex de formato de P434: [0-9a-f] {8} - [0-9a-f] {4} - [0-9a-f] {4} - [0-9a-f] {4} - [0-9a-f] {12} (p. Ej., 12345678-1234-1234-1234-1234567890AB)si no es id : match ( '^% x% x% x% x% x% x% x% x% -% x% x% x% x% -% x% x% x% x% -% x% x % x% x% -% x% x% x% x% x% x% x% x% x% x% x% x $ ' ) entoncesdevolver falsofinalreturn '[https://musicbrainz.org/artist/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'MusicBrainz' ) : nombre especial del gatofinalfunción p . mbareaLink ( id )--Regex de formato de P982: [0-9a-f] {8} - [0-9a-f] {4} - [0-9a-f] {4} - [0-9a-f] {4} - [0-9a-f] {12} (p. Ej., 12345678-1234-1234-1234-1234567890AB)si no es id : match ( '^% x% x% x% x% x% x% x% x% -% x% x% x% x% -% x% x% x% x% -% x% x % x% x% -% x% x% x% x% x% x% x% x% x% x% x% x $ ' ) entoncesdevolver falsofinalreturn '[https://musicbrainz.org/area/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'MusicBrainz area' ) : nombre especial del gatofinalfunción p . mbiLink ( id )--Regex de formato de P1330: [0-9a-f] {8} - [0-9a-f] {4} - [0-9a-f] {4} - [0-9a-f] {4} - [0-9a-f] {12} (p. Ej., 12345678-1234-1234-1234-1234567890AB)si no es id : match ( '^% x% x% x% x% x% x% x% x% -% x% x% x% x% -% x% x% x% x% -% x% x % x% x% -% x% x% x% x% x% x% x% x% x% x% x% x $ ' ) entoncesdevolver falsofinalreturn '[https://musicbrainz.org/instrument/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'Instrumento MusicBrainz' ) : nombre especial del gatofinalfunción p . mblLink ( id )--Regex de formato de P966: [0-9a-f] {8} - [0-9a-f] {4} - [0-9a-f] {4} - [0-9a-f] {4} - [0-9a-f] {12} (p. Ej., 12345678-1234-1234-1234-1234567890AB)si no es id : match ( '^% x% x% x% x% x% x% x% x% -% x% x% x% x% -% x% x% x% x% -% x% x % x% x% -% x% x% x% x% x% x% x% x% x% x% x% x $ ' ) entoncesdevolver falsofinalreturn '[https://musicbrainz.org/label/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'etiqueta MusicBrainz' ) : nombre especial del gatofinalfunción p . mbpLink ( id )--Regex de formato de P1004: [0-9a-f] {8} - [0-9a-f] {4} - [0-9a-f] {4} - [0-9a-f] {4} - [0-9a-f] {12} (p. Ej., 12345678-1234-1234-1234-1234567890AB)si no es id : match ( '^% x% x% x% x% x% x% x% x% -% x% x% x% x% -% x% x% x% x% -% x% x % x% x% -% x% x% x% x% x% x% x% x% x% x% x% x $ ' ) entoncesdevolver falsofinalreturn '[https://musicbrainz.org/place/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'MusicBrainz place' ) : nombre especial del gatofinalfunción p . mbrgLink ( id )--Regex de formato de P436: [0-9a-f] {8} - [0-9a-f] {4} - [0-9a-f] {4} - [0-9a-f] {4} - [0-9a-f] {12} (p. Ej., 12345678-1234-1234-1234-1234567890AB)si no es id : match ( '^% x% x% x% x% x% x% x% x% -% x% x% x% x% -% x% x% x% x% -% x% x % x% x% -% x% x% x% x% x% x% x% x% x% x% x% x $ ' ) entoncesdevolver falsofinalreturn '[https://musicbrainz.org/release-group/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'MusicBrainz release group' ) : nombre especial del gatofinalfunción p . mbsLink ( id )--Regex de formato de P1407: [0-9a-f] {8} - [0-9a-f] {4} - [0-9a-f] {4} - [0-9a-f] {4} - [0-9a-f] {12} (p. Ej., 12345678-1234-1234-1234-1234567890AB)si no es id : match ( '^% x% x% x% x% x% x% x% x% -% x% x% x% x% -% x% x% x% x% -% x% x % x% x% -% x% x% x% x% x% x% x% x% x% x% x% x $ ' ) entoncesdevolver falsofinalreturn '[https://musicbrainz.org/series/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'Serie MusicBrainz' ) : nombre especial del gatofinalfunción p . mbwLink ( id )--Regex de formato de P435: [0-9a-f] {8} - [0-9a-f] {4} - [0-9a-f] {4} - [0-9a-f] {4} - [0-9a-f] {12} (p. Ej., 12345678-1234-1234-1234-1234567890AB)si no es id : match ( '^% x% x% x% x% x% x% x% x% -% x% x% x% x% -% x% x% x% x% -% x% x % x% x% -% x% x% x% x% x% x% x% x% x% x% x% x $ ' ) entoncesdevolver falsofinalreturn '[https://musicbrainz.org/work/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'MusicBrainz work' ) : nombre especial del gatofinalfunción p . mgpLink ( id )--Regex de formato de P549: \ d {1,6} (por ejemplo, 123456)si no es id : match ( '^% d% d?% d?% d?% d?% d? $' ) entoncesdevolver falsofinalreturn '[https://genealogy.math.ndsu.nodak.edu/id.php?id=' .. id .. '' .. id .. ']' .. p . getCatForId ( 'MGP' )finalfunción p . naraLink ( id )--Regex de formato de P1225: ^ ([1-9] \ d {0,8}) $ (por ejemplo, 123456789)si no es id : match ( '^ [1-9]% d?% d?% d?% d?% d?% d?% d?% d? $' ) entoncesdevolver falsofinalreturn '[https://catalog.archives.gov/id/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'NARA' )finalfunción p . nclLink ( id )--Regex de formato de P1048: \ d + (por ejemplo, 1081436)si no es id : match ( '^% d + $' ) entoncesdevolver falsofinalreturn '[http://aleweb.ncl.edu.tw/F/?func=accref&acc_sequence=' .. id .. '& CON_LNG = ENG' .. id .. ']' .. p . getCatForId ( 'NCL' ): sin https a fecha de 9/2019finalfunción p . ndlLink ( id )--Regex de formato de P349: 0? \ D {8} (p. Ej., 012345678)si no es id : match ( '^ 0?% d% d% d% d% d% d% d% d $' ) entoncesdevolver falsofinalreturn '[https://id.ndl.go.jp/auth/ndlna/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'NDL' )finalfunción p . ngvLink ( id )--Regex de formato de P2041: \ d + (por ejemplo, 12354)si no es id : match ( '^% d + $' ) entoncesdevolver falsofinalreturn '[https://www.ngv.vic.gov.au/explore/collection/artist/' .. id .. '/' .. id .. ']' .. p . getCatForId ( 'NGV' )finalfunción p . nkcLink ( id )--Regex de formato de P691: [az] {2,4} [0-9] {2,14} (por ejemplo, abcd12345678901234)si no es id : match ( '^ [az] [az] [az]? [az]?% d% d% d?% d?% d?% d?% d?% d?% d?% d? % d?% d?% d?% d? $ ' ) entoncesdevolver falsofinalreturn '[https://aleph.nkp.cz/F/?func=find-c&local_base=aut&ccl_term=ica=' .. id .. '& CON_LNG = ENG' .. id .. ']' .. p . getCatForId ( 'NKC' )finalfunción p . nlaLink ( id )--Regex de formato de P409: [1-9] [0-9] {0,11} (por ejemplo, 123456789012)si no es id : match ( '^ [1-9]% d?% d?% d?% d?% d?% d?% d?% d?% d?% d?% d? $' ) entoncesdevolver falsofinalreturn '[https://nla.gov.au/anbd.aut-an' .. id .. '' .. id .. ']' .. p . getCatForId ( 'NLA' )finalfunción p . nlgLink ( id )--Regex de formato de P3348: [1-9] \ d * (por ejemplo, 1)si no es id : match ( '^ [1-9]% d * $' ) entoncesdevolver falsofinalreturn '[https://data.nlg.gr/resource/authority/record' .. id .. '' .. id .. ']' .. p . getCatForId ( 'NLG' )finalfunción p . nliLink ( id )--Regex de formato de P949: \ d {9} (por ejemplo, 123456789)si no es id : match ( '^% d% d% d% d% d% d% d% d% d $' ) entoncesdevolver falsofinalreturn '[http://uli.nli.org.il/F/?func=direct&doc_number=' .. id .. '& local_base = nlx10' .. '' .. id .. ']' .. p . getCatForId ( 'NLI' )finalfunción p . nlkLink ( id )--Regex de formato de P5034: KA. (19 | 20). {7} (por ejemplo, KAC201501465)si no es id : match ( '^ KA.19 ....... $' ) y no id : match ( '^ KA.20 ....... $' ) luegodevolver falsofinalreturn '[https://nl.go.kr/authorities/resource/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'NLK' )finalfunción p . nlpLink ( id )--Regex de formato de P1695: 9810 [0-9] \ d * o A [0-9] {7} [0-9X] (p. Ej., 9810123456789012345 o A10414836)si no es id : match ( '^ 9810% d + $' ) y no id : match ( '^ A% d% d% d% d% d% d% d [% dX] $' ) luegodevolver falsofinalreturn '[https://tools.wmflabs.org/wikidata-externalid-url?p=1695&id=' .. id .. '' .. id .. ']' .. p . getCatForId ( 'PNL' )finalfunción p . nlrLink ( id )--Regex de formato de P1003: \ d {9} (por ejemplo, 123456789)si no es id : match ( '^% d% d% d% d% d% d% d% d% d $' ) entoncesdevolver falsofinalreturn '[http://aleph.bibnat.ro:8991/F/?func=direct&local_base=NLR10&doc_number=' .. id .. ']' .. p . getCatForId ( 'NLR' )finalfunción p . nskLink ( id )--Regex de formato de P1375: \ d {9} (por ejemplo, 123456789)si no es id : match ( '^% d% d% d% d% d% d% d% d% d $' ) entoncesdevolver falsofinalreturn '[http://katalog.nsk.hr/F/?func=direct&doc_number=' .. id .. '& local_base = nsk10' .. id .. ']' .. p . getCatForId ( 'NSK' ): sin https a fecha de 9/2019finalfunción p . ntaLink ( id )--Regex del formato de P1006: \ d {8} [\ dX] (por ejemplo, 12345678X)si no es id : match ( '^% d% d% d% d% d% d% d% d [% dX] $' ) entoncesdevolver falsofinalreturn '[http://data.bibliotheken.nl/id/thes/p' .. id .. '' .. id .. ']' .. p . getCatForId ( 'NTA' )finalfunción p . orcidLink ( id )id = p . validateIsni ( id ) --eg 0000-0002-7398-5483si no id entoncesdevolver falsofinalid = id : sub ( 1 , 4 ) .. '-' .. id : sub ( 5 , 8 ) .. '-' .. id : sub ( 9 , 12 ) .. '-' .. id : sub ( 13 , 16 )return '[https://orcid.org/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'ORCID' )finalfunción p . plwabnLink ( id )--Regex de formato de P7293: 981 [0-9] {8} 05606 (p. Ej., 9810696457305606)si no es id : match ( '^ 981% d% d% d% d% d% d% d% d05606 * $' ) entoncesdevolver falsofinalreturn '[http://mak.bn.org.pl/cgi-bin/KHW/makwww.exe?BM=1&NU=1&IM=4&WI=' .. id .. '' .. id .. ']' . . p . getCatForId ( 'PLWABN' )finalfunción p . publonsLink ( id )--Regex de formato de P3829: \ d + (por ejemplo, 654601)si no es id : match ( '^% d + $' ) entoncesdevolver falsofinalreturn '[https://publons.com/author/' .. id .. '/' .. id .. ']' .. p . getCatForId ( 'Publons' )finalfunción p . picLink ( id )--Regex de formato de P2750: [1-9] \ d * (por ejemplo, 1)si no es id : match ( '^ [1-9]% d * $' ) entoncesdevolver falsofinalreturn '[https://pic.nypl.org/constituents/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'PIC' )finalfunción p . ridLink ( id )--Regex de formato de P1053: [AZ] {1,3} - \ d {4} - (19 | 20) \ d \ d (por ejemplo, AAS-5150-2020)si no es id : match ( '^ [AZ] [AZ]? [AZ]?% -% d% d% d% d% -19% d% d $' ) y no id : match ( '^ [AZ] [AZ]? [AZ]?% -% d% d% d% d% -20% d% d $' ) entoncesdevolver falsofinalreturn '[https://www.researcherid.com/rid/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'RID' )finalfunción p . rismLink ( id )--Regex del formato de P5504: (pe | ks)? \ [1-9] d * (por ejemplo, pe30006410)si no es id : match ( '^ pe [1-9]% d * $' ) y --99% comienza con 'pe' no id : match ( '^ ks [1-9]% d * $' ) y no id : match ( '^ [1-9]% d * $' ) luegodevolver falsofinalreturn '[https://opac.rism.info/search?id=' .. id .. '' .. id .. ']' .. p . getCatForId ( 'RISM' )finalfunción p . reroLink ( id )--Regex de formato de P3065: 0 [1-2] - [A-Z0-9] {1,10} (por ejemplo, 02-A012345678)si no es id : match ( '^ 0 [1-2]% - [AZ% d] [AZ% d]? [AZ% d]? [AZ% d]? [AZ% d]? [AZ% d] ? [AZ% d]? [AZ% d]? [AZ% d]? [AZ% d]? $ ' ) Entoncesdevolver falsofinalreturn '[http://data.rero.ch/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'RERO' )finalfunción p . rkdartistsLink ( id )--Regex de formato de P650: [1-9] \ d {0,5} (por ejemplo, 123456)si no es id : match ( '^ [1-9]% d?% d?% d?% d?% d? $' ) entoncesdevolver falsofinalreturn '[https://rkd.nl/en/explore/artists/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'RKDartists' )finalfunción p . rkdidLink ( id )--Regex de formato de P350: [1-9] \ d {0,5} (por ejemplo, 123456)si no es id : match ( '^ [1-9]% d?% d?% d?% d?% d? $' ) entoncesdevolver falsofinalreturn '[https://rkd.nl/nl/explore/images/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'RKDID' )finalfunción p . rslLink ( id )--Regex de formato de P947: \ d {1,9} (por ejemplo, 123456789)si no es id : match ( '^% d% d?% d?% d?% d?% d?% d?% d?% d? $' ) entoncesdevolver falsofinalreturn '[http://aleph.rsl.ru/F?func=find-b&find_code=SYS&adherent=Y&local_base=RSL11&request=' .. id .. '& CON_LNG = ENG' .. id .. ']' .. p . getCatForId ( 'RSL' ): sin https a fecha de 9/2019finalfunción p . iccuLink ( id )--Regex de formato de P396: IT \\ ICCU \\ (\ d {10} | \ D \ D [\ D \ d] \ D \\\ d {6}) (por ejemplo, IT \ ICCU \ CFIV \ 000163)si no es id : match ( '^ IT \\ ICCU \\ % d% d% d% d% d% d% d% d% d% d $' ) y no id : match ( '^ IT \\ ICCU \\ % u% u [% u% d]% u \\ % d% d% d% d% d% d $' ) luego --legacy:% u used aquí en lugar de% D (pero el gato de identificación defectuoso está vacío, de ~ 12k usos)devolver falsofinalreturn '[https://opac.sbn.it/opacsbn/opac/iccu/scheda_authority.jsp?bid=' .. id .. '' .. id .. ']' .. p . getCatForId ( 'ICCU' )finalfunción p . selibrLink ( id )--Regex de formato de P906: [1-9] \ d {4,5} (por ejemplo, 123456)si no es id : match ( '^ [1-9]% d% d% d% d% d? $' ) entoncesdevolver falsofinalreturn '[https://libris.kb.se/auth/' .. id .. '' .. id .. ']' .. p . getCatForId ( 'SELIBR' )finalfunción p . sikartLink ( id )--Regex de formato de P781: \ d {7,9} (por ejemplo, 123456789)si no es id : match ( '^% d% d% d% d% d% d% d% d?% d? $' ) entoncesdevolver falsofinalreturn '[http://www.sikart.ch/KuenstlerInnen.aspx?id=' .. id .. '& lng = en' .. id .. ']' .. p . getCatForId ( 'SIKART' ) - no https a fecha de 9/2019finalfunción p . snacLink ( id )--P3430's format regex: \d*[A-Za-z][0-9A-Za-z]* (e.g. A)if not id:match( '^%d*[A-Za-z][0-9A-Za-z]*$' ) thenreturn falseendreturn '[https://snaccooperative.org/ark:/99166/'..id..' '..id..']'..p.getCatForId( 'SNAC-ID' )endfunction p.sudocLink( id )--P269's format regex: (\d{8}[\dX]|) (e.g. 026927608)if not id:match( '^%d%d%d%d%d%d%d%d[%dxX]$' ) then --legacy: allow lowercase 'x'return falseendreturn '[https://www.idref.fr/'..id..' '..id..']'..p.getCatForId( 'SUDOC' )endfunction p.s2authoridLink( id )--P4012's format regex: [1-9]\d* (e.g. 1796130)if not id:match( '^[1-9]%d*$' ) thenreturn falseendreturn '[https://www.semanticscholar.org/author/'..id..' '..id..']'..p.getCatForId( 'Semantic Scholar author' ) --special cat nameendfunction p.ta98Link( id )--P1323's format regex: A\d{2}\.\d\.\d{2}\.\d{3}[FM]? (e.g. A12.3.45.678)if not id:match( '^A%d%d%.%d%.%d%d%.%d%d%d[FM]?$' ) thenreturn falseendreturn '[http://tools.wmflabs.org/wikidata-externalid-url/?p=1323&url_prefix=https:%2F%2Fwww.unifr.ch%2Fifaa%2FPublic%2FEntryPage%2FTA98%20Tree%2FEntity%20TA98%20EN%2F&url_suffix=%20Entity%20TA98%20EN.htm&id='..id..' '..id..']'..p.getCatForId( 'TA98' )endfunction p.tdviaLink( id )--P7314's format regex: [a-z/-]+] (e.g. barkan-omer-lutfi)if not id:match( '^[a-z/-]+$' ) thenreturn falseendreturn '[https://islamansiklopedisi.org.tr/'..id..' '..id..']'..p.getCatForId( 'TDVİA' )endfunction p.teLink( id )--P1693's format regex: E[1-8]\.\d{1,2}\.\d{1,2}\.\d{1,2}\.\d{1}\.\d{1}\.\d{1,3} (e.g. E1.23.45.67.8.9.0)local e1, e2 = id:match( '^E([1-8])%.(%d%d?)%.%d%d?%.%d%d?%.%d%.%d%.%d%d?%d?$' )if not e1 thenreturn falseendlocal TEnum = 'TEe0'..e1 --no formatter URL in WD, probably due to this complexityif e1 == '5' or e1 == '7' thenif #e2 == 1 then e2 = '0'..e2 endTEnum = TEnum..e2endreturn '[http://www.unifr.ch/ifaa/Public/EntryPage/ViewTE/'..TEnum..'.html '..id..']'..p.getCatForId( 'TE' )endfunction p.tepapaLink( id )--P3544's format regex: \d+ (e.g. 1)if not id:match( '^%d+$' ) thenreturn falseendreturn '[https://collections.tepapa.govt.nz/agent/'..id..' '..id..']'..p.getCatForId( 'TePapa' )endfunction p.thLink( id )--P1694's format regex: H\d\.\d{2}\.\d{2}\.\d\.\d{5} (e.g. H1.23.45.6.78901)local h1, h2 = id:match( '^H(%d)%.(%d%d)%.%d%d%.%d%.%d%d%d%d%d$' )if not h1 thenreturn falseendlocal THnum = 'THh'..h1..h2 --no formatter URL in WD, probably due to this complexityreturn '[http://www.unifr.ch/ifaa/Public/EntryPage/ViewTH/'..THnum..'.html '..id..']'..p.getCatForId( 'TH' )endfunction p.tlsLink( id )local id2 = id:gsub(' +', '_')--P1362's format regex: \p{Lu}[\p{L}\d_',\.\-\(\)\*/–]{3,59} (e.g. Abcd)local class = "[%a%d_',%.%-%(%)%*/–]"local regex = "^%u"..string.rep(class, 3)..string.rep(class.."?", 56).."$"if not mw.ustring.match( id2, regex ) thenreturn falseendreturn '[http://tls.theaterwissenschaft.ch/wiki/'..id2..' '..id..']'..p.getCatForId( 'TLS' ) --no https as of 9/2019endfunction p.troveLink( id )--P1315's format regex: [1-9]\d{5,7} (e.g. 12345678)if not id:match( '^[1-9]%d%d%d%d%d%d?%d?$' ) thenreturn falseendreturn '[https://trove.nla.gov.au/people/'..id..' '..id..']'..p.getCatForId( 'Trove' )endfunction p.ukparlLink( id )--P6213's format regex: [a-zA-Z\d]{8} (e.g. AQUupyiR)if not id:match( '^[a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d]$' ) thenreturn falseendreturn '[https://id.parliament.uk/'..id..' '..id..']'..p.getCatForId( 'UKPARL' )endfunction p.ulanLink( id )--P245's format regex: 500\d{6} (e.g. 500123456)if not id:match( '^500%d%d%d%d%d%d$' ) thenreturn falseendreturn '[https://www.getty.edu/vow/ULANFullDisplay?find=&role=&nation=&subjectid='..id..' '..id..']'..p.getCatForId( 'ULAN' )endfunction p.uscongressLink( id )--P1157's format regex: [A-Z]00[01]\d{3} (e.g. A000123)if not id:match( '^[A-Z]00[01]%d%d%d$' ) thenreturn falseendreturn '[http://bioguide.congress.gov/scripts/biodisplay.pl?index='..id..' '..id..']'..p.getCatForId( 'USCongress' ) --no https as of 9/2019endfunction p.vcbaLink( id )--P8034's format regex: \d{3}\/[1-9]\d{0,5} (e.g. 494/9793)if not id:match( '^%d%d%d\/[1-9]%d?%d?%d?%d?%d?$' ) thenreturn falseendlocal id2 = id:gsub('\/', '_')return '[https://opac.vatlib.it/auth/detail/'..id2..' '..id..']'..p.getCatForId( 'VcBA' )endfunction p.viafLink( id )--P214's format regex: [1-9]\d(\d{0,7}|\d{17,20}) (e.g. 123456789, 1234567890123456789012)if not id:match( '^[1-9]%d%d?%d?%d?%d?%d?%d?%d?$' ) and not id:match( '^[1-9]%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d?%d?%d?$' ) thenreturn falseend-- If the "VIAF" entry at [[:m:Interwiki map]] would resolve to "https://viaf.org/viaf/$1" (rather than "http://viaf.org/viaf/$1", as it currently still does), the code below could change from '[https://viaf.org/viaf/'..id..' '..id..']' to '[[:VIAF:'..id..'|'..id..']]'.return '[https://viaf.org/viaf/'..id..' '..id..']'..p.getCatForId( 'VIAF' )end--[[=========================== Helper functions =============================]]function p.append(str, c, length)while str:len() < length dostr = c .. strendreturn strend--Returns the ISNI check digit isni must be a string where the 15 first elements are digits, e.g. 0000000066534145function p.getIsniCheckDigit( isni )local total = 0for i = 1, 15 dolocal digit = isni:byte( i ) - 48 --Get integer valuetotal = (total + digit) * 2endlocal remainder = total % 11local result = (12 - remainder) % 11if result == 10 thenreturn "X"endreturn tostring( result )end--Validate ISNI (and ORCID) and retuns it as a 16 characters string or returns false if it's invalid--See http://support.orcid.org/knowledgebase/articles/116780-structure-of-the-orcid-identifierfunction p.validateIsni( id )--P213 (ISNI) format regex: [0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3}[0-9X] (e.g. 0000-0000-6653-4145)--P496 (ORCID) format regex: 0000-000(1-[5-9]|2-[0-9]|3-[0-4])\d{3}-\d{3}[\dX] (e.g. 0000-0002-7398-5483)id = id:gsub( '[ %-]', '' ):upper()if not id:match( '^%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d[%dX]$' ) thenreturn falseendif p.getIsniCheckDigit( id ) ~= string.char( id:byte( 16 ) ) thenreturn falseendreturn idendfunction p.splitLccn( id )--P244's format regex: (n|nb|nr|no|ns|sh)([4-9][0-9]|00|20[0-1][0-9])[0-9]{6} (e.g. n78039510)if id:match( '^%l%l?%l?%d%d%d%d%d%d%d%d%d?%d?$' ) thenid = id:gsub( '^(%l+)(%d+)(%d%d%d%d%d%d)$', '%1/%2/%3' )endif id:match( '^%l%l?%l?/%d%d%d?%d?/%d+$' ) thenreturn mw.text.split( id, '/' )endreturn falseend--[[==========================================================================]]--[[ Wikidata & documentation functions ]]--[[==========================================================================]]function p.getIdsFromWikidata( itemId, property )local ids = {}local statements = mw.wikibase.getBestStatements( itemId, property )if statements thenfor _, statement in ipairs( statements ) doif statement.mainsnak.datavalue thentable.insert( ids, statement.mainsnak.datavalue.value )endendendreturn idsend-- Creates a human-readable standalone wikitable version of p.conf, and tracking categories with page counts, for use in the documentationfunction p.docConfTable( frame )local wikiTable = '{| class="wikitable sortable"\n'.. '! rowspan=2 | Parameter\n'.. '! rowspan=2 | Label\n'.. '! rowspan=2; data-sort-type=number | Wikidata property\n'.. '! colspan=4 | Tracking categories and page counts\n'.. '|-\n'.. '! [[:Category:Wikipedia articles with authority control information|'.. 'Articles]]\n'.. '! [[:Category:User pages with authority control information|'.. 'User pages]]\n'.. '! [[:Category:Miscellaneous pages with authority control information|'.. 'Misc. pages]]\n'.. '! [[:Category:Wikipedia articles with faulty authority control information|'..'Faulty IDs]]\n'.. '|-\n'local lang = mw.getContentLanguage()for _, conf in pairs( p.conf ) dolocal param, link, pid = conf[1], conf[2], conf[3]local category = conf.category or paramlocal args = { id = 'f', pid }local wpl = frame:expandTemplate{ title = 'Wikidata property link', args = args }--catslocal articleCat = 'Wikipedia articles with '..category..' identifiers'local userCat = 'User pages with '..category..' identifiers'local miscCat = 'Miscellaneous pages with '..category..' identifiers'local faultyCat = 'Wikipedia articles with faulty '..category..' identifiers'--countslocal articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, 'pages') )local userCount = lang:formatNum( mw.site.stats.pagesInCategory(userCat, 'pages') )local miscCount = lang:formatNum( mw.site.stats.pagesInCategory(miscCat, 'pages') )local faultyCount = lang:formatNum( mw.site.stats.pagesInCategory(faultyCat, 'pages') )--concatwikiTable = wikiTable..'\n'..'|-\n'..'||'..param..'||'..link..'||data-sort-value='..pid..'|'..wpl..'||style="text-align: right;"|[[:Category:'..articleCat..'|'..articleCount..']]'..'||style="text-align: right;"|[[:Category:'.. userCat..'|'.. userCount..']]'..'||style="text-align: right;"|[[:Category:'.. miscCat..'|'.. miscCount..']]'..'||style="text-align: right;"|[[:Category:'.. faultyCat..'|'.. faultyCount..']]'end--append derivative WorldCat catslocal wcd = { 'WorldCat-LCCN', 'WorldCat-VIAF' }for _, w in pairs(wcd) dolocal articleCat = 'Wikipedia articles with '..w..' identifiers'local articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, 'pages') )wikiTable = wikiTable..'\n'..'|-\n'..'||'..'—'..'||'..w..'||data-sort-value='..w..'|'..'—'..'||style="text-align: right;"|[[:Category:'..articleCat..'|'..articleCount..']]'..'||style="text-align: right;"|—'..'||style="text-align: right;"|—'..'||style="text-align: right;"|—'endreturn wikiTable..'\n|}'end--[[==========================================================================]]--[[ Configuration ]]--[[==========================================================================]]-- If a specific "(identifier) redirect" exists for an identifier, please route through this particular redirect rather than linking directly to the target page. This reduces clutter in "What links here" and improves reverse lookup of articles where a manifestation of this particular identifier is used.-- Parameter format: { 'parameter name', 'label', propertyId # in Wikidata, formatting/validation function }p.conf = {{ 'AAG', '[[AAG (identifier)|AAG]]', 3372, p.aagLink },{ 'ACM-DL', '[[ACM DL (identifier)|ACM DL]]', 864, p.acmLink },{ 'ADB', '[[ADB (identifier)|ADB]]', 1907, p.adbLink },{ 'AGSA', '[[AGSA (identifier)|AGSA]]', 6804, p.agsaLink },{ 'autores.uy', '[[autores.uy (identifier)|autores.uy]]', 2558, p.autoresuyLink },{ 'AWR', '[[AWR (identifier)|AWR]]', 4186, p.awrLink },{ 'BALaT', '[[BALaT (identifier)|BALaT]]', 3293, p.balatLink },{ 'BIBSYS', '[[BIBSYS (identifier)|BIBSYS]]', 1015, p.bibsysLink },{ 'Bildindex', '[[Bildindex (identifier)|Bildindex]]', 2092, p.bildLink },{ 'BNC', '[[BNC (identifier)|BNC]]', 1890, p.bncLink },{ 'BNE', '[[BNE (identifier)|BNE]]', 950, p.bneLink },{ 'BNF', '[[BNF (identifier)|BNF]]', 268, p.bnfLink },{ 'Botanist', '[[Botanist (identifier)|Botanist]]', 428, p.botanistLink },{ 'BPN', '[[BPN (identifier)|BPN]]', 651, p.bpnLink },{ 'CANTIC', '[[CANTIC (identifier)|CANTIC]]', 1273, p.canticLink },{ 'CINII', '[[CiNii (identifier)|CiNii]]', 271, p.ciniiLink },{ 'CWGC', '[[CWGC (identifier)|CWGC]]', 1908, p.cwgcLink },{ 'DAAO', '[[DAAO (identifier)|DAAO]]', 1707, p.daaoLink },{ 'DBLP', '[[DBLP (identifier)|DBLP]]', 2456, p.dblpLink },{ 'DIB', '[[DIB (identifier)|DIB]]', 6829, p.dibLink },{ 'DSI', '[[DSI (identifier)|DSI]]', 2349, p.dsiLink },{ 'FAST', '[[FAST (identifier)|FAST]]', 2163, p.fastLink },{ 'FNZA', '[[FNZA (identifier)|FNZA]]', 6792, p.fnzaLink },{ 'GND', '[[GND (identifier)|GND]]', 227, p.gndLink },{ 'HDS', '[[HDS (identifier)|HDS]]', 902, p.hdsLink },{ 'IAAF', '[[IAAF (identifier)|IAAF]]', 1146, p.iaafLink },{ 'ICCU', '[[ICCU (identifier)|ICCU]]', 396, p.iccuLink }, --formerly SBN{ 'ICIA', '[[ICIA (identifier)|ICIA]]', 1736, p.iciaLink },{ 'IEU', '[[IEU (identifier)|IEU]]', 9070, p.ieuLink },{ 'ISNI', '[[ISNI (identifier)|ISNI]]', 213, p.isniLink },{ 'Joconde', '[[Joconde (identifier)|Joconde]]' , 347, p.jocondeLink },{ 'KULTURNAV', '[[KulturNav (identifier)|KulturNav]]', 1248, p.kulturnavLink },{ 'LCCN', '[[LCCN (identifier)|LCCN]]', 244, p.lccnLink },{ 'LIR', '[[LIR (identifier)|LIR]]', 886, p.lirLink },{ 'LNB', '[[LNB (identifier)|LNB]]', 1368, p.lnbLink },{ 'Léonore', '[[Léonore (identifier)|Léonore]]', 640, p.leonoreLink },{ 'MA', '[[MA (identifier)|MA]]', 6366, p.maLink },{ 'MBA', '[[MBA (identifier)|MBA]]', 434, p.mbaLink, category = 'MusicBrainz' }, --special cat name{ 'MBAREA', '[[MBAREA (identifier)|MBAREA]]', 982, p.mbareaLink, category = 'MusicBrainz area' }, --special cat name{ 'MBI', '[[MBI (identifier)|MBI]]', 1330, p.mbiLink, category = 'MusicBrainz instrument' }, --special cat name{ 'MBL', '[[MBL (identifier)|MBL]]', 966, p.mblLink, category = 'MusicBrainz label' }, --special cat name{ 'MBP', '[[MBP (identifier)|MBP]]', 1004, p.mbpLink, category = 'MusicBrainz place' }, --special cat name{ 'MBRG', '[[MBRG (identifier)|MBRG]]', 436, p.mbrgLink, category = 'MusicBrainz release group' }, --special cat name{ 'MBS', '[[MBS (identifier)|MBS]]', 1407, p.mbsLink, category = 'MusicBrainz series' }, --special cat name{ 'MBW', '[[MBW (identifier)|MBW]] work', 435, p.mbwLink, category = 'MusicBrainz work' }, --special cat name{ 'MGP', '[[MGP (identifier)|MGP]]', 549, p.mgpLink },{ 'NARA', '[[NARA (identifier)|NARA]]', 1225, p.naraLink },{ 'NCL', '[[NCL (identifier)|NBL]]', 1048, p.nclLink },{ 'NDL', '[[NDL (identifier)|NDL]]', 349, p.ndlLink },{ 'NGV', '[[NGV (identifier)|NGV]]', 2041, p.ngvLink },{ 'NKC', '[[NKC (identifier)|NKC]]', 691, p.nkcLink },{ 'NLA', '[[NLA (identifier)|NLA]]', 409, p.nlaLink },{ 'NLG', '[[NLG (identifier)|NLG]]', 3348, p.nlgLink },{ 'NLI', '[[NLI (identifier)|NLI]]', 949, p.nliLink },{ 'NLK', '[[NLK (identifier)|NLK]]', 5034, p.nlkLink },{ 'NLP', '[[NLP (identifier)|NLP]]', 1695, p.nlpLink },{ 'NLR', '[[NLR (identifier)|NLR]]', 1003, p.nlrLink },{ 'NSK', '[[NSK (identifier)|NSK]]', 1375, p.nskLink },{ 'NTA', '[[NTA (identifier)|NTA]]', 1006, p.ntaLink },{ 'ORCID', '[[ORCID (identifier)|ORCID]]', 496, p.orcidLink },{ 'PIC', '[[PIC (identifier)|PIC]]', 2750, p.picLink },{ 'PLWABN', '[[PLWABN (identifier)|PLWABN]]', 7293, p.plwabnLink },{ 'Publons', '[[Publons (identifier)|Publons]]', 3829, p.publonsLink },{ 'RERO', '[[RERO (identifier)|RERO]]', 3065, p.reroLink },{ 'RID', '[[RID (identifier)|ResearcherID]]', 1053, p.ridLink },{ 'RISM', '[[RISM (identifier)|RISM]]', 5504, p.rismLink },{ 'RKDartists', '[[RKDartists (identifier)|RKD]]', 650, p.rkdartistsLink },{ 'RKDID', '[[RKDID (identifier)|RKDimages ID]]', 350, p.rkdidLink },{ 'RSL', '[[RSL (identifier)|RSL]]', 947, p.rslLink },{ 'SELIBR', '[[SELIBR (identifier)|SELIBR]]', 906, p.selibrLink },{ 'SIKART', '[[SIKART (identifier)|SIKART]]', 781, p.sikartLink },{ 'SNAC-ID', '[[SNAC-ID (identifier)|SNAC]]', 3430, p.snacLink },{ 'SUDOC', '[[SUDOC (identifier)|SUDOC]]', 269, p.sudocLink },{ 'S2AuthorId', '[[S2AuthorId (identifier)|S2AuthorId]]', 4012, p.s2authoridLink, category = 'Semantic Scholar author' }, --special cat name{ 'TA98', '[[TA98 (identifier)|TA98]]', 1323, p.ta98Link },{ 'TDVİA', '[[TDVİA (identifier)|TDVİA]]', 7314, p.tdviaLink },{ 'TE', '[[TE (identifier)|TE]]', 1693, p.teLink },{ 'TePapa', '[[TePapa (identifier)|TePapa]]', 3544, p.tepapaLink },{ 'TH', '[[TH (identifier)|TH]]', 1694, p.thLink },{ 'TLS', '[[TLS (identifier)|TLS]]', 1362, p.tlsLink },{ 'Trove', '[[Trove (identifier)|Trove]]', 1315, p.troveLink }, --formerly NLA-person{ 'UKPARL', '[[UKPARL (identifier)|UKPARL]]', 6213, p.ukparlLink },{ 'ULAN', '[[ULAN (identifier)|ULAN]]', 245, p.ulanLink },{ 'USCongress', '[[US Congress (identifier)|US Congress]]', 1157, p.uscongressLink },{ 'VcBA', '[[VcBA (identifier)|VcBA]]', 8034, p.vcbaLink },{ 'VIAF', '[[VIAF (identifier)|VIAF]]', 214, p.viafLink },{ 'WORLDCATID', '[[WorldCat Identities (identifier)|WorldCat Identities]]', 7859, nil },}-- Legitimate aliases to p.conf, for convenience-- Format: { 'alias', 'parameter name in p.conf' }p.aliases = {{ 'DNB', 'GND' }, --Deutsche Nationalbibliothek -> Gemeinsame Normdatei{ 'Leonore', 'Léonore' }, --alias name without diacritics{ 'leonore', 'Léonore' }, --lowercase variant without diacritics{ 'MusicBrainz', 'MBA' },{ 'MusicBrainz artist', 'MBA' },{ 'MusicBrainz label', 'MBL' },{ 'MusicBrainz release group', 'MBRG' },{ 'MusicBrainz work', 'MBW' },{ 'SBN', 'ICCU' }, --SBN alias to be deprecated at a later stage{ 'TDVIA', 'TDVİA' }, --alias name without diacritics{ 'tdvia', 'TDVİA' }, --lowercase variant without diacritics}-- Deprecated aliases to p.conf; tracked in [[Category:Wikipedia articles with deprecated authority control identifiers]]-- Format: { 'deprecated parameter name', 'replacement parameter name in p.conf' }p.deprecated = {{ 'GKD', 'GND' },{ 'PND', 'GND' },{ 'RLS', 'RSL' },{ 'SWD', 'GND' },{ 'NARA-organization', 'NARA' },{ 'NARA-person', 'NARA' },}--[[==========================================================================]]--[[ Main ]]--[[==========================================================================]]function p.authorityControl( frame )local resolveEntity = require( "Module:ResolveEntityId" )local parentArgs = frame:getParent().args --WD IDs added here laterlocal iParentArgs = 0 --count original/manual parent args only laterlocal elements = {} --create/insert rows laterlocal worldcatCat = ''local multipleIdCat = ''local suppressedIdCat = ''local deprecatedIdCat = ''local differentOnWDCat = ''local sameOnWDCat = ''--Redirect aliases to proper parameter namesfor _, a in pairs( p.aliases ) dolocal alias, param = a[1], a[2]if (parentArgs[param] == nil or parentArgs[param] == '') and parentArgs[alias] thenparentArgs[param] = parentArgs[alias]endend--Redirect deprecated parameters to proper parameter names, and assign tracking catfor _, d in pairs( p.deprecated ) dolocal dep, param = d[1], d[2]if (parentArgs[param] == nil or parentArgs[param] == '') and parentArgs[dep] thenparentArgs[param] = parentArgs[dep]if namespace == 0 thendeprecatedIdCat = '[[Category:Wikipedia articles with deprecated authority control identifiers|'..dep..']]'endendend--Use QID= parameter for testing/example purposes onlylocal itemId = nilif namespace ~= 0 thenlocal qid = parentArgs['qid'] or parentArgs['QID']if qid thenitemId = 'Q'..mw.ustring.gsub(qid, '^[Qq]', '')itemId = resolveEntity._id(itemId) --nil if unresolvableendelseitemId = mw.wikibase.getEntityIdForCurrentPage()end--Wikidata fallback if availableif itemId thenlocal iMatches = 0for _, params in ipairs( p.conf ) doif params[3] > 0 thenlocal val = parentArgs[mw.ustring.lower(params[1])] or parentArgs[params[1]]if val == nil or val == '' thenlocal wikidataIds = p.getIdsFromWikidata( itemId, 'P'..params[3] )if wikidataIds[1] thenif val == '' and (namespace == 0 or testcases) thensuppressedIdCat = '[[Category:Wikipedia articles with suppressed authority control identifiers|'..params[1]..']]'elseparentArgs[params[1]] = wikidataIds[1] --add ID from WDendendelseiParentArgs = iParentArgs + 1local wikidataIds = p.getIdsFromWikidata( itemId, 'P'..params[3] )if wikidataIds[1] and differentOnWDCat == '' thenlocal bMatch = falsefor _, wd in pairs( wikidataIds ) doif val == wd theniMatches = iMatches + 1bMatch = trueendendif bMatch == false thendifferentOnWDCat = '[[Category:Pages using authority control with parameters different on Wikidata|'..params[1]..']]'endendendendendif iMatches > 0 and iMatches == iParentArgs thensameOnWDCat = '[[Category:Pages using authority control with parameters all matching Wikidata]]'endend--Configured rowslocal rct = 0for _, params in ipairs( p.conf ) dolocal val = parentArgs[mw.ustring.lower(params[1])] or parentArgs[params[1]]local tval, tlinks = {}, {} --init tablesif val and val ~= '' and type(params[4]) == 'function' thentable.insert( tval, val )table.insert( tlinks, params[4]( val ) )end--collect other unique vals (IDs) from WD, if presentif itemId and tval[1] thenlocal wikidataIds = p.getIdsFromWikidata( itemId, 'P'..params[3] )for _, v in pairs( wikidataIds ) dolocal bnew = truefor _, w in pairs( tval ) doif v == w then bnew = false endendif bnew thentable.insert( tval, v )table.insert( tlinks, params[4]( v ) )endendend--assembleif tval[1] thentable.insert( elements, p.createRow( params[1], params[2]..':', tval, nil, tlinks, true, params.category ) )rct = rct + 1if tval[2] thenmultipleIdCat = p.getCatForId( 'multiple' )endendend--WorldCatlocal worldcatId = parentArgs['worldcatid'] or parentArgs['WORLDCATID']if worldcatId and worldcatId ~= '' then --if WORLDCATID present & unsuppressedtable.insert( elements, p.createRow( 'WORLDCATID', '', worldcatId, '[[WorldCat Identities (identifier)|WorldCat Identities]]: [https://www.worldcat.org/identities/'..mw.uri.encode(worldcatId, 'PATH')..' '..worldcatId..']', nil, false ) ) --Validation?worldcatCat = p.getCatForId( 'WORLDCATID' )elseif worldcatId == nil then --if WORLDCATID absent but unsuppressedlocal viafId = parentArgs['viaf'] or parentArgs['VIAF']local lccnId = parentArgs['lccn'] or parentArgs['LCCN']if viafId and viafId ~= '' and p.viafLink( viafId ) then --VIAF must be present, unsuppressed, & validatedtable.insert( elements, p.createRow( 'VIAF', '', viafId, '[[WorldCat Identities (identifier)|WorldCat Identities]] (via VIAF): [https://www.worldcat.org/identities/containsVIAFID/'..viafId..' '..viafId..']', nil, false ) )if namespace == 0 then worldcatCat = '[[Category:Wikipedia articles with WorldCat-VIAF identifiers]]'endelseif lccnId and lccnId ~= '' and p.lccnLink( lccnId ) then --LCCN must be present, unsuppressed, & validatedlocal lccnParts = p.splitLccn( lccnId )if lccnParts and lccnParts[1] ~= 'sh' thenlocal lccnIdFmtd = lccnParts[1]..lccnParts[2]..'-'..lccnParts[3]table.insert( elements, p.createRow( 'LCCN', '', lccnId, '[[WorldCat Identities (identifier)|WorldCat Identities]] (via LCCN): [https://www.worldcat.org/identities/lccn-'..lccnIdFmtd..' '..lccnIdFmtd..']', nil, false ) )if namespace == 0 thenworldcatCat = '[[Category:Wikipedia articles with WorldCat-LCCN identifiers]]'endendendelseif worldcatId == '' then --if WORLDCATID suppressedsuppressedIdCat = '[[Category:Wikipedia articles with suppressed authority control identifiers|WORLDCATID]]'endlocal Navbox = require('Module:Navbox')local elementsCat = ''if rct == 0 or rct >= 25 thenlocal eCat = 'AC with '..rct..' elements'elementsCat = '[[Category:'..eCat..']]'..p.redCatLink(eCat)endlocal outString = ''if #elements > 0 thenlocal args = { pid = 'identifiers' } -- #target the list of identifiersif testcases and itemId then args = { pid = 'identifiers', qid = itemId } end --expensivelocal pencil = frame:expandTemplate{ title = 'EditAtWikidata', args = args}outString = Navbox._navbox( {name = 'Authority control',navboxclass = 'authority-control',bodyclass = 'hlist',group1 = '[[Help:Authority control|Authority control]]'..pencil,list1 = table.concat( elements )} )endlocal auxCats = worldcatCat .. elementsCat .. multipleIdCat .. suppressedIdCat .. deprecatedIdCat .. differentOnWDCat .. sameOnWDCatif testcases thenauxCats = mw.ustring.gsub(auxCats, '(%[%[)(Category)', '%1:%2') --for easier checkingendoutString = outString .. auxCatsif namespace ~= 0 thenoutString = mw.ustring.gsub(outString, '(%[%[)(Category:Wikipedia articles)', '%1:%2') --by definitionendreturn outStringendreturn p