Modulo:Controllo di autorità/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
rimuovo categoria, non che abbia molto senso
m versione corrente
Riga 13:
return false
end
return string.format( '[https://viaf.org/viaf/%s %s]', id, id ),
string.format( '[https://www.worldcat.org/identities/containsVIAFID/%s %s]', id, id)
end
 
Riga 58 ⟶ 57:
end
return string.format( '[https://opac.sbn.it/opacsbn/opac/iccu/scheda_authority.jsp?bid=%s %s]', id, id )
end
 
local function bneLinkbncfLink( id )
if not tonumber( id ) then
return false
end
return string.format( '[https://thes.bncf.firenze.sbn.it/termine.php?id=%s %s]', id, id )
end
 
local function europeanaLink( id )
if not string.match( id, '^[a-z]+/base/[1-9]%d*$') then
return false
end
return string.format( '[https://wwwdata.worldcateuropeana.org/identities/containsVIAFIDeu/%s %s]', id, id )
end
 
Riga 84 ⟶ 97:
local lccnType = parts[1] ~= 'sh' and 'names' or 'subjects'
id = parts[1] .. parts[2] .. append( parts[3], '0', 6 )
return string.format( '[http://id.loc.gov/authorities/%s/%s %s]', lccnType, id, id )
local worldCatId
end
if parts[1] ~= 'sh' then
 
worldCatId = parts[1] .. parts[2] .. '-' .. parts[3]
local function worldcatLink( id )
end
return string.format( '[httphttps://idwww.locworldcat.govorg/authorities/%sidentities/%s %s]', lccnType, id, id ),
worldCatId and string.format( '[https://www.worldcat.org/identities/lccn-%s %s]', worldCatId, worldCatId)
end
 
Riga 111 ⟶ 123:
end
return string.format( '[https://catalogue.bnf.fr/ark:/12148/%s %s] [https://data.bnf.fr/ark:/12148/%s (data)]', id, id, id )
end
 
local function bneLink( id )
return string.format( '[http://catalogo.bne.es/uhtbin/authoritybrowse.cgi?action=display&authority_id='%s .. id%s] [http://datos.bne.es/resource/%s (data)]', ' ..id, id, .. ']'id )
end
 
Riga 139 ⟶ 155:
return false
end
return string.format( '[https://id.ndl.go.jp/auth/ndlna/%s %s]' .., id .. ' ' .., id .. ']')
end
 
Riga 239 ⟶ 255:
local function uscongressLink( id )
return '[http://bioguide.congress.gov/scripts/biodisplay.pl?index=' .. id .. ' ' .. id .. ']'
end
 
local function bneLink( id )
return '[http://catalogo.bne.es/uhtbin/authoritybrowse.cgi?action=display&authority_id=' .. id .. ' ' .. id .. ']'
end
 
Riga 268 ⟶ 280:
{ 'ISNI', '[[International Standard Name Identifier|ISNI]]', 213, isniLink, lingue = { 'en' } },
{ 'SBN', '[[Servizio bibliotecario nazionale|SBN]]', 396, sbnLink },
{ 'Thesaurus_BNCF', '[[Nuovo soggettario|Thesaurus BNCF]]', 508, bncfLink },
{ 'Europeana', '[[Europeana]]', 7704, europeanaLink },
{ 'LCCN', '[[Library of Congress Control Number|LCCN]]', 244, lccnLink, lingue = { 'en' } },
{ 'ORCID', '[[Open Researcher and Contributor ID|ORCID]]', 496, orcidLink, lingue = { 'en' } },
{ 'GND', '[[Gemeinsame Normdatei|GND]]', 227, gndLink, lingue = { 'de' } },
{ 'BNF', '[[Bibliothèque nationale de France|BNF]]', 268, bnfLink, lingue = { 'fr' } },
--{ 'BNE', '[[Biblioteca nazionale di Spagna|BNE]]', 950, bneLink, lingue = { 'es' } },
{ 'ULAN', '[[Union List of Artist Names|ULAN]]', 245, ulanLink, lingue = { 'en' } },
{ 'NLA', '[[National Library of Australia|NLA]]', 409, nlaLink, lingue = { 'en' } },
Riga 277 ⟶ 292:
{ 'CERL', '[[Consortium of European Research Libraries|CERL]]', 1871, cerlLink },
{ 'NDL', '[[Biblioteca della Dieta nazionale del Giappone|NDL]]', 349, ndlLink, lingue = { 'en', 'ja' } },
{ 'WorldCat_Identities', '[[WorldCat|WorldCat Identities]]', 7859, worldcatLink, lingue = { 'en' } },
--{ 'SELIBR', '[[LIBRIS|SELIBR]]', 906, selibrLink },
--{ 'SUDOC', '[[Système universitaire de documentation|SUDOC]]', 269, sudocLink },
Riga 294 ⟶ 310:
--{ 'NARA-organization', '[[National Archives and Records Administration|NARA]]', 1223, naraorganizationLink },
--{ 'USCongress', '[[Biographical Directory of the United States Congress|US Congress]]', 1157, uscongressLink },
--{ 'BNE', '[[Biblioteca nazionale di Spagna|BNE]]', 950, bneLink },
--{ 'CINII', '[[CiNii]]', 271, ciniiLink },
--{ 'TLS', '[[Theaterlexikon der Schweiz|TLS]]', 0, tlsLink },
Riga 307 ⟶ 322:
local elements, categories = {}, {}
local ret = ''
local styles = 'Modulo:Controllo di autorità/sandbox/styles.css'
 
for _, params in pairs( conf ) do
Riga 313 ⟶ 328:
if val then
local el, cat
local link, worldCatLink = params[4]( val )
if link then
local lingue = params['lingue'] and ( modlingue.lingue( params['lingue'] ) .. ' ' ) or ''
el = string.format( '%s <span class="uid">%s%s</span>', params[2], lingue, link )
cat = string.format( '[[Categoria:Voci con codice %s]]', params[1] )
if worldCatLink then elements.worldCatLink = worldCatLink end
else
el = string.format( '<span class="error">Il valore %s di %s non è valido.</span>', val, params[1] )
Riga 326 ⟶ 340:
table.insert( categories, cat )
end
end
 
if elements.worldCatLink then
table.insert( elements, '[[WorldCat Identities]] ' .. modlingue.lingue({ 'en' }) .. '&nbsp;' .. elements.worldCatLink )
end