kindleclippings 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/kindleclippings.rb +10 -1
- metadata +2 -2
data/lib/kindleclippings.rb
CHANGED
@@ -5,7 +5,16 @@ module KindleClippings
|
|
5
5
|
['clipping', 'clippingresult'].each { |file| require File.expand_path(File.dirname(__FILE__) + '/' + file) }
|
6
6
|
|
7
7
|
def parse_file(path)
|
8
|
-
|
8
|
+
|
9
|
+
file_content = String.new
|
10
|
+
|
11
|
+
if RUBY_VERSION =~ /^1\.8/
|
12
|
+
file_content = open(path).read
|
13
|
+
else
|
14
|
+
file_content = File.open(path, :encoding => "UTF-8").read
|
15
|
+
end
|
16
|
+
|
17
|
+
parse(file_content)
|
9
18
|
end
|
10
19
|
|
11
20
|
def parse(filecontent)
|