Toggle menu
1.3K
1.7K
708
23.9K
Veloren Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

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.