Modul:Citace: Porovnání verzí

Smazaný obsah Přidaný obsah
Jvs (diskuse | příspěvky)
oprava chyby ve funkci p.date
Jvs (diskuse | příspěvky)
Podpora pro citaci el. monografie a el. periodika; různé další opravy a úpravy
Řádek 3:
 
function p.trace(c, dbgInfo)
-- print('trace')
table.insert(c.r, "{p." .. dbgInfo.name .. "}")
end
Řádek 9 ⟶ 8:
function p.citaceInit(c)
c.r = {} -- result
c.dbgflags = nil{}
 
if type(c.frame.callParserFunction) == 'function' then
-- running as wiki module
c.localTest = nil
c.trace = nil
local aModule = require('Modul:Arguments')
c.args = aModule.getArgs(c.frame)
c.dbg = nil
p.frame = c.frame -- zmena reseni, 30.12.2017 12:30:06
else
-- running in console
c.localTest = 1
c.trace = nil
c.args = c.frame
-- makety vybranych fci pro lokalni testovani
Řádek 30 ⟶ 25:
}
}
-- debugging options
-- c.noCoins = 1
-- c.trace = 1
-- c.dbg = 1
end
 
Řádek 63 ⟶ 62:
 
c.printAnchor = not p.empty(c.args.ref)
-- TODONOTE: Mozna dodat dalsi parametr pro vypnuti, tj. abychom mohli mit printAnchor, ale ne useHarvardFormat
c.useHarvardFormat = c.printAnchor
 
Řádek 110 ⟶ 109:
end
 
function p.citaceSbornikucitaceElMonografie(frame)
local c = {
frame = frame
}
p.citaceInit(c)
c.type = 'citaceSbornikucitaceElMonografie'
local t = {} -- temp
local i
 
table.insert(c.r, '<cite class="book" style="font-style:normal"')
p.citAnchorId(c)
table.insert(c.r, '>')
p.citAuthors(c, { maxAuthors = 37, honorCorporation = true })
p.citTitle(c)
p.citOtherPersons(c)
table.insert(c.r, ' In: ')
p.citCompilers(c, { maxAuthors = 3, honorCorporation = true})
p.citCompilation(c)
p.citEdition(c)
-- p.citVolume(c)
p.citPlacePublisher(c)
p.citDate(c)
-- p.citNumberOfVolumesPagesAppendices(c)
p.citEdition(c)
p.citChapterPage(c)
p.citNotes(c)
p.citUrl(c)
p.citIsbn(c)
p.citIssn(c)
p.citDoi(c)
-- p.citOclc(c)
p.citId(c)
p.citVolume(c)
p.citChapterPage(c)
p.citLanguage(c)
 
table.insert(c.r, '</cite>')
-- p.citCoinsSbornikcitCoinsMonografie(c)
 
return table.concat(c.r)
end
Řádek 157 ⟶ 156:
p.citAnchorId(c)
table.insert(c.r, '>')
p.citAuthors(c, { maxAuthors = 7, honorCorporation = false })
p.citTitle(c)
p.citOtherPersons(c)
Řádek 163 ⟶ 162:
p.citPeriodical(c)
table.insert(c.r, " ")
p.citPlacePublisher(c)
 
p.citDate(c)
if not p.empty(c.args["místo"]) then
p.citYearNumber(c)
table.insert(c.r, c.args["místo"] .. ": ")
p.citPage(c)
end
 
if not p.empty(c.args["vydavatel"]) then
table.insert(c.r, c.args["vydavatel"])
end
 
t.datum = p.dateCs(c.args)
if c.useHarvardFormat and t.datum == c.args["rok"] then
t.datum = ""
end
 
if not p.empty(t.datum) then
table.insert(c.r, ""
.. (not p.empty(c.args["vydavatel"]) and ", " or "")
.. t.datum
)
end
 
if not p.empty(c.args["ročník"]) then
if not p.empty(t.datum) then
table.insert(c.r, ", " .. (not p.empty(c.args["typ ročníku"]) and c.args["typ ročníku"] or "roč.") )
else
table.insert(c.r, p.upperFirst(not p.empty(c.args["typ ročníku"]) and c.args["typ ročníku"] or "roč.") )
end
table.insert(c.r, " " .. c.args["ročník"] )
end
 
if not p.empty(c.args["číslo"]) then
table.insert(c.r, ""
.. ", "
.. (not p.empty(c.args["typ čísla"]) and c.args["typ čísla"] or "čís.")
.. " "
.. c.args["číslo"]
)
end
 
if not p.empty(c.args["strany"]) then
table.insert(c.r, ""
.. ", s. "
.. c.args["strany"]
)
end
 
table.insert(c.r, ".") -- může se stát, že po periodiku už žádné další údaje nebudou uvedeny, ale pak je ta citace stejně k ničemu
 
p.citNotes(c)
p.citUrl(c)
p.citIssn(c)
p.citIsbn(c)
p.citDoi(c)
p.citPmid(c)
p.citBibcode(c)
p.citArxiv(c)
p.citId(c)
p.citLanguage(c)
 
if not p.empty(c.args["urlperiodikum"]) then
if c.localTest then
t.afterUrl = {}
t.chyba = '{{chyba|Chybí povinný parametr: V šabloně {{šablona|Citace periodika}} je nutno určit zdrojové "<code>periodikum</code>" odkazu!|kategorie=Údržba:Chybná volání citačních šablon|skrytý=skrytý}}'
 
else
if not p.empty(c.args["formát"]) then
t.chyba = c.frame:expandTemplate{title = 'chyba', args = {
table.insert(t.afterUrl, c.args["formát"])
'Chybí povinný parametr: V šabloně '
.. c.frame:expandTemplate{title = 'šablona', args = {'Citace periodika'}}
.. ' je nutno určit zdrojové "<code>periodikum</code>" odkazu!',
['kategorie'] = 'Údržba:Chybná volání citačních šablon',
['skrytý'] = 'skrytý'
}}
end
table.insert(c.r, t.chyba)
end;
 
table.insert(c.r, '</cite>')
if not p.empty(c.args["datum přístupu"]) then
p.citCoinsPeriodikum(c)
table.insert(t.afterUrl, "cit. " .. c.args["datum přístupu"])
return table.concat(c.r)
elseif not p.empty(c.args["rok přístupu"]) then
end
table.insert(t.afterUrl, "cit. " .. c.args["rok přístupu"]
.. (not p.empty(c.args["měsíc přístupu"])
and "-" .. c.args["měsíc přístupu"] .. (not p.empty(c.args["den přístupu"]) and "-" .. c.args["den přístupu"] or "")
or ""
))
;
end
 
function p.citaceElPeriodika(frame)
t.afterUrlStr = table.concat(t.afterUrl, ", ");
local c = {
if t.afterUrlStr ~= "" then
frame = frame
t.afterUrlStr = " " .. p.nowiki(c, "[") .. t.afterUrlStr .. "]"
end}
p.citaceInit(c)
 
c.type = 'citaceElPeriodika'
table.insert(c.r, ""
local t = {} -- temp
.. " [" .. c.args["url"] .. " Dostupné online]"
local i
.. t.afterUrlStr
.. "."
)
end
 
if not p.empty(c.args["url alt"]) then
table.insert(c.r, " [" .. c.args["url alt"] .. " (Alternativní odkaz)]")
end;
 
table.insert(c.r, '<cite style="font-style:normal"')
p.citAnchorId(c)
table.insert(c.r, '>')
p.citAuthors(c, { maxAuthors = 7, honorCorporation = false })
p.citTitle(c)
p.citOtherPersons(c)
table.insert(c.r, " ")
p.citPeriodical(c)
table.insert(c.r, " ")
p.citPlacePublisher(c)
p.citDate(c)
p.citYearNumber(c)
p.citPage(c)
-- table.insert(c.r, ".")
p.citNotes(c)
p.citUrl(c)
p.citIssn(c)
p.citIsbn(c)
Řádek 271 ⟶ 247:
table.insert(c.r, '</cite>')
p.citCoinsPeriodikum(c)
return table.concat(c.r)
end
 
function p.citaceSborniku(frame)
local c = {
frame = frame
}
p.citaceInit(c)
c.type = 'citaceSborniku'
local t = {}
local i
 
