Created
February 8, 2013 12:53
-
-
Save stanaka/4738872 to your computer and use it in GitHub Desktop.
Simple parser for a LTSV (Labeled Tab-separated Values: http://ltsv.org) file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
while gets | |
record = Hash[$_.split("\t").map{|p| p.split(":", 2)}] | |
p record | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment