Content deleted Content added
Version: 2021-02-06 sync from sandbox |
Syncing; Version: 2021-02-21 |
||
Line 1:
-- Version: 2021-02-
local p = {}
Line 18:
[3] = "rd",
["default"] = "th"
},
["months"] = {
"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
},
}
Line 95 ⟶ 99:
-- part = {id = "P1545"?, maxvals = 0}, -- to be added to {{citation}} / COinS &rft.part=
title = {id = "P1476", rank="p n"},
pages = {id = "P304", maxvals = 0, populate_from_journal = true},
at = {id = "P958", maxvals = 0, populate_from_journal = true}, -- also incorporate lines (P7421) and columns (P3903) into this (cite map also supports |section=)
Line 440 ⟶ 444:
citeq_args[name] = nil
else
-- record the language found if no lang specified
citeq_args.language = citeq_args.language or qid_languages[1]
end
Line 468 ⟶ 472:
citeq_args.isbn = getValue( {"P957", ps = 1, qid = qid, maxvals = 1, rank="best", citeq_args.isbn } ) -- try ISBN 10 (only one value accepted)
local url
citeq_args.url = getValue( {"P2699", ps = 1, qid = qid, maxvals = 0, citeq_args.url } ) -- try url▼
if not citeq_args.url then
for i, pr in ipairs( {"P953", "P856", "P2699"} ) do
▲
if url then
citeq_args.url = mw.text.split( url, " (", true )[1]
local arcurl = mw.ustring.match( url, "%((.*)%)" )
if arcurl then
local arcy, arcm, arcd = arcurl:match("(20%d%d)%p?(%d%d)%p?(%d%d)")
if arcy and arcm and arcd then
citeq_args["archive-url"] = arcurl
citeq_args["archive-date"] = tonumber(arcd) .. " " .. i18n.months[tonumber(arcm)] .. " " .. arcy
end
end
break
end
end
end
if citeq_args.publisher == "Unknown" then -- look for "stated as" (P1932)
|