2020-05-31 10:10:58 +02:00
|
|
|
package.path = package.path .. ";luajson/?.lua"
|
|
|
|
local JSON = require"json"
|
|
|
|
|
2021-11-08 21:29:05 +01:00
|
|
|
local enjsonf = "../../WFRP4e-FoundryVTT/lang/en.json"
|
2020-05-31 10:10:58 +02:00
|
|
|
local frjsonf = "../fr.json"
|
|
|
|
|
|
|
|
local fp = io.open(enjsonf, "r")
|
|
|
|
local entags = JSON.decode( fp:read("*a") )
|
|
|
|
fp:close()
|
|
|
|
|
|
|
|
fp = io.open(frjsonf, "r")
|
|
|
|
local frtags = JSON.decode( fp:read("*a") )
|
|
|
|
fp:close()
|
2021-11-08 21:29:05 +01:00
|
|
|
|
|
|
|
local todisplay = {}
|
2020-05-31 10:10:58 +02:00
|
|
|
for tag, value in pairs(entags) do
|
|
|
|
if not frtags[tag] then
|
2021-11-08 21:29:05 +01:00
|
|
|
todisplay[#todisplay+1] = { tag=tag, value=value }
|
2020-05-31 10:10:58 +02:00
|
|
|
end
|
|
|
|
end
|
2021-11-08 21:29:05 +01:00
|
|
|
|
|
|
|
table.sort(todisplay, function (a, b)
|
|
|
|
return a.tag < b.tag
|
|
|
|
end
|
|
|
|
)
|
|
|
|
for _, tagDef in pairs(todisplay) do
|
|
|
|
print('"'.. tagDef.tag ..'":"'.. tagDef.value..'",')
|
|
|
|
end
|
|
|
|
|
2020-05-31 10:10:58 +02:00
|
|
|
|