Modul:Citation: Unterschied zwischen den Versionen

urn pattern
(redundant: +arxiv, +bibcode)
(urn pattern)
Zeile 2: Zeile 2:
local citation = {
local citation = {
suite  = 'Citation',
suite  = 'Citation',
serial = '2022-08-14',
serial = '2022-08-15',
item  = 56159597
item  = 56159597
}
}
Zeile 206: Zeile 206:
if cu.isSet( args.urn ) then
if cu.isSet( args.urn ) then
args.urn = args.urn:gsub( '^urn:', '' )
args.urn = args.urn:gsub( '^urn:', '' )
if not ( args.urn:match( '^nbn:de:.+$' ) or args.urn:match( '^nbn:ch:.+$' ) ) then
if not ( args.urn:match( '^nbn:de:[%w%-:]+%d+%d$' ) or args.urn:match( '^nbn:ch:[%w%-:]+%d+%d$' ) ) then
args.urn = ''
args.urn = ''
table.insert( wrong, 'urn' )
table.insert( wrong, 'urn' )
Zeile 246: Zeile 246:
end
end
if cu.isSet( args.bibcode ) then
if cu.isSet( args.bibcode ) then
args.bibcode = args.bibcode:gsub( '%.', '#b#' ) -- save bibcode dots
args.bibcode = args.bibcode:gsub( '%.', '#b#' ) -- keep bibcode periods (full stops)
end
end


Zeile 271: Zeile 271:
end
end


if checkRedundantParams( args, { 'isbn', 'dnb', 'oclc', 'ol', 'asin' } ) or
if checkRedundantParams( args, { 'isbn', 'dnb', 'urn', 'oclc', 'ol', 'asin' } ) or
checkRedundantParams( args, { 'doi', 'hdl', 'jstor', 'arxiv', 'bibcode' } ) then
checkRedundantParams( args, { 'doi', 'hdl', 'jstor', 'arxiv', 'bibcode' } ) then
cu.addErrorMsg( ci.texts.redundantParams )
cu.addErrorMsg( ci.texts.redundantParams )
Anonymer Benutzer