Skip to content

Instantly share code, notes, and snippets.

View telday's full-sized avatar

Ellis Wright telday

View GitHub Profile
@telday
telday / factorio-recipe-parser.lua
Created February 3, 2020 23:40 — forked from pfmoore/factorio-recipe-parser.lua
Parse the Factorio recipe files to create a CSV of recipes
data = {}
data["extend"] = function (data, t)
for n, recipe in ipairs(t) do
for i, component in ipairs(recipe["ingredients"]) do
cname = component[1] or component["name"]
camt = component[2] or component["amount"]
print('"' .. recipe["name"] .. '","' .. cname .. '",' .. camt)
end
end
end