Modul:Citation: Unterschied zwischen den Versionen
umgestellt
KKeine Bearbeitungszusammenfassung |
(umgestellt) |
||
| Zeile 719: | Zeile 719: | ||
end | end | ||
-- handle titles | |||
if | if args.type == 'book' or args.type == 'map' or args.type == 'collection' then | ||
insertCOinS( 'rft.title=', args.title ) | |||
if args.type == 'collection' then | |||
insertCOinS( 'rft.atitle=', args.title ) | |||
insertCOinS( 'rft.btitle=', args.collection ) | |||
table.insert( rft, 1, 'rft.genre=bookitem' ) | |||
else | |||
insertCOinS( 'rft.btitle=', args.title ) | |||
table.insert( rft, 1, 'rft.genre=book' ) | |||
end | |||
table.insert( rft, 1, 'rft_val_fmt=' .. mw.uri.encode( 'info:ofi/fmt:kev:mtx:book' ) ) | |||
else -- 'journal', 'newspaper' | |||
insertCOinS( 'rft.title=', args.title ) | |||
insertCOinS( 'rft.atitle=', args.title ) | |||
if args.type == 'journal' then | |||
insertCOinS( 'rft.jtitle=', args.journal ) | |||
else | |||
insertCOinS( 'rft.jtitle=', args.newspaper ) | |||
end | end | ||
table.insert( rft, 1, 'rft.genre=journal' ) | |||
table.insert( rft, 1, 'rft_val_fmt=' .. mw.uri.encode( 'info:ofi/fmt:kev:mtx:journal' ) ) | |||
end | end | ||
if | if #rft > 2 then | ||
if args. | for key, value in pairs( params ) do | ||
if isSet( args[ key ] ) then | |||
if value.COinS and value.COinS ~= 'rft.jtitle' and value.COinS ~= 'rft.title' then | |||
insertCOinS( value.COinS, args[ key ] ) | |||
elseif value.COinS_id and args[ key ] then | |||
table.insert( rft, 'rft_id=' .. | |||
mw.uri.encode( value.COinS_id .. '/' .. args[ key ] ) ) | |||
end | |||
end | end | ||
end | end | ||
table.insert( rft, 1, 'ctx_ver=Z39.88-2004' ) | table.insert( rft, 1, 'ctx_ver=Z39.88-2004' ) | ||
rft = table.concat( rft, '&' ) | rft = table.concat( rft, '&' ) | ||