Changes

Jump to: navigation, search

Module:Authority control

499 bytes added, 7 years ago
update link for bibsys, requested by [[Special:Contributions/50.53.1.33|50.53.1.33]]
local function narapersonLink( id )
return '[httphttps://research.archives.gov/person/' .. id .. ' ' .. id .. ']'
end
local function naraorganizationLink( id )
return '[httphttps://research.archives.gov/organization/' .. id .. ' ' .. id .. ']'
end
return false
end
return '[http://www.culture.gouv.fr/public/mistral/leonore_fr?ACTION=CHERCHER&FIELD_1=COTE&VALUE_1=' .. id .. ' ' .. id .. ']'
end
return false
end
return '[http://opac.sbn.it/opacsbn/opac/iccu/scheda_authority.jsp?bid=' .. id .. ' ' .. id .. ']'.. getCatForId( 'SBN' )
end
return false
end
return '[httphttps://www.idref.fr/' .. id .. ' ' .. id .. ']'
end
return false
end
return '[http://isni-url.oclc.nlorg/isni/' .. id .. ' ' .. id:sub( 1, 4 ) .. ' ' .. id:sub( 5, 8 ) .. ' ' .. id:sub( 9, 12 ) .. ' ' .. id:sub( 13, 16 ) .. ']' .. getCatForId( 'ISNI' )
end
end
id = id:sub( 1, 4 ) .. '-' .. id:sub( 5, 8 ) .. '-' .. id:sub( 9, 12 ) .. '-' .. id:sub( 13, 16 )
return '[httphttps://orcid.org/' .. id .. ' ' .. id .. ']' .. getCatForId( 'ORCID' )
end
local function bibsysLink( id )
return '[httphttps://askauthority.bibsys.no/askauthority/actionrest/authorities/html/result?cmd=&kilde=biblio&cql=bs.autid+%3D+' .. id .. '&feltselect=bs.autid ' .. id .. ']' .. getCatForId( 'BIBSYS' )
end
return ids
end
for _, statement in pairs( item.claims[:getBestStatements( property] )) do
if statement.mainsnak.datavalue then
table.insert( ids, statement.mainsnak.datavalue.value )
if link then
if withUid then
return '* <span style="white-space:nowrap;">' .. label .. ' <span class="uid">' .. link .. '</span></span>\n'
else
return '* <span style="white-space:nowrap;">' .. label .. ' ' .. link .. '</span>\n'
end
else
{ 'GND', '[[Integrated Authority File|GND]]', 227, gndLink },
{ 'SELIBR', '[[LIBRIS|SELIBR]]', 906, selibrLink },
{ 'SUDOC', '[[Système universitaire de documentation|SUDOC]]', 269, sudocLink },
{ 'BNF', '[[Bibliothèque nationale de France|BNF]]', 268, bnfLink },
{ 'BPN', '[[Biografisch Portaal|BPN]]', 651, bpnLink },
{ 'LIR', '[[Historical Dictionary of Switzerland#Lexicon_Istoric_Retic|LIR]]', 886, lirLink },
{ 'MBA', '[[MusicBrainz]]', 434, mbLink },
{ 'MGP', '[[Mathematics Genealogy Project|MGP]]', 549, mgpLink },
{ 'NLA', '[[National Library of Australia|NLA]]', 409, nlaLink },
{ 'NDL', '[[National Diet Library|NDL]]', 349, ndlLink },
{ 'NCL', '[[National Central Library|NCL]]', 1048, nclLink },
{ 'NKC', '[[National Library of the Czech Republic|NKC]]', 691, nkcLink },
{ 'Léonore', '[[:fr:Base Léonore|Léonore]]', 640, leonoreLink }, { 'SBN', '[[Istituto Centrale per il Catalogo Unico|ICCU]]', 396, sbnLink },
{ 'RLS', '[[Russian State Library|RLS]]', 947, rslLink },
{ 'Botanist', '[[Author citation (botany)|Botanist]]', 428, botanistLink },
--Worldcat
if parentArgs['WORLDCATID'] and parentArgs['WORLDCATID'] ~= '' then
table.insert( elements, createRow( 'WORLDCATID', '', parentArgs['WORLDCATID'], '[//www.worldcat.org/identities/' .. parentArgs['WORLDCATID'] .. ' WorldCatIdentities]', false ) ) --Validation? elseif parentArgs['VIAF'] and string.match( parentArgs['VIAF'], '^%d+$' ) then -- Hackishly copy the validation code; this should go away when we move to using P1793 and P1630 table.insert( elements, createRow( 'VIAF', '', parentArgs['VIAF'], '[//www.worldcat.org/identities/containsVIAFID/' .. parentArgs['VIAF'] .. ' WorldCat Identities]', false ) )
elseif parentArgs['LCCN'] and parentArgs['LCCN'] ~= '' then
local lccnParts = splitLccn( parentArgs['LCCN'] )
if lccnParts and lccnParts[1] ~= 'sh' then table.insert( elements, createRow( 'LCCN', '', parentArgs['LCCN'], '[//www.worldcat.org/identities/lccn-' .. lccnParts[1] .. lccnParts[2] .. '-' .. lccnParts[3] .. ' WorldCatIdentities]', false ) )
end
end
name = 'Authority control',
bodyclass = 'hlist',
group1 = '[[Help:Authority control|Authority control]]' .. elementscats,
list1 = table.concat( elements )
} )
Anonymous user