FindingMusic/sources/rm-duplicates.lua
2021-03-02 02:14:24 -07:00

20 lines
327 B
Lua
Executable File

#!/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()