FindingMusic/sources/rm-duplicates.lua

20 lines
327 B
Lua
Raw Normal View History

2021-03-02 09:14:24 +00:00
#!/usr/bin/env lua
local music = io.open("music.csv", "r")
local unique = {}
for line in music:lines() do
if not unique[line] then
unique[line] = line
end
end
music:close()
local output_file = io.open("music-cleaned.csv", "w")
for line in pairs(unique) do
output_file:write(line .. "\n")
end
output_file:close()