kindle 0.7.0.beta6 → 0.7.0.beta7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/kindle.rb +1 -1
- data/lib/kindle/parser/annotations.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cef0e34f2b1c8e9b50af3cce4e0c0acd6ae7706
|
4
|
+
data.tar.gz: 89a3242831883da625176f2f52dd2a5100a00bd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea0d050d3100ae460fcb2acc1db7b11bb0db9dc9129bbcca7d259e533bd0f299b3b43f7c8e55ebce547e121400c32689905bafa20c259229df082050c9863237
|
7
|
+
data.tar.gz: 8250c1c86b7f058a7bc5e5171916bb1a93fc45adebb306a39aa4ea6677fc0a9236c5ad16de32581d5c518deada9e8355420b35cc7d828cdf690f2b41abc2c386
|
data/lib/kindle.rb
CHANGED
@@ -25,8 +25,12 @@ module Kindle
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def load_highlights
|
28
|
+
# Log in to kindle.amazon.TLD
|
28
29
|
login
|
30
|
+
# Collect the list of books that have highlighted passages
|
29
31
|
fetch_highlights
|
32
|
+
# Because the web interface doesn't show us ALL of the highlights,
|
33
|
+
# we iterate and collect the authoritative highlights for each book
|
30
34
|
collect_authoritative_highlights
|
31
35
|
end
|
32
36
|
|
@@ -60,7 +64,7 @@ module Kindle
|
|
60
64
|
def collect_authoritative_highlights
|
61
65
|
# NOTE: This fetch may fail if the highlight count is realy large.
|
62
66
|
books.each do |book|
|
63
|
-
next if
|
67
|
+
next if book.highlight_count == 0
|
64
68
|
kb = Kindle::Book.find_or_create_by(asin: book.asin, title: book.title, author: book.author)
|
65
69
|
if kb.highlight_count != book.highlight_count
|
66
70
|
kb.highlight_count = book.highlight_count
|