2010-02-08 20:08:40 +00:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
|
2010-04-17 23:05:39 +00:00
|
|
|
require "common"
|
|
|
|
|
2010-04-18 12:17:32 +00:00
|
|
|
config = find_config(ARGV[1])
|
|
|
|
strings = find_strings(ARGV[0], config)
|
2010-04-18 00:06:32 +00:00
|
|
|
|
2010-04-18 12:17:32 +00:00
|
|
|
for string in strings
|
2010-04-18 00:06:32 +00:00
|
|
|
|
2010-04-18 12:17:32 +00:00
|
|
|
string_text = string[1].to_json
|
2010-02-08 20:08:40 +00:00
|
|
|
|
2010-04-18 12:17:32 +00:00
|
|
|
if string[1] == nil
|
|
|
|
string_text = "NULL"
|
2010-04-18 00:06:32 +00:00
|
|
|
end
|
2010-02-08 20:08:40 +00:00
|
|
|
|
2010-04-18 12:17:32 +00:00
|
|
|
printf " { %6i, %s },\n", string[0], string_text
|
2010-02-08 20:08:40 +00:00
|
|
|
end
|
|
|
|
|