Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 15 lines (13 sloc) 0.426 kb
f6a92ce7 »
2011-08-21 Added scripts
1 #!/usr/bin/ruby
2
3 file = ARGV[0]
4
5 File.read(file).each do |line|
6 line.chomp!
7 begin
8 call_number = (/.* \$a (.*)[$\s]/.match(line))[1]
9 call_number.gsub!(/[A-Za-z\/].*/, '') # Remove any letters and slashes (/)
10 puts call_number if call_number.to_i < 1000 && call_number.length > 0
11 rescue Exception => e
4c5bbb3e »
2011-09-13 Don't spew frightening warnings needlessly
12 # Uncomment to see the call numbers that aren't Dewey
13 # STDERR.puts "(Error #{e}) #{line}"
f6a92ce7 »
2011-08-21 Added scripts
14 end
15 end
Something went wrong with that request. Please try again.