1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env ruby # Usage: uid-map load "#{File.dirname(__FILE__)}/common.rb" users = Dir.glob("#{cfg["yamldir"]}/*.yml").each do |filename| uid = File.basename(filename).sub(/^([0-9]*)\.yml$/, "\\1").to_i user = load_user_yaml(filename) puts "#{uid}:#{user["username"]}" end