Sync to v9/v5

This commit is contained in:
2021-12-22 22:08:39 +01:00
parent 9d53673190
commit 97c2eba568
3 changed files with 164 additions and 28 deletions

View File

@ -2,7 +2,7 @@
package.path = package.path .. ";luajson/?.lua"
local JSON = require"json"
local path_in = "../tables/whathappensnext.json"
local path_in = "../tables/hitloc.json"
local f1 = io.open(path_in, "r")
local strjson = f1:read("*a")
f1:close()
@ -10,14 +10,15 @@ local tabData = JSON.decode(strjson)
local results = {}
for idx, row in pairs(tabData.rows) do
local min = row.range[1]
local max = row.range[2]
local field = tostring(2).."-"..tostring(max)
--results[field] = "<b>"..row.name.."</b>:"..row.description
results[field] = row.description
print(field, row.name)
--if row.range.dwarf[1] then
local min = row.range[1]
local max = row.range[2]
local field = tostring(min).."-"..tostring(max)
--results[field] = "<b>"..row.name.."</b>:"..row.description
results[field] = row.description
print(field, row.name)
--end
end
local entries = JSON.encode(results)
print()
print()