#!/usr/bin/ruby
index = <The Problem with the Mainstream Engineering Establishment
Articles – Read In Order
%s
EOF
list = []
Dir.glob("*.html") do |i|
if i != "index.html"
raise i unless i.match?(/^\d+\.html$/)
else
next
end
i = i.to_i
list << i
end
list.sort!
titles = []
list.each_with_index do |i, index|
index += 1
raise unless i == index
end
puts list.max
list.each do |i|
prev = i - 1
if prev == 0
prev = "index"
end
next_ = i + 1
if next_ == 17
next_ = "index"
end
end_ = "