FANDOM


-- This module creates a link to an entry at http://opac.sbn.it/ given an
-- SBN code.
 
local p = {}
 
function p._main(code)
	if not code then
		error('no code provided', 2)
	end
	local id1, id2 = code:match('^IT\\ICCU\\(%w+)\\(%d+)$')
	if not id1 or not id2 then
		error(string.format("'%s' is not a valid SBN code", code), 2)
	end
	return string.format(
		'SBN [http://opac.sbn.it/bid/%s%s %s]',
		id1, id2, code
	)
end
 
function p.main(frame)
	local args = require('Module:Arguments').getArgs(frame, {
		wrappers = 'Template:SBN'
	})
	return p._main(args[1])
end
 
return p

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.