Module:Sandbox/Evad37/Auto footer links explained

local acModule = require('Module:Authority control')local nbModule = require('Module:Navbox')local pModule = require('Module:Portal')local wdModule = require('Module:WikidataIB')

local p =

p.propId =

--

Utility functions

--p.trimAll = function(argsTable) local trimmedArgs = for key, val in pairs(argsTable) do if type(val)

'string' then val = val:match('^%s*(.-)%s*$') if val ~= then trimmedArgs[key] = val end else trimmedArgs[key] = val end end return trimmedArgsend

p.getWdValue = function(property_id, item_id) local wdArgs = return wdModule.getValue(wdArgs)end

-- TODO: Portal-related function(s)p.tryForPortal = function(item_id, props) for _i, prop in ipairs(props) do local value = p.getWdValue(prop, item_id) local title = mw.title.new(value, 'Portal') if title.exists then return title.text end end return falseend

p.getLocationPortal = function(item_id) return p.tryForPortal(item_id,)end

p.getTypePortal = function(item_id) return p.tryForPortal(item_id,)end

-- TODO: Sister project-related function(s)

-- TODO: Authority control-related function(s)

-- TODO: Navbox-related function(s)

-- Template entry point:p.main = function(frame) local parent = frame.getParent(frame) local output = p._main(parent.args) return frame:preprocess(output)end

-- Module entry point:p._main = function(_args) local args = p.trimAll(_args) -- TODO: -- (1) Generate portal links, if any found; -- (2) Generate sister project links, if any found; -- (3) Generate authority control links, if any found; -- (4) put it all together in a navbox, if anything found

return --TODOend

return p