-- splits a string to a table containing entries split by the delimiter string -- remove_chars gives all characters that have to be removed. Default is nil function split(str, delimiter, remove_chars) local t = {} local c = 1 local temp = 0 if remove_chars~=nil then str2 = string.gsub(str, remove_chars, "") else str2 = str end while c~=nil do temp = string.find(str2, delimiter, c) if temp~=nil then ins = string.sub(str2, c, temp-1) c = temp+1 else ins = string.sub(str2, c, #str) c = nil end table.insert(t, ins) end return t end -- generates html file in the out folder for function gen_pages(namelist, pnum) final = {} final["xy2video"] = {} final["meen"] = "" for i=1,#namelist-1 do xy = tostring(((i-1)%4)+1)..tostring(math.ceil(i/4)) final["xy2video"][xy] = namelist[i] if(i%4 == 1) then final["meen"] = final["meen"] .. [[