Converting a CSV file to a Lua table and Lua file
4 Jul
2020
4 Jul
'20
2:02 p.m.
Hi all, I have a bash script which converts a CSV file into a Lua table, which is then used in ConTeXt. It works fine, but I wonder whether there is a code within LuaMetaTeX for doing this directly there (writing a new file which contains the Lua table). This would be more efficient and neater. Thus a CSV file « example.csv » containing the lines: X,Y,Z 0.05597,0.6612,0.8618 0.156804,0.8784,0.961 0.496804,0.8784,0.9324 0.176804,0.648,0.9643 would be converted and wriiten into a lua file « example.lua » containing the lines: return{ -- {X,Y,Z}, {0.05597,0.6612,0.8618} {0.156804,0.8784,0.961} {0.496804,0.8784,0.9324} {0.176804,0.648,0.9643} } Thanks in advance for any help: Otared K.
1631
Age (days ago)
1631
Last active (days ago)
0 comments
1 participants
participants (1)
-
Otared Kavian