diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-09-06 00:39:14 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-09-06 00:39:14 -0400 |
commit | ac4dcb64a8f6c07dfe50e9005dc4246f21ebf84e (patch) | |
tree | 8d9144bf1ab4c881f076ae2b7927516d764d89e0 /bin/uid-map | |
parent | 4b70501e432eb5fd9ed04a4afbadafabd982e9fc (diff) |
Split hackers.yml into users/#{uid}.yml
Diffstat (limited to 'bin/uid-map')
-rwxr-xr-x | bin/uid-map | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/uid-map b/bin/uid-map new file mode 100755 index 0000000..90dd472 --- /dev/null +++ b/bin/uid-map @@ -0,0 +1,10 @@ +#!/usr/bin/env ruby +# Usage: uid-map + +require 'yaml' + +users = Dir.glob("users/*.yml").each do |filename| + uid = filename.sub(/users\/([0-9]*)\.yml/, "\\1").to_i + user = YAML::load(open(filename)) + puts "#{uid}:#{user["username"]}" +end |