230
επεξεργασίες
(Νέα σελίδα: require('Module:No globals') local function getCatForId( id ) local title = mw.title.getCurrentTitle() local namespace = title.namespace if namespace == 0 then...) |
Χωρίς σύνοψη επεξεργασίας |
||
local namespace = title.namespace
if namespace == 0 then
return '[[Category:
elseif namespace == 2 and not title.isSubpage then
return '[[Category:Σελίδες χρηστών με αναγνωριστικά ' .. id .. ']]'
local function nlaLink( id )
return '[//nla.gov.au/anbd.aut-an' .. id .. ' ' .. id .. ']' .. getCatForId( 'NLA' )
end
local function rkdartistsLink( id )
return '[https://rkd.nl/en/explore/artists/' .. id .. ' ' .. id .. ']' .. getCatForId( 'RKDartists' )
end
end
for _, statement in pairs( item.claims[property] ) do
table.insert( ids, statement.mainsnak.datavalue.value )
end
end
return ids
--In this order: name of the parameter, label, propertyId in Wikidata, formatting function
local conf = {
{ 'VIAF', '[[
{ 'LCCN', '[[
{ 'ISNI', '[[International Standard Name Identifier|ISNI]]', 213, isniLink },
{ 'ORCID', '[[ORCID]]', 496, orcidLink },
{ 'SELIBR', '[[LIBRIS|SELIBR]]', 906, selibrLink },
{ 'SUDOC', '[[Système universitaire de documentation|SUDOC]]', 269, sudocLink },
{ 'BNF', '[[
{ 'BPN', '[[Biografisch Portaal|BPN]]', 651, bpnLink },
{ 'RID', '[[ResearcherID]]',
{ 'BIBSYS', '[[BIBSYS]]', 1015, bibsysLink },
{ 'ULAN', '[[Union List of Artist Names|ULAN]]', 245, ulanLink },
{ 'HDS', '[[Historical Dictionary of Switzerland|HDS]]', 902, hlsLink },
{ 'LIR', '[[Historical Dictionary of Switzerland#Lexicon_Istoric_Retic|LIR]]', 886, lirLink },
{ 'MBA', '[[
{ 'MGP', '[[Mathematics Genealogy Project|MGP]]', 549, mgpLink },
{ 'NLA', '[[National Library of Australia|NLA]]', 409, nlaLink },
{ '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 },
{ 'SIKART', '[[SIKART]]', 781, sikartLink },
{ 'KULTURNAV', '[[KulturNav]]', 1248, kulturnavLink },
{ 'RKDartists', '[[Ολλανδικό Ινστιτούτο Ιστορίας της Τέχνης|RKD]]', 650, rkdartistsLink },
}
-- Check that the Wikidata item has this property-->value before adding it
local reqs = {}
local p = {}
--Wikidata fallback if requested
local item = mw.wikibase.
if item ~= nil and item.claims ~= nil then
for _, params in pairs( conf ) do
end
if canUseWikidata then
local wikidataIds = getIdsFromWikidata( item, '
if wikidataIds[1] then
parentArgs[params[1]] = wikidataIds[1]
local Navbox = require('Module:Navbox')
local elementscats = ''
if rct >
elementscats = '[[Category:AC with ' .. rct .. ' elements]]'
end
if #elements ~= 0 then
group1 = 'Σύνδεσμοι σε [[Κατάλογος καθιερωμένων όρων|καταλόγους καθιερωμένων όρων]]' .. elementscats,
else
return ""
end
end
|
επεξεργασίες