Module:WikidataIB and Module:WikidataIB/sandbox1: Difference between pages
(Difference between pages)
imported>Pigsonthewing Undid revision 1326353202 by Pigsonthewing (talk) per talk |
imported>Uzume strict |
||
| Line 1: | Line 1: | ||
-- Version: | -- Version: 2021-02-06 | ||
-- Module to implement use of a blacklist and whitelist for infobox fields | -- Module to implement use of a blacklist and whitelist for infobox fields | ||
-- Can take a named parameter |qid which is the Wikidata ID for the article | -- Can take a named parameter |qid which is the Wikidata ID for the article | ||
| Line 586: | Line 586: | ||
local postfix = (args.postfix or ""):gsub('"', '') | local postfix = (args.postfix or ""):gsub('"', '') | ||
local dtxt = args.dtxt | local dtxt = args.dtxt | ||
local shortname = args.shortname | local shortname = args.shortname | ||
local lang = args.lang or "en" -- fallback to default if missing | local lang = args.lang or "en" -- fallback to default if missing | ||
local uselbl = args.uselabel or args.uselbl | local uselbl = args.uselabel or args.uselbl | ||
| Line 1,744: | Line 1,744: | ||
local paraset = tonumber(args.ps or args.parameterset or 0) | local paraset = tonumber(args.ps or args.parameterset or 0) | ||
if paraset == 1 then | if paraset == 1 then | ||
-- a common setting | -- a common setting | ||
args.rank = "best" | args.rank = "best" | ||
args.fetchwikidata = "ALL" | args.fetchwikidata = "ALL" | ||
| Line 1,750: | Line 1,750: | ||
args.noicon = "true" | args.noicon = "true" | ||
elseif paraset == 2 then | elseif paraset == 2 then | ||
-- equivalent to raw | -- equivalent to raw | ||
args.rank = "best" | args.rank = "best" | ||
args.fetchwikidata = "ALL" | args.fetchwikidata = "ALL" | ||
| Line 1,758: | Line 1,758: | ||
args.pd = "true" | args.pd = "true" | ||
elseif paraset == 3 then | elseif paraset == 3 then | ||
-- | -- third set goes here | ||
end | end | ||