Importer, Bürokraten, Moderatoren (CommentStreams), Strukturierte-Diskussionen-Bots, Oberflächenadministratoren, Push-Abonnementverwalter, Oversighter, Administratoren, Kampagnenbearbeiter (Hochladeassistent)
855
Bearbeitungen
(journal -> article, extent) |
K (43 Versionen von wikivoyage:Modul:Citation/COinS importiert) |
||
| (5 dazwischenliegende Versionen von einem anderen Benutzer werden nicht angezeigt) | |||
| Zeile 3: | Zeile 3: | ||
suite = 'Citation', | suite = 'Citation', | ||
sub = 'COinS', | sub = 'COinS', | ||
serial = '2022- | serial = '2022-10-21' | ||
} | } | ||
| Zeile 12: | Zeile 12: | ||
-- module import | -- module import | ||
require( ' | -- require( 'strict' ) | ||
local ci = require( 'Module:Citation/i18n' ) | local ci = require( 'Module:Citation/i18n' ) | ||
local cu = require( 'Module:Citation/utilities' ) | local cu = require( 'Module:Citation/utilities' ) | ||
| Zeile 59: | Zeile 59: | ||
-- only first author | -- only first author | ||
args.author = cu.getFirst( args.author or '', ';' ) | args.author = cu.getFirst( args.author or '', ';' ) | ||
local count | local s, count | ||
s, count = args.author:gsub( ',', ',' ) | |||
if count > 1 then | if count > 1 then | ||
args.author = cu.getFirst( args.author, ',' ) | args.author = cu.getFirst( args.author, ',' ) | ||
| Zeile 96: | Zeile 96: | ||
else | else | ||
table.insert( rft, 'rft.genre=book' ) | table.insert( rft, 'rft.genre=book' ) | ||
insertCOinS( 'rft. | insertCOinS( 'rft.btitle', args.title ) | ||
end | end | ||
| Zeile 151: | Zeile 151: | ||
end | end | ||
if rftUrl ~= '' then | if rftUrl ~= '' then | ||
if rftUrl:match( '^//' ) then | |||
rftUrl = 'https:' .. rftUrl | |||
end | |||
table.insert( rft, 'rft_id=' .. mw.uri.encode( rftUrl, 'PATH' ) ) | table.insert( rft, 'rft_id=' .. mw.uri.encode( rftUrl, 'PATH' ) ) | ||
end | end | ||