Module:Sandbox/FlatLanguage/sandbox1
Appearance
- ISBN (identifier) → ISBN; d:Q33057 → ISBN; International Standard Book Number
- eISSN (identifier) → ISSN#Electronic ISSN; d:Q46339674 → [[]]; International Standard Serial Number#Electronic ISSN
- Zbl (identifier) → ZbMATH Open; d:Q190269 → ZbMATH Open; Zentralblatt MATH
- JFM (identifier) → ZbMATH Open#Jahrbuch über die Fortschritte der Mathematik; d: → [[]]; Jahrbuch über die Fortschritte der Mathematik
- PMC (identifier) → PubMed Central#PMCID; d:Q229883 → PubMed Central; PubMed Central
- S2CID (identifier) → Semantic Scholar#S2CID; d:Q22908627 → Semantic Scholar; Semantic Scholar
- SBN (identifier) → ISBN#SBN; d: → [[]]; Standard Book Number
- ISSN (identifier) → ISSN; d:Q131276 → ISSN; International Standard Serial Number
- PMID (identifier) → PubMed#PubMed identifier; d:Q2082879 → PMID; PubMed Identifier
- JSTOR (identifier) → JSTOR#Content; d:Q1420342 → JSTOR; JSTOR
- OCLC (identifier) → OCLC#Identifiers and linked data; d:Q190593 → OCLC; OCLC
local p = {};
function p.main ()
local cfg = mw.loadData("Module:Citation/CS1/Configuration/sandbox");
local id_handlers = cfg.id_handlers;
local bad_list = {};
for param, tab in pairs(id_handlers) do
local redirect = tab.redirect or "";
local id = mw.title.new(redirect).id
local target = mw.title.new(redirect).redirectTarget and mw.title.new(redirect).redirectTarget.fullText or ""
local q = tab.q or "";
local sitelink = mw.wikibase.getSitelink(q) or "";
local link = tab.link or "";
local is_bad = false;
if id ~= 0 and target ~= mw.title.new(link).fullText then
is_bad = true;
elseif sitelink ~= "" and target ~= sitelink then
is_bad = true;
end
if is_bad then
table.insert (bad_list, "[[" .. redirect .. "]] → [[" .. target .. "]]; [[d:" .. q .."]] → [[".. sitelink .. "]]; [[" .. link .. "]]");
end
end
return require("Module:List").makeList('bulleted', bad_list);
end
return p;