Mòdul:Authority control/config
Aparença

A continuació es mostra la documentació transclosa de la subpàgina /ús. [salta a la caixa de codi]
Mòdul de configuració de dades per Mòdul:Authority control.
Sintaxi
[modifica]Configuració mínima
[modifica]{
label = -- etiqueta
property = -- número de la propietat sense P inicial
section = -- número de secció: 1 o 2
},
Vegeu a continuació l'explicació dels elements. La resta són de configuració avançada, recomanables però amb certs coneixements.
Per la inclusió o l'eliminació d'identificadors cal consens. Comenteu-ho a Plantilla Discussió:Autoritat.
Configuració completa
[modifica]La taula p.config
conté la configuració dels identificadors a mostrar. Està composta dels següents elements:
- label = Etiqueta de l'enllaç link .
- prefix = (opcional, alternatiu) Etiqueta a mostrar prefixada als enllaços que passen a ser numerats. En aquest cas s'ignora label.
- property = Número de la propietat de Wikidata, sense el prefix P.
- section = Número de secció on ha d'anar l'identificador. Les seccions estan definides en la taula
p.sections
. - pattern = (opcional) Patró Lua del format vàlid de l'identificador. Si s'omet llavors el mòdul no comprovarà la validesa de l'identificador. Compareu amb el valor Format com a expressió regular (P1793) de l'identificador, tot i que el patró Lua és similar però no idèntic a una expressió regular.
- patterns = (alternatiu) Conté una taula de diferents patrons alternatius que pot complir.
- valid = (alternatiu) Nom d'una funció Lua específica, definida en el mòdul principal, que determina si l'identificador és vàlid en cas que no sigui suficient amb pattern. Si no teniu experiència amb Lua per incloure una nova funció de validació, demaneu-ho a Mòdul Discussió:Authority control.
- link = (opcional) URL de la pàgina externa amb la informació de l'identificador. El codi
$1
serà reemplaçat per l'identificador. Normalment és el mateix que el definit a Wikidata Format d'URL (P1630) i per defecte l'obté d'aquesta propietat. - category= (opcional) Categoria de seguiment de l'ús d'un identificador. És l'etiqueta a afegir darrere de "Categoria:Articles amb identificador <category>". Normalment no serà necessari si no hi ha un motiu justificat.
L'ordre dels identificadors sortirà en el mateix ordre que es defineixin aquí. Procureu mantenir un ordre lògic.
local p = {}
p.config = {
-- Registres d'autoritat en català
{
label = 'CANTIC',
property = 9984,
section = 1,
prefix = '[[CANTIC]]',
pattern = '98%d%d%d%d%d%d%d%d%d%d%d%d6706',
link = 'https://cantic.bnc.cat/registre/$1',
category = 'CANTIC'
},
-- Registres d'autoritat altres
{
label = 'BNE',
property = 950,
section = 1,
prefix = '[[Biblioteca Nacional de España|BNE]]',
patterns = {'[XF][XF]%d%d%d%d%d?%d?%d?', 'a%d%d%d%d%d?%d?%d?', 'bi[mcsv][aoei]%d%d%d%d%d%d%d%d%d%d', 'Mi[sm][eoa]%d%d%d%d%d%d%d%d%d%d'},
link = 'http://datos.bne.es/resource/$1'
},
{
label = 'BNF',
property = 268,
section = 1,
prefix = '[[Bibliothèque nationale de France|BNF]]',
valid = 'validateBNF',
link = 'https://catalogue.bnf.fr/ark:/12148/cb$1'
},
{
label = 'BPN',
property = 651,
section = 1,
prefix = '[[BPN]]',
patterns = {'%d%d%d%d%d%d%d%d', '0?%d%d%d%d%d%d%d', '0?0?%d%d%d%d%d%d'},
link = 'http://www.biografischportaal.nl/en/persoon/$1'
},
{
label = 'GND',
property = 227,
section = 1,
prefix = '[[Gemeinsame Normdatei|GND]]',
patterns = {'1[0123]?%d%d%d%d%d%d%d[0-9X]', '[47]%d%d%d%d%d%d%-%d', '[1-9]%d?%d?%d?%d?%d?%d?%d?%-[0-9X]', '3%d%d%d%d%d%d%d[0-9X]'},
link = 'https://d-nb.info/gnd/$1'
},
{
label = 'LCCN',
property = 244,
section = 1,
prefix = '[[LCCN]]',
pattern = '%l%l?%d%d%d%d%d%d%d%d%d?%d?',
link = 'https://id.loc.gov/authorities/$1'
},
{
label = 'VIAF',
property = 214,
section = 1,
prefix = '[[VIAF]]',
patterns = {'[1-9]%d%d?%d?%d?%d?%d?%d?%d?', '[1-9]%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d?%d?%d?'},
link = 'https://viaf.org/en/viaf/$1'
},
{
label = 'ISNI',
property = 213,
section = 1,
prefix = '[[ISNI]]',
valid = 'validateIsni',
link = 'https://isni.org/isni/$1'
},
{
label = 'ORCID',
property = 496,
section = 1,
prefix = '[[ORCID]]',
valid = 'validateOrcid',
link = 'https://orcid.org/$1'
},
{
label = 'SELIBR',
property = 906,
section = 1,
prefix = '[[LIBRIS|SELIBR]]',
pattern = '[1-9]%d%d%d%d%d?',
link = 'https://libris.kb.se/auth/$1'
},
{
label = 'SUDOC',
property = 269,
section = 1,
prefix = '[[SUDOC]]',
pattern = '%d%d%d%d%d%d%d%d[%dxX]',
link = 'https://www.idref.fr/$1'
},
{
label = 'RID',
property = 1053,
section = 1,
prefix = '[[ResearcherID]]',
patterns = {'[A-Z][A-Z]?[A-Z]?%-%d%d%d%d%-19%d%d', '[A-Z][A-Z]?[A-Z]?%-%d%d%d%d%-20%d%d'},
link = 'https://www.researcherid.com/rid/$1'
},
{
label = 'BIBSYS',
property = 1015,
section = 1,
prefix = '[[BIBSYS]]',
patterns = {'[1-9]%d?%d?%d?%d?%d?%d?%d?%d?', '[1-9]%d%d%d%d%d%d%d%d%d%d%d%d'},
link = 'https://authority.bibsys.no/authority/rest/authorities/html/$1'
},
{
label = 'ULAN',
property = 245,
section = 1,
prefix = '[[Union List of Artist Names|ULAN]]',
pattern = '500%d%d%d%d%d%d',
link = 'https://www.getty.edu/vow/ULANFullDisplay?find=&role=&nation=&subjectid=$1'
},
{
label = 'NLA',
property = 409,
section = 1,
prefix = '[[National Library of Australia|NLA]]',
pattern = '[1-9]%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?',
link = 'https://nla.gov.au/anbd.aut-an$1'
},
{
label = 'NDL',
property = 349,
section = 1,
prefix = '[[National Diet Library|NDL]]',
patterns = {'a1%d?%d%d%d%d%d%d%d%d', 's?%d?%d%d%d%d%d%d%d%d'},
link = 'https://id.ndl.go.jp/auth/ndlna/$1'
},
{
label = 'NCL',
property = 1048,
section = 1,
pattern = '%d+',
link = 'http://aleweb.ncl.edu.tw/F/?func=accref&acc_sequence=$1&CON_LNG=ENG'
},
{
label = 'NKC',
property = 691,
section = 1,
prefix = '[[Biblioteca Nacional de la República Txeca|NKC]]',
pattern = '[a-z][a-z][a-z]?[a-z]?%d%d%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?',
link = 'https://aleph.nkp.cz/F/?func=find-c&local_base=aut&ccl_term=ica=$1&CON_LNG=ENG'
},
{
label = 'RLS',
property = 947,
section = 1,
prefix = '[[Russian State Library|RLS]]',
pattern = '%d%d?%d?%d?%d?%d?%d?%d?%d?',
link = 'http://aleph.rsl.ru/F?func=find-b&find_code=SYS&adjacent=Y&local_base=RSL11&request=$1&CON_LNG=ENG'
},
{
label = 'SBN',
property = 396,
section = 1,
prefix = '[[Istituto Centrale per il Catalogo Unico|ICCU]]',
pattern = '%u%u[%u0-3]V%d%d%d%d%d%d',
link = 'https://opac.sbn.it/nome/$1'
},
-- Bases d'informació en català
{
label = 'DBD',
property = 2498,
section = 2,
prefix = '[[Diccionari de Dones|DBD]]',
pattern = '[1-9]%d?%d?%d?',
link = 'https://dbd.vives.org/fitxa_biografies.php?id=$1'
},
{
label = 'DLC',
property = 7357,
section = 2,
prefix = '[[Diccionari de la Literatura Catalana (Gran Enciclopèdia Catalana)|DLC]]',
pattern = '[1-9]%d?%d?%d?%d?%d?',
link = 'https://www.enciclopedia.cat/ec-dlc-$1.xml'
},
{
label = 'EEC',
property = 5513,
section = 2,
prefix = '[[EEC]]',
pattern = '[1-9]%d?%d?%d?%d?',
link = 'https://www.enciclopedia.cat/EC-EEC-$1.xml'
},
{
label = 'GEC',
property = 12385,
section = 2,
prefix = '[[GEC]]',
link = 'https://www.enciclopedia.cat/gran-enciclopedia-catalana/$1'
},
{
label = 'GEMUS',
property = 6412,
section = 2,
prefix = '[[Gran Enciclopèdia de la Música|GEMUS]]',
pattern = '[1-9]%d?%d?%d?%d?',
link = 'https://www.enciclopedia.cat/EC-GEM-$1.xml'
},
{
label = 'PC',
property = 12802,
section = 2
},
{
label = 'MPC',
property = 12860,
section = 2,
prefix = '[[Mapes de Patrimoni Cultural|MPC]]'
},
{
label = 'McIEC',
property = 6239,
section = 2,
},
-- Bases d'informació altres
{
label = 'Britannica',
section = 2,
property = 1417,
prefix = '[[Encyclopædia Britannica Online|Britannica]]'
},
{
label = 'Larousse',
section = 2,
property = 6058,
prefix = '[[Enciclopèdia Larousse|Larousse]]'
},
{
label = 'Lur',
section = 2,
property = 10242
},
{
label = 'SNL',
section = 2,
property = 4342,
},
{
label = 'Treccani',
section = 2,
property = 3365,
prefix = '[[Treccani]]'
},
{
label = 'HDS',
property = 902,
section = 2,
prefix = '[[Diccionari Històric de Suïssa|HDS]]',
pattern = '%d%d%d%d%d%d',
link = 'https://hls-dhs-dss.ch/fr/articles/$1'
},
{
label = 'LIR',
property = 886,
section = 2,
prefix = '[[Lexicon Istoric Retic|LIR]]',
pattern = '%d+',
link = 'http://www.e-lir.ch/e-LIR___Lexicon.$1.450.0.html'
},
{
label = 'HH',
section = 2,
property = 13371,
},
{
label = 'Santiebeati',
section = 2,
property = 6126
},
{
label = 'Dialnet',
property = 1607,
section = 2,
prefix = '[[Dialnet]]',
pattern = '[1-9]%d*',
link = 'http://dialnet.unirioja.es/servlet/autor?codigo=$1'
},
{
label = 'GA',
property = 1960,
section = 2,
prefix = '[[Google Acadèmic|GA]]',
pattern = '[%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u][%-_%d%l%u]',
link = 'https://scholar.google.com/citations?user=$1'
},
{
label = 'Europeana',
property = 7704,
section = 2,
prefix = '[[Europeana]]',
valid = 'validateEuropeana',
link = 'https://data.europeana.eu/$1',
category = 'Europeana'
},
{
label = 'MGP',
property = 549,
section = 2,
prefix = '[[MGP]]',
pattern = '%d%d?%d?%d?%d?%d?',
link = 'https://www.mathgenealogy.org/id.php?id=$1'
},
{
label = 'OSM',
property = 402,
section = 2,
prefix = '[[OpenStreetMap|OSM]]',
pattern = '[1-9]%d?%d?%d?%d?%d?%d?%d?%d?%d?',
link = 'https://www.openstreetmap.org/relation/$1'
}
}
-- Configuració de seccions
p.sections = {
[1] = {name = "[[Control d'autoritats|Registres d'autoritat]]"},
[2] = {name = "Bases d'informació"}
}
return p