Module:Gitlab

From Veloren Wiki

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

-- helpers
str_split_iter = function(str, sep, escape)
	if escape then
		sep = "%"..sep
	end
	return string.gmatch(str, "[^"..sep.."]+")
end

--mainline code
local module = {}

module.config = function(frame)
	local path = frame.args[1]
	local url = "https://gitlab.com/veloren/veloren/-/blob/master/assets"
	for part in str_split_iter(path, '.', true) do
		url = url..'/'..part
	end
	url = url..".ron"
	return url
end

module.voxel = function(frame)
	local path = frame.args[1]
	local url = "https://gitlab.com/veloren/veloren/-/tree/master/assets/voxygen/voxel/"
	return url..path
end

return module
Cookies help us deliver our services. By using our services, you agree to our use of cookies.