Module:Test Lua VisualData
Documentation for this module may be created at Module:Test Lua VisualData/doc
local p = {}
function p.testlua(frame)
if mw.visualdata.query == nil then
return "Error: visualdata module is not available."
end
local schema = "Project key data"
local query = "[[category::Projects]]"
local printouts = {"objective", "image", "description"}
local results = mw.visualdata.query(schema, query, printouts)
local output = ""
for _, result in ipairs(results) do
output = output .. "Objective: " .. (result.objective or "N/A") .. "<br>"
output = output .. "Image: " .. (result.image or "N/A") .. "<br>"
output = output .. "Description: " .. (result.description or "N/A") .. "<br><br>"
end
return output
end
return p