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

yaml = require('yaml')
data = yaml.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(yaml.dump(t))