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

Нет описания правки
Нет описания правки
Строка 212: Строка 212:


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)
jsonPath = jsonPath:gsub("^Модуль:IanComradeBot/", "Участник:IanComradeBot/", 1)
return (jsonPath:gsub("/data$", ""))
end
end