# http://deathsnacks.com/wf/index.html
require "open-uri"
#start new thread
t = Thread.new do
while true
conn = open('http://deathsnacks.com/wf/index.html').read
table_data = conn.scan /
/
table_data_refined = []
table_data.each { |data|
data.gsub!(/<.+?>/, '')
# add space after price
data.gsub!('0cr', '0cr ')
table_data_refined << data
}
puts ' '
puts ' Warframe Alerts by Neumann Gregor'
$i = 0
table_data_refined.each do |looped|
if (table_data_refined[$i][0] =~ /[[:digit:]]/)
puts ' ' + (table_data_refined[$i]).to_s.gsub(/(?<=[a-z])(?=[A-Z])/, ' ')
#insert spaces between lowercase and uppercase letters in string
#str = str.gsub(/(?<=[a-z])(?=[A-Z])/, ' ')
end
$i +=1
end
sleep 10
Gem.win_platform? ? (system "cls") : (system "clear")
end
end
#end thread
#hit enter to exit by killing thread
gets
t.kill