librime-lua icon indicating copy to clipboard operation
librime-lua copied to clipboard

add new feature of Schema( "") to open default.yaml

Open shewer opened this issue 9 months ago • 0 comments

Schema('') == Schema('.default')

-- 取得 default.yaml:/schema_list 所有 schema_id
local  schema= Schema('')
local size = schema.config:get_list('schema_list').size
local schemas_id={}
for i = 0, size-1 do 
   local path = ("schema_list/@%d/schema"):format(i)
   table.insert(schema_id ,  schema.config:get_string( path ) )
end
print(  table.concat(schemas_id, "\n") )
---

shewer avatar May 04 '24 09:05 shewer