From a91c24295116ba1230b8d3d13770bd5410068615 Mon Sep 17 00:00:00 2001 From: Nemo Date: Sun, 8 Apr 2018 23:01:29 +0530 Subject: [PATCH] Move to data/ directory --- .gitignore | 3 ++- parse_listing.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 36943b4..4eee70e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ vendor/ html/ -*.csv \ No newline at end of file +*.csv +data/ \ No newline at end of file diff --git a/parse_listing.rb b/parse_listing.rb index 2b76f64..a76553b 100644 --- a/parse_listing.rb +++ b/parse_listing.rb @@ -4,7 +4,7 @@ require 'date' restaurants = [] -CSV.open("#{Date.today.to_s}.csv", 'wb') do |csv| +CSV.open("data/#{Date.today.to_s}.csv", 'wb') do |csv| csv << ['url', 'title', 'location', 'address', 'cuisine'] Dir.glob('html/restaurants-*.html') do |file| page = Nokogiri::HTML(open(file))