# This script just checks if there are any labels that get used
# more than once. I don't think so, but I want to be sure.

require 'json'
json_in = ARGF.read
list = JSON.parse(json_in)

uniq_tags = {}
has_dupes = false

list.each do |emoj|
  if uniq_tags.key?(emoj['label'])
    puts "Duplicate: #{emoj['label']}"
    has_dupes = true
  end
  uniq_tags[emoj['label']] = true
end

if has_dupes
  puts "Duplicates found!"
else
  puts "No duplicates found."
end
