summaryrefslogtreecommitdiff
path: root/bin/uid-map
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-09-06 00:39:14 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-09-06 00:39:14 -0400
commitac4dcb64a8f6c07dfe50e9005dc4246f21ebf84e (patch)
tree8d9144bf1ab4c881f076ae2b7927516d764d89e0 /bin/uid-map
parent4b70501e432eb5fd9ed04a4afbadafabd982e9fc (diff)
Split hackers.yml into users/#{uid}.yml
Diffstat (limited to 'bin/uid-map')
-rwxr-xr-xbin/uid-map10
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