Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -7,18 +7,18 @@ local key = nil
|
|||
|
||||
-- iterate through lines
|
||||
for line in data:gmatch("(.-)\r?\n") do
|
||||
if line:match("%s") then
|
||||
error("line contained space")
|
||||
elseif line:sub(1,1) == ">" then
|
||||
key = line:sub(2)
|
||||
-- if key already exists, append to the previous input
|
||||
output[key] = output[key] or ""
|
||||
elseif key ~= nil then
|
||||
output[key] = output[key] .. line
|
||||
end
|
||||
if line:match("%s") then
|
||||
error("line contained space")
|
||||
elseif line:sub(1,1) == ">" then
|
||||
key = line:sub(2)
|
||||
-- if key already exists, append to the previous input
|
||||
output[key] = output[key] or ""
|
||||
elseif key ~= nil then
|
||||
output[key] = output[key] .. line
|
||||
end
|
||||
end
|
||||
|
||||
-- print result
|
||||
for k,v in pairs(output) do
|
||||
print(k..": "..v)
|
||||
print(k..": "..v)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue