Module:FreeBSD

From Nasqueron Agora
Revision as of 22:38, 21 January 2013 by Dereckson (talk | contribs) (Dereckson moved page Module:PrintsFreeBSDPort to Module:FreeBSD without leaving a redirect: A module is more generic than one function.)

Documentation for this module may be created at Module:FreeBSD/doc

local p = {}

-- Gets a formatted FreeBSD port link
function p.GetsPortLink(frame)
    if frame.args[2] == nil then
        link = "http://www.freshports.org/" .. frame.args[1]
    else
        link = frame.args[2]
    end
    
    return '[' .. link .. ' ' .. frame.args[1] .. ']'
end

return p