Are you still interested in working on this? I've improved that code and put it here, it produces a table like this using this data:
local data = {
{variety = {"NL"}, IPA = {"/ˈrɛizə(n)/"}, audio = {"nl-reizen.ogg"}, homophones = {"rijzen"}, hyphenation = {"rei-zen"}, optional_column={"VALUE", display="Optional column", order=3}},
{variety = {"BE"}, IPA = {"/ˈrɛːzə/", "/ˈrɛːzən/", "/ˈrɛːzn/"}, audio = {"", "nl-reizen.ogg"}, homophones = {"", "rijzen", "rijzn"}, hyphenation = {"rei-zen"}},
local found_columns = {variety=true, IPA=true, audio=true, homophones=true, hyphenation=true, optional_column={code="optional_column", display="Optional column", order=3}}
The table found_column
is supposed to be generated from data
, but it has been hard-coded for now.
We have a list of columns that are considered valid by default at predefined_columns
, their order in output is hard-coded. Users can define new columns and specify their order, see optional_column for example.