跳转到内容

模組:Taxobox wikidata/sandbox

本页使用了标题或全文手工转换
维基百科,自由的百科全书

这是本页的一个历史版本,由Taeas留言 | 贡献2023年7月14日 (五) 09:24编辑。这可能和当前版本存在着巨大的差异。

local wdib = require('Module:WikidataIB')

local p = {}
local l = {}

function p.main(frame)
    return l.getData({qid = 'Q42196', linked = 'no', plaindate='no',rank = "best"}, 'P105')
end

local function has_content(arg)
    return arg ~= nil and arg ~= ""
end


function l.getData(args, id)
	local opts = {id}
	opts.qid = has_content(args.qid) and args.qid or nil
	opts.onlysourced = has_content(args.onlysourced) and args.onlysourced or "no"
	opts.noicon = has_content(args.noicon) and args.noicon or "true"
	opts.fetchwikidata = has_content(args.fetchwikidata) and args.fetchwikidata or "ALL"
    opts.suppressfields = has_content(args.suppressfields) and args.suppressfields or nil
	return wdib._getValue(opts)
end

return p