Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use an original data file

  • Loading branch information...
commit 1d479d6276841e81d1222ea7e9de96cb080942ef 1 parent 1d2de84
@igaiga authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 gets_text.rb
View
5 gets_text.rb
@@ -6,12 +6,13 @@
require 'CGI'
#filename = 'sample.txt'
-#filename = 'pagecounts-20120301-000000'
-filename = '20120301-000000-ja.txt'
+filename = 'pagecounts-20120301-000000'
+#filename = '20120301-000000-ja.txt'
file = File.open(filename, 'r:UTF-8')
list = []
while text = file.gets
begin
+ next unless text =~ /^ja/
#print CGI.unescape(text) if text =~ /^ja/
data = CGI.unescape(text).split
h = {:title => data[1], :count => data[2]}
Please sign in to comment.
Something went wrong with that request. Please try again.