Skip to content

Instantly share code, notes, and snippets.

@alexandrebini
Created June 1, 2012 23:02
Show Gist options
  • Save alexandrebini/2855637 to your computer and use it in GitHub Desktop.
Save alexandrebini/2855637 to your computer and use it in GitHub Desktop.
Uol tracker
yaml = YAML.load_file("#{Rails.root}/config/shopping.yml")
yaml.each do |tab, products|
products.each do |a, values|
tab_name = tab.gsub ' ', '_'
name = values.first.gsub ' ', ''
link = values.last
puts "#{tab_name}: #{name}"
puts "http://clicklogger.rm.uol.com.br/shopping/?prd=239&grp=skin:clickjogos;src:14;size:19;chn:102;pos:4;thm:#{tab_name};creative:#{name}&msr=Cliques%20de%20Origem:1&oper=11&redir=#{ link }"
puts
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment