3dPrinting :

- riorganizzazione
- correzioni nel collegamento e nel riordino dei setti.
This commit is contained in:
SaraP
2022-06-29 11:34:46 +02:00
parent b9f1922969
commit 37dd22aa3e
13 changed files with 487 additions and 399 deletions
+6 -1
View File
@@ -12,6 +12,7 @@ EgtOutLog( ' CSVManager started', 1)
-- Dati
local AMD = require( 'AddManData')
---------------------------------------------------------------------
function toCSV (t)
local s = ""
for _,p in pairs(t) do
@@ -19,7 +20,8 @@ function toCSV (t)
end
return string.sub(s, 2) -- remove first comma
end
---------------------------------------------------------------------
function escapeCSV (s)
if string.find(s, '[,"]') then
ns = '"' .. string.gsub(s, '"', '""') .. '"'
@@ -27,6 +29,7 @@ function escapeCSV (s)
return s
end
---------------------------------------------------------------------
local function fromCSV(s)
s = s .. ';' -- ending comma
local t = {} -- table to collect fields
@@ -53,6 +56,7 @@ local function fromCSV(s)
return t
end
---------------------------------------------------------------------
function read_file( path)
local file = io.open( path, "r") -- r read mode and b binary mode
if not file then return nil end
@@ -67,4 +71,5 @@ function read_file( path)
return CSVTable
end
---------------------------------------------------------------------
return CSVManager