Модуль:JsonPaths: различия между версиями

Нет описания правки
Нет описания правки
 
(не показано 6 промежуточных версий этого же участника)
Строка 35: Строка 35:
path = trim(path)
path = trim(path)


if path == "" or path == "Corvax" then
if path == "Corvax" then
return ""
end
 
if path == "" then
return getCurrentGitNamespace()
return getCurrentGitNamespace()
end
end
Строка 212: Строка 216:


return prefix .. rel .. "/data"
return prefix .. rel .. "/data"
end
function p.getJson(rel, path)
local modulePath = p.get(rel, path)
if modulePath == "" then
return ""
end
local jsonPath = modulePath:gsub("^Module:IanComradeBot/", "Участник:IanComradeBot/", 1)
return (jsonPath:gsub("/data$", ""))
end
end