2004-09-12 21:44:13 +00:00
|
|
|
# $Id$
|
2004-09-12 17:34:30 +00:00
|
|
|
|
|
|
|
def main
|
2004-09-12 21:44:13 +00:00
|
|
|
if ARGV.first == '-a'
|
|
|
|
with_arity = true
|
|
|
|
ARGV.delete_at 0
|
|
|
|
else
|
|
|
|
with_arity = false
|
|
|
|
end
|
2004-09-12 17:34:30 +00:00
|
|
|
extract_ids(ARGF).sort.each do |id|
|
2004-09-12 21:44:13 +00:00
|
|
|
if with_arity
|
2004-09-12 17:34:30 +00:00
|
|
|
puts "#{id} 1"
|
|
|
|
else
|
|
|
|
puts id
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def extract_ids(f)
|
2004-09-22 05:22:50 +00:00
|
|
|
f.read.scan(/ripper_id_(\w+)/).flatten.uniq
|
2004-09-12 17:34:30 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
main
|