--This is a proof of concept trying to build a timeline from wikidata--local p = local wd = require('Module:Wikidata')
local aliasesP =
local aliasesQ =
local function recConcat(t) if type(t) ~= 'table' then return t end local first = true local s = "(" for _, value in ipairs(t) do s = s .. recConcat(value) if not first then s = s .. ", " end first = false end return s .. ")"end
local function getValueOrUnknown(object, keys) local stepper = object for _, key in ipairs(keys) do if type(key)
function p.hello local versions = mw.wikibase.getAllStatements(aliasesQ.fedora, aliasesP.softwareVersionIdentifier) -- mw.logObject(versions) local counter = 0 for k, v in pairs(versions) do counter = counter + 1 -- there surly is a smarter way to write this local version = getValueOrUnknown(v,) local startTime = getValueOrUnknown(v,) local endTime = getValueOrUnknown(v,) mw.logObject("(Key " .. k .. "), Version " .. version .. ", start " .. startTime .. ", endTime " .. endTime) if counter
return p