Модуль:JsonPaths: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 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 | ||