table.insert(c.r, '<cite style="font-style:normal"')
p.citAnchorId(c)
table.insert(c.r, '>')
p.citAuthors(c, { maxAuthors = 3, honorCorporation = true })
p.citTitle(c)
table.insert(c.r, ' In: ')
p.citCompilers(c, { maxAuthors = 3, honorCorporation = true })
p.citCompilation(c)
p.citEdition(c)
p.citPlacePublisher(c)
p.citDate(c)
p.citNotes(c)
p.citUrl(c)
p.citIsbn(c)
p.citIssn(c)
p.citDoi(c)
p.citId(c)
p.citVolume(c)
p.citChapterPage(c)
p.citLanguage(c)
table.insert(c.r, '</cite>')
-- p.citCoinsSbornik(c)
 
return table.concat(c.r)
end
Řádek 276 ⟶ 287:
function p.debug(frame)
 
--[[
if frame.callParserFunction ~= nil and type(callParserFunction) == 'function' then
local aModule = require('Modul:Arguments')
local args = aModule.getArgs(frame)
end
--]]
 
-- local a = '';
Řádek 298 ⟶ 311:
function p.nowiki(c, txt)
if type(c.frame.extensionTag) == 'function' then
return c.frame:extensionTag('nowiki', (txt == nil and txt or ''), {})
else
if not p.empty(txt) then
Řádek 313 ⟶ 326:
 
function p.empty(x)
-- return x == nil or x == 0 or x == ""
return x == nil or x == ""
end
 
-- vrátí první neprázdný argument
function p.coalesce(x, y)
return ((x and x ~= nil"") and x or ((y and y ~= nil"") and y or ""))
end
 
function p.coalesceN(len, args)
for i = 1, len do
local v = args[i]
if v ~= nil and v ~= "" then
return v
end
end
return ""
end
 
Řádek 358 ⟶ 383:
-- return "<span style='text-transform: uppercase'>" .. s .. "</span>"
if p.frame then
-- return p.frame:callParserFunction('uc', s)
return mw.ustring.upper(s)
else
return s:upper()
Řádek 369 ⟶ 395:
 
function p.wikilink(odkaz, popis)
if odkaz ~= nil andnot p.empty(odkaz ~= "") then
returnif "[["not p.. odkaz .. "|" .. empty(popis) .. "]]"then
return "[[" .. odkaz .. "|" .. popis .. "]]"
else
return "[[" .. odkaz .. "]]"
end
else
return popis
Řádek 377 ⟶ 407:
 
function p.wikiextlink(odkaz, popis)
if odkaz ~= nil andnot p.empty(odkaz ~= "") then
returnif "["not p.. odkaz .. " " .. empty(popis) .. "]"then
return "[" .. odkaz .. " " .. popis .. "]"
else
return "[" .. odkaz .. "]"
end
else
return popis
Řádek 607 ⟶ 641:
.. p.nowiki(c) .. "''"
.. (not p.empty(c.args["titul původní"]) and " (původním názvem: ''" .. p.nowiki(c) .. c.args["titul původní"] .. p.nowiki(c) .. "'')" or "")
.. "."
)
elseif c.type == 'citaceElMonografie' then
table.insert(c.r, ""
.. "''" .. p.nowiki(c)
.. p.wikilink(c.args["odkaz na titul"], c.args["titul"])
.. p.nowiki(c) .. "''"
.. " [" .. p.coalesceN(3, { c.args["druh nosiče"], c.args["formát"], "online" }) .. "]"
.. "."
)
Řádek 621 ⟶ 663:
if c.trace then p.trace(c, debug.getinfo(1, "n")) end
if not p.empty(c.args["sborník"]) then
table.insert(c.r, " ")
table.insert(c.r, ""
.. "''" .. p.nowiki(c)
.. p.wikilink(c.args["odkaz na sborník"], c.args["sborník"])
Řádek 634 ⟶ 675:
if c.trace then p.trace(c, debug.getinfo(1, "n")) end
if not p.empty(c.args["periodikum"]) then
table.insert(c.r, " "
.. "''" .. p.nowiki(c)
.. p.wikilink(c.args["odkaz na periodikum"], c.args["periodikum"])
.. p.nowiki(c) .. "''."
.. (c.type == "citaceElPeriodika"
and " " .. p.nowiki(c, "[") .. p.coalesceN(3, { c.args["druh nosiče"], c.args["formát"], "online" }) .. p.nowiki(c, "]")
or ""
)
.. "."
)
else
Řádek 665 ⟶ 711:
end
 
-- dle ISO 690 platne od dubna 2011 uz neni vyzadovana mezera pred ":"
function p.citPlacePublisher(c)
if c.trace then p.trace(c, debug.getinfo(1, "n")) end
if c.type == 'citacePeriodika' or c.type == 'citaceElMonografie' or c.type == 'citaceElPeriodika' then
table.insert(c.r, ""
table.insert(c.r, ""
.. " " .. (not p.empty(c.args["místo"]) and " " .. c.args["místo"] .. ": " or "[s.l.]")
.. ": " .. (not p.empty(c.args["vydavatel"]) and p.wikilink(c.args["odkaz na vydavatele"], c.args["vydavatel"]) or "[s.n.]")
-- dle ISO 690 platne od)
dubna 2011else
table.insert(c.r, ""
)
.. " " .. (not p.empty(c.args["místo"]) and c.args["místo"] or "[s.l.]")
.. ": " .. (not p.empty(c.args["vydavatel"]) and p.wikilink(c.args["odkaz na vydavatele"], c.args["vydavatel"]) or "[s.n.]")
)
end
end
 
-- NOTE: SloNeprehledny bykod. Pokud mozno zjednodusit?, pripadne take sjednotit format data.
function p.citDate(c)
if c.trace then p.trace(c, debug.getinfo(1, "n")) end
local t = {}
t.datum = p.date(c.args)
 
if c.useHarvardFormattype and== t'citaceElMonografie' or c.datumtype == c.args["rok"]'citaceElPeriodika' then
if not p.empty(c.args["vydavatel"]) then
t.datum = ""
t.finalDot = true;
end
 
if t.datum ~=if not p.empty(c.args["datum"]) then
t.finalDot = true;
table.insert(c.r, ", " .. t.datum)
table.insert(c.r, ""
elseif not p.empty(c.args["rok copyrightu"]) then
table.insert(c.r, ", c" .. (not p.empty(c.args["rok copyrightuvydavatel"]) and ", " or "")
.. c.args["datum"]
)
end
 
if not p.empty(c.args["datum aktualizace"]) then
t.finalDot = true;
if not p.empty(c.args["vydavatel"]) or not p.empty(c.args["datum"]) then
table.insert(c.r, ", " .. p.coalesce(c.args["typ aktualizace"], "rev."))
elseif not p.empty(c.args["místo"]) then
table.insert(c.r, " " .. p.coalesce(c.args["typ aktualizace"], "rev."))
else
table.insert(c.r, " " .. p.upperFirst(p.coalesce(c.args["typ aktualizace"], "rev.")))
end
table.insert(c.r, " " .. c.args["datum aktualizace"])
end
 
if not p.empty(c.args["datum přístupu"]) then
t.finalDot = true;
if not p.empty(c.args["vydavatel"]) or not p.empty(c.args["datum"]) or not p.empty(c.args["datum aktualizace"]) then
-- table.insert(c.r, ", ") -- TODO ???
table.insert(c.r, " ")
end
table.insert(c.r, "[cit. " .. c.args["datum přístupu"] .. "]");
-- TODO: {{#time: Y-m-d|{{{datum přístupu|{{{datum_přístupu}}}}}}}}] -- callParserFunction ??? // Celkove sjednotit zpracovani datumu
end
 
if (t.finalDot) then
table.insert(c.r, ". ")
end
elseif c.type == "citacePeriodika" then
t.datum = p.dateCs(c.args)
if c.useHarvardFormat and t.datum == c.args["rok"] then
t.datum = ""
end
if not p.empty(t.datum) then
c.flags.isDatum = true
table.insert(c.r, ""
.. (not p.empty(c.args["vydavatel"]) and ", " or "")
.. t.datum
)
end
else
t.datum = p.date(c.args)
 
if c.useHarvardFormat and t.datum == c.args["rok"] then
t.datum = ""
t.finalDot = true
end
 
if t.datum ~= "" then
table.insert(c.r, ", " .. t.datum)
elseif not p.empty(c.args["rok copyrightu"]) then
table.insert(c.r, ", c" .. c.args["rok copyrightu"])
end
 
if not p.empty(c.args["rok tisku"]) then
if not p.empty(c.args["rok"]) or not p.empty(c.args["rok copyrightu"]) then
table.insert(c.r, " (")
else
table.insert(c.r, ", ")
end
table.insert(c.r, p.date(c.args, { postfix = " tisku" }) .. " tisk")
if not p.empty(c.args["rok"]) or not p.empty(c.args["rok copyrightu"]) then
table.insert(c.r, ")")
end
end
 
if t.datum ~= "" or not p.empty(c.args["rok tisku"]) or t.finalDot then
table.insert(c.r, ".")
end
end
end
 
function p.citYearNumber(c)
if not p.empty(c.args["rok tisku"]) then
if c.trace then p.trace(c, debug.getinfo(1, "n")) end
if not p.empty(c.args["rok"]) or not p.empty(c.args["rok copyrightu"]) then
if not tablep.insertempty(c.r, args[" (ročník"]) then
if c.flags.isDatum then
table.insert(c.r, ", " .. (not p.empty(c.args["typ ročníku"]) and c.args["typ ročníku"] or "roč.") )
else
table.insert(c.r, ", " .. p.upperFirst(not p.empty(c.args["typ ročníku"]) and c.args["typ ročníku"] or "roč."))
end
table.insert(c.r, p.date(c.args, { postfix = " tisku" }) .. " tisk")
if not p.empty(c.args["rok"]) or not p.empty(c.args["rok copyrightu"]) then
table.insert(c.r, ")")
end
table.insert(c.r, " " .. c.args["ročník"] )
end
 
if t.datum ~= "" or not p.empty(c.args["rok tiskučíslo"]) or t.finalDot then
table.insert(c.r, ".")
.. ", "
.. (not p.empty(c.args["typ čísla"]) and c.args["typ čísla"] or "čís.")
.. " "
.. c.args["číslo"]
)
end
end
 
function p.citPage(c)
if c.trace then p.trace(c, debug.getinfo(1, "n")) end
if not p.empty(c.args["strany"]) then
table.insert(c.r, ""
.. ", s. "
.. c.args["strany"]
)
end
end
Řádek 718 ⟶ 856:
;
end;
 
table.insert(c.r, t.kapitola)
 
if not p.empty(c.args["strany"]) then
if c.type == 'citaceElMonografie' or c.type == 'citaceElPeriodika' then
table.insert(c.r, ""
-- TODO: postupne prodluzujici se testy OR se daji osetrit i elegantneji - pomocnou promennou
.. (not p.empty(t.kapitola) and ", s" or " S")
if not p.empty(c. args[".&nbsp;číslování"]) then
table.insert(c.r, (not p.empty(t.kapitola) and ", " .. c.args["číslování"] or " " .. p.upperFirst(c.args["číslování"])))
.. c.args["strany"]
.. "."end
if not p.empty(c.args["strany"]) then
);
table.insert(c.r, ""
.. ((not p.empty(c.args["kapitola"]) or not p.empty(c.args["číslování"])) and ", s" or " S")
.. ".&nbsp;"
.. c.args["strany"]
);
end
if not p.empty(c.args["lokace"]) then
table.insert(c.r, ""
.. ((not p.empty(c.args["kapitola"]) or not p.empty(c.args["číslování"]) or not p.empty(c.args["strany"]))
and ", " .. c.args["lokace"]
or " " .. p.upperFirst(c.args["lokace"])
)
);
end
if (not p.empty(c.args["kapitola"]) or not p.empty(c.args["číslování"]) or not p.empty(c.args["strany"]) or not p.empty(c.args["lokace"])) then
table.insert(c.r, ".")
end
else
if not p.empty(c.args["strany"]) then
table.insert(c.r, ""
.. (not p.empty(c.args["kapitola"]) and ", s" or " S")
.. ".&nbsp;"
.. c.args["strany"]
.. "."
);
end
end
end
Řádek 783 ⟶ 946:
function p.citUrl(c)
if c.trace then p.trace(c, debug.getinfo(1, "n")) end
 
if not p.empty(c.args["url"]) then
if c.type == 'citacePeriodika' then
table.insert(c.r, " "
if not p.empty(c.args["url"]) then
.. p.wikiextlink(c.args["url"], (c.args["dostupnost"] ~= nil and c.args["dostupnost"] or "Dostupné online") .. ".")
t.afterUrl = {}
)
 
if not p.empty(c.args["formát"]) then
table.insert(t.afterUrl, c.args["formát"])
end
 
if not p.empty(c.args["datum přístupu"]) then
table.insert(t.afterUrl, "cit. " .. c.args["datum přístupu"])
elseif not p.empty(c.args["rok přístupu"]) then
table.insert(t.afterUrl, "cit. " .. c.args["rok přístupu"]
.. (not p.empty(c.args["měsíc přístupu"])
and "-" .. c.args["měsíc přístupu"] .. (not p.empty(c.args["den přístupu"]) and "-" .. c.args["den přístupu"] or "")
or ""
))
;
end
 
t.afterUrlStr = table.concat(t.afterUrl, ", ");
if t.afterUrlStr ~= "" then
t.afterUrlStr = " " .. p.nowiki(c, "[") .. t.afterUrlStr .. "]"
end
 
table.insert(c.r, ""
.. " [" .. c.args["url"] .. " Dostupné online]"
.. t.afterUrlStr
.. "."
)
end
if not p.empty(c.args["url alt"]) then
table.insert(c.r, " [" .. c.args["url alt"] .. " (Alternativní odkaz)]")
end
else
if not p.empty(c.args["url"]) then
table.insert(c.r, " "
.. p.wikiextlink(c.args["url"], p.coalesce(c.args["dostupnost"], "Dostupné online"))
.. "."
)
end
end
 
if c.type == 'citaceElMonografie' or c.type == 'citaceElPeriodika' then
if not p.empty(c.args["url2"]) then
table.insert(c.r, " "
.. p.coalesce(c.args["dostupnost2"], "Dostupné také na: ")
.. p.wikiextlink(c.args["url2"])
.. "."
)
end
if not p.empty(c.args["url3"]) then
table.insert(c.r, " "
.. p.coalesce(c.args["dostupnost3"], "Dále dostupné na: ")
.. p.wikiextlink(c.args["url3"])
.. "."
)
end
end
end
Řádek 837 ⟶ 1 054:
if not p.empty(c.args["pmid"]) then
table.insert(c.r, " PMID " .. c.args["pmid"] .. ".")
end;
end
 
function p.citBibcode(c)
if c.trace then p.trace(c, debug.getinfo(1, "n")) end
if not p.empty(c.args["bibcode"]) then
table.insert(c.r, " [[Bibcode]]: [http://adsabs.harvard.edu/abs/" .. mw.uri.encode(c.args["bibcode"]) .. c.args["bibcode"] .. "].")
end;
end
 
function p.citArxiv(c)
if c.trace then p.trace(c, debug.getinfo(1, "n")) end
if not p.empty(c.args["arxiv"]) then
table.insert(c.r, " [[arXiv]]: [http://arxiv.org/abs/" .. mw.uri.encode(c.args["arxiv"]) .. c.args["arxiv"] .. "].")
end;
end
Řádek 868 ⟶ 1 099:
 
function p.citCoinsMonografie(c)
if c.noCoins then return end
if c.trace then p.trace(c, debug.getinfo(1, "n")) end
local t = {}
if c.type == 'citaceElMonografie' then
t.coins = 'ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rfr_id=info:sid/cs.wikipedia.org:templatecitacemonografie'
t.tplName = 'citaceelmonografie'
else
t.tplName = 'citacemonografie'
end
t.coins = 'ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rfr_id=info:sid/cs.wikipedia.org:template' .. t.tplName
.. '&rft.btitle=' .. mw.uri.encode(p.coalesce(c.args["titul"]))
.. (not p.empty(c.args["doi"]) and "&rft_id=info:doi/" .. mw.uri.encode(c.args["doi"]) or "")
Řádek 901 ⟶ 1 138:
 
function p.citCoinsPeriodikum(c)
if c.noCoins then return end
if c.trace then p.trace(c, debug.getinfo(1, "n")) end
local t = {}
if c.type == 'citaceElPeriodika' then
t.coins = 'ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rfr_id=info:sid/cs.wikipedia.org:templatecitaceperiodika'
t.tplName = 'citaceelperiodika'
else
t.tplName = 'citaceperiodika'
end
t.coins = 'ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rfr_id=info:sid/cs.wikipedia.org:template' .. t.tplName
.. '&rft.jtitle=' .. mw.uri.encode(p.coalesce(c.args["periodikum"]))
.. (not p.empty(c.args["doi"]) and "&rft_id=info:doi/" .. mw.uri.encode(c.args["doi"]) or "")