Changes

Jump to navigation Jump to search

Module:Authority control

120 bytes removed, 18:25, 10 April 2013
m
cosmetic changes
function splitLccn( id )
if string.id:match( id, '^%l%l?%l?%d%d%d%d%d%d%d%d%d?%d?$' ) then id = string.id:gsub( id, '^(%l+)(%d+)(%d%d%d%d%d%d)$', '%1/%2/%3' )
end
if string.id:match( id, '^%l%l?%l?/%d%d%d?%d?/%d+$' ) then
return mw.text.split( id, '/' )
end
function append(str, c, length)
while string.str:len( str ) < length do
str = c .. str
end
return false
end
return '[http://isni-url.oclc.nl/isni/' .. id .. ' ' .. string.id:sub( id, 1, 4 ) .. ' ' .. string.id:sub( id, 5, 8 ) .. ' ' .. string.id:sub( id, 9, 12 ) .. ' ' .. string.id:sub( id, 13, 16 ) .. ']' .. getCatForId( 'ISNI' )
end
--See http://support.orcid.org/knowledgebase/articles/116780-structure-of-the-orcid-identifier
function validateIsni( id )
id = string.upper( string.id:gsub( id, '[ %-]', '' ) :upper() if not string.id:match( id, '^%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d[%dX]$' ) then
return false
end
return false
end
id = string.id:sub( id, 1, 4 ) .. '-' .. string.id:sub( id, 5, 8 ) .. '-' .. string.id:sub( id, 9, 12 ) .. '-' .. string.id:sub( id, 13, 16 )
return '[http://orcid.org/' .. id .. ' ' .. id .. ']' .. getCatForId( 'ORCID' )
end
Anonymous user

Navigation menu