Changes
Jump to navigation
Jump to search
+ lccn
end
function lccnLink( id )
cleanedId = ''
if string.match( id, '^%l%l?%l?/%d%d%d?%d?/%d%d%d%d%d%d$' ) then
cleanedId = string.gsub( id, '(%l+)/(%d+)/(%d+)$' , '%1%2%3' )
end
if string.match( id, '^%%l%l?%l?%d%d%d%d%d%d%d%d%d?%d?$' ) then
cleanedId = id
end
if cleanedId == '' then
return false
end
return '[http://id.loc.gov/authorities/names/' .. cleanedId .. ' ' .. cleanedId .. ']'
end
--In this order: name of the parameter, label, propertyId in Wikidata, formattting function
local conf = {
{ 'VIAF', '[[Virtual International Authority File|VIAF]]', 0, viafLink }, { 'LCCN', '[[Library of Congress Control Number|LCCN]]', 0, lccnLink }
}