请输入您要查询的百科知识:

 

词条 Module:Sandbox/Cabayi
释义

local p = {}

p.hansard = function(frame)

-- get from wikidata

local entity = mw.wikibase.getEntityObject()

local rettxt = ""

-- local hansardcurr = 4068 -- use Harrington for now...

local hansardcurr = 2631 -- no, use Clegg for now...

-- Parliaments prior to 2005, millbanksystems.com

if entity['claims']["P2170"] then

rettxt = rettxt .. "2005 & prev\"

end

for i = 1, 3 do -- at most 3 parliaments to date (2016)

if entity['claims']["P463"][i] == nil then

break -- no parliament found

end

local parlid = entity['claims']["P463"][i]["mainsnak"]["datavalue"]["value"]["numeric-id"]

-- |P463|1|mainsnak|datavalue|value|numeric-id

if parlid == nil then

break -- no parliament found

elseif parlid == 21084471 then

-- Parliament 2006 - 2010, parliament.uk

rettxt = rettxt .. "\* Contributions in the 2005–10 Parliament at Hansard {{*}} .. hansardcurr .. "_od.html 06-07 {{*}} .. hansardcurr .. "_od.html 07-08 {{*}} .. hansardcurr .. "_od.html 08-09 {{*}} .. hansardcurr .."_od.html 09-10"

elseif parlid == 21084472 or parlid == 21084473 then

-- Parliament 2010 - present, digiminster.com using the number from P1996

rettxt = rettxt .. "\* Contributions in the 2010–15 Parliament at Hansard {{*}} .. hansardcurr .. "_od.html 10-12(1) {{*}} .. hansardcurr .. "_od.html 10-12(2) {{*}} .. hansardcurr .. "_od.html 12-13 {{*}} .. hansardcurr .. "_od.html 13-14 {{*}} .. hansardcurr .. "_od.html 14-15"

else

-- meh

end

end

return rettxt .."\"

end

return p

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/20 12:05:36