Module:User:DTLHS/category tree export

local export = {}

function export_tree(m_data, raise_case) local result = {} for k,v in pairs(m_data) do		if raise_case then local cat = k:sub(1,1):upper..k:sub(2) table.insert(result, cat) else table.insert(result, k)		end end return '["' .. table.concat(result, '", "') .. '"]' end

function export.topic_cat local m_data = require("Module:category tree/topic cat/data") return export_tree(m_data, true) end

function export.pos_cat local m_data = require("Module:category tree/poscatboiler/data") return export_tree(m_data, false) end

return export