Gestion des progression

This commit is contained in:
sladecraven 2022-10-21 16:26:16 +02:00
parent b251ac9b6a
commit 8bc52b8712
2 changed files with 692 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,23 @@
package.path = package.path .. ";luajson/?.lua"
local JSON = require"json"
--local enjsonf = "/home/morr/foundry/foundrydata-dev/Data/modules/wfrp4e-dotr/lang/en.json"
local careerv9 = "../compendium/wfrp4e-core.career-descriptions.json"
local careerv10 = "../compendium/v10_entries.json"
local fp = io.open(careerv9, "r")
local c9 = JSON.decode( fp:read("*a") )
fp:close()
local c10 = {}
for k, v in pairs( c9.entries) do
c10[v.id] = {
name = v.name,
text = v.description
}
end
local json10 = JSON.encode(c10)
fp = io.open(careerv10, "w+")
fp:write( json10)
fp:close()