summaryrefslogtreecommitdiffstats
path: root/_scripts/generate_latest.lua
blob: 794e3703a859bdb1c14b107f06ad0c985b8e32bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/uar/bin/lua

lyaml = require('lyaml')
data = lyaml.load(io.read("*a"))
table.sort(data, function(a,b)
	return (a.date or a.updated) > (b.date or b.updated)
end)

t = {}
for i=1, 10 do
	t[i] = data[i]
end
io.write(lyaml.dump{t})