Thesis and retracted support sync from sandbox, 1 September 2026
This commit is contained in:
parent
6df6071a72
commit
fbc531998a
2 changed files with 48 additions and 6 deletions
|
|
@ -427,6 +427,19 @@ local function _cite_q (citeq_args)
|
||||||
if stated_as then citeq_args.publisher = stated_as end
|
if stated_as then citeq_args.publisher = stated_as end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Handle thesis args - degree, supervising institution
|
||||||
|
local is_thesis = false
|
||||||
|
if citeq_args.thesis_degree then
|
||||||
|
is_thesis = true
|
||||||
|
citeq_args.degree = citeq_args.thesis_degree
|
||||||
|
citeq_args.thesis_degree = nil
|
||||||
|
end
|
||||||
|
if citeq_args.thesis_submitted_to then
|
||||||
|
is_thesis = true
|
||||||
|
citeq_args.publisher = citeq_args.thesis_submitted_to
|
||||||
|
citeq_args.thesis_submitted_to = nil
|
||||||
|
end
|
||||||
|
|
||||||
if not titleforced then
|
if not titleforced then
|
||||||
-- Handle subtitle.
|
-- Handle subtitle.
|
||||||
if citeq_args.title then
|
if citeq_args.title then
|
||||||
|
|
@ -578,6 +591,8 @@ local function _cite_q (citeq_args)
|
||||||
citeq_args.asin = nil -- suppress ASIN if ISBN exists
|
citeq_args.asin = nil -- suppress ASIN if ISBN exists
|
||||||
elseif citeq_args.journal then
|
elseif citeq_args.journal then
|
||||||
template = template or "journal"
|
template = template or "journal"
|
||||||
|
elseif is_thesis then
|
||||||
|
template = template or "thesis"
|
||||||
elseif citeq_args.website then
|
elseif citeq_args.website then
|
||||||
template = template or "web"
|
template = template or "web"
|
||||||
end
|
end
|
||||||
|
|
@ -598,6 +613,34 @@ local function _cite_q (citeq_args)
|
||||||
citeq_args.id = id
|
citeq_args.id = id
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local opt_cat = ''
|
||||||
|
|
||||||
|
-- Indicator if item has been retracted
|
||||||
|
local retract = ''
|
||||||
|
if citeq_args.retracted_by then
|
||||||
|
opt_cat = cfg.i18n_t.trackingcats.retracted
|
||||||
|
local retract_qid = followQid({qid = qid, props = "P5824"})
|
||||||
|
local retract_id = string.gsub(retract_qid, 'Q', '')
|
||||||
|
local retr_params = {
|
||||||
|
citeq = 'yes',
|
||||||
|
id = frame:expandTemplate{
|
||||||
|
title = 'QID', args = {qid = retract_id}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
retr_params.doi = getValue({"P356", ps = 1, qid = retract_qid}) or nil
|
||||||
|
retr_params.doi = retr_params.doi and retr_params.doi:lower() or nil
|
||||||
|
retr_params.bibcode = getValue({"P819", ps = 1, qid = retract_qid}) or nil
|
||||||
|
retr_params.pmc = getValue({"P932", ps = 1, qid = retract_qid}) or nil
|
||||||
|
retr_params.pmid = getValue({"P698", ps = 1, qid = retract_qid}) or nil
|
||||||
|
if 'yes' == citeq_args['retracted-intentional'] then
|
||||||
|
retr_params.intentional = 'yes'
|
||||||
|
end
|
||||||
|
retract = ' ' .. frame:expandTemplate{ title = "Retracted", args = retr_params }
|
||||||
|
end
|
||||||
|
-- remove non-CS1 retraction properties
|
||||||
|
citeq_args.retracted_by = nil
|
||||||
|
citeq_args['retracted-intentional'] = nil
|
||||||
|
|
||||||
-- clean up any blank parameters
|
-- clean up any blank parameters
|
||||||
for k, v in pairs(citeq_args) do
|
for k, v in pairs(citeq_args) do
|
||||||
if v == "" then citeq_args[k] = nil end
|
if v == "" then citeq_args[k] = nil end
|
||||||
|
|
@ -632,10 +675,6 @@ local function _cite_q (citeq_args)
|
||||||
erratumid = ""
|
erratumid = ""
|
||||||
end
|
end
|
||||||
|
|
||||||
local opt_cat = ''
|
|
||||||
if getValue( {"P5824", ps = 1, qid = qid} ) then
|
|
||||||
opt_cat = cfg.i18n_t.trackingcats.retracted
|
|
||||||
end
|
|
||||||
if getValue( {"P1366", ps = 1, qid = qid} ) then
|
if getValue( {"P1366", ps = 1, qid = qid} ) then
|
||||||
opt_cat = opt_cat .. cfg.i18n_t.trackingcats.replaced
|
opt_cat = opt_cat .. cfg.i18n_t.trackingcats.replaced
|
||||||
end
|
end
|
||||||
|
|
@ -654,7 +693,7 @@ local function _cite_q (citeq_args)
|
||||||
title = "Cite "..template, args = citeq_args
|
title = "Cite "..template, args = citeq_args
|
||||||
} .. cfg.i18n_t.trackingcats["unknown-template"]
|
} .. cfg.i18n_t.trackingcats["unknown-template"]
|
||||||
end
|
end
|
||||||
return output .. erratumid .. opt_cat
|
return output .. erratumid .. retract .. opt_cat
|
||||||
end
|
end
|
||||||
|
|
||||||
local function cite_q (frame)
|
local function cite_q (frame)
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,9 @@ local simple_properties_t = {
|
||||||
hdl = {id = "P1184", maxvals = 1}, -- take care of |hdl-access=?
|
hdl = {id = "P1184", maxvals = 1}, -- take care of |hdl-access=?
|
||||||
ismn = {id = "P1208", maxvals = 1},
|
ismn = {id = "P1208", maxvals = 1},
|
||||||
journal = {id = "P1433", maxvals = 1},
|
journal = {id = "P1433", maxvals = 1},
|
||||||
|
thesis_degree = {id = "P13338", maxvals = 1},
|
||||||
|
thesis_submitted_to = {id = "P4101", maxvals = 1},
|
||||||
|
retracted_by = {id = "P5824", maxvals = 1}, -- transient, non-CS1
|
||||||
citeseerx = {id = "P3784", maxvals = 1},
|
citeseerx = {id = "P3784", maxvals = 1},
|
||||||
osti = {id = "P3894", maxvals = 1}, -- take care of |osti-access=?
|
osti = {id = "P3894", maxvals = 1}, -- take care of |osti-access=?
|
||||||
biorxiv = {id = "P3951", maxvals = 1},
|
biorxiv = {id = "P3951", maxvals = 1},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue