lots of little things

This commit is contained in:
2026-09-22 18:30:46 -06:00
parent f9fe7e302b
commit a67e04ba4c
7 changed files with 1582 additions and 20 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env luajit
-- this is the "wrong" way to do this...
package.path = (arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)")) .. "src/lib"
.. package.config:sub(1, 1) .. "?.lua;" .. package.path
local utility = require "utility"
local sort_arrays
sort_arrays = function(tab)
for key, value in pairs(tab) do
if type(value) == "table" then
sort_arrays(value)
end
end
if tab[1] then
table.sort(tab)
end
end
local file_name = arg[1]
local data = utility.load_data(file_name)
sort_arrays(data)
utility.save_data(data)