Modul:Citation: Unterschied zwischen den Versionen
check asin, ol
(pattern doi) |
(check asin, ol) |
||
| Zeile 159: | Zeile 159: | ||
table.insert( wrong, value ) | table.insert( wrong, value ) | ||
end | end | ||
end | |||
if cu.isSet( args.asin ) then | |||
if args.asin:match("^%d%d%d%d%d%d%d%d%d[%dX]$") then | |||
if not cu.isSet( args.isbn ) and not args.asin:find( '^63[01]' ) and | |||
cx.check_isbn( { args = { [ 1 ] = args.asin, error = 'error' } } ) ~= 'error' then | |||
args.isbn = args.asin | |||
end | |||
args.asin = '' | |||
table.insert( wrong, 'asin' ) | |||
elseif not args.asin:match("^%u[%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u]$") then | |||
args.asin = '' | |||
table.insert( wrong, 'asin' ) | |||
end | |||
end | |||
if cu.isSet( args.ol ) and not args.ol:match('^OL%d+[AMW]$') then | |||
args.ol = '' | |||
table.insert( wrong, 'ol' ) | |||
end | end | ||
| Zeile 317: | Zeile 336: | ||
end | end | ||
if cu.isSet( args.doi ) then | if cu.isSet( args.doi ) then | ||
cu. | cu.insertItem2( tab, cu.encodeHandle( args.doi ), args.doi, ci.formatters.dbDoi ) | ||
end | |||
if cu.isSet( args.hdl ) then | |||
cu.insertItem2( tab, cu.encodeHandle( args.hdl ), args.hdl, ci.formatters.dbHdl ) | |||
end | end | ||
cu.insertItem2( tab, args.jstor, args.jstor, ci.formatters.dbJstor ) | cu.insertItem2( tab, args.jstor, args.jstor, ci.formatters.dbJstor ) | ||