news2kindle 0.2.4 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -2
- data/Gemfile.lock +76 -69
- data/lib/news2kindle/generator/internet-watch.rb +3 -3
- data/lib/news2kindle/generator/tdiary.rb +2 -2
- data/lib/news2kindle/version.rb +1 -1
- data/news2kindle.gemspec +0 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '00639cc8f196c01a7dd9595b204000f4af6ec26c30b7ed268223960373cc52ea'
|
4
|
+
data.tar.gz: 93992dce4e4b6ca3a87e28c36323018598c19c4433a82ed9ba79c492c65bc562
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a312cbe553b155982a92cd423eea344182e3229ad2bfe51a7131e05979936a336a7f25bfa4bd4c398c2fec34942c1a52eb626cc59c3b6052792ef86c17cbcb7c
|
7
|
+
data.tar.gz: fd0bf057310b395dd90590fff11a44b16c1157675312088834aaf89e805754de12372802770457a91d49ce609ef777af1354775173b9e3d344c4bcb9879cf3dc
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
news2kindle (0.2.
|
4
|
+
news2kindle (0.2.6)
|
5
5
|
dropbox_api
|
6
6
|
kindlegen
|
7
7
|
mail
|
@@ -14,101 +14,109 @@ PATH
|
|
14
14
|
GEM
|
15
15
|
remote: https://rubygems.org/
|
16
16
|
specs:
|
17
|
-
activemodel (6.
|
18
|
-
activesupport (= 6.
|
19
|
-
activesupport (6.
|
17
|
+
activemodel (6.1.3.1)
|
18
|
+
activesupport (= 6.1.3.1)
|
19
|
+
activesupport (6.1.3.1)
|
20
20
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
21
|
-
i18n (>=
|
22
|
-
minitest (
|
23
|
-
tzinfo (~>
|
24
|
-
zeitwerk (~> 2.
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
21
|
+
i18n (>= 1.6, < 2)
|
22
|
+
minitest (>= 5.1)
|
23
|
+
tzinfo (~> 2.0)
|
24
|
+
zeitwerk (~> 2.3)
|
25
|
+
addressable (2.7.0)
|
26
|
+
public_suffix (>= 2.0.2, < 5.0)
|
27
|
+
bson (4.12.0)
|
28
|
+
concurrent-ruby (1.1.8)
|
29
|
+
connection_pool (2.2.5)
|
30
|
+
diff-lcs (1.4.4)
|
30
31
|
domain_name (0.5.20190701)
|
31
32
|
unf (>= 0.0.5, < 1.0.0)
|
32
|
-
dropbox_api (0.1.
|
33
|
-
faraday (
|
33
|
+
dropbox_api (0.1.19)
|
34
|
+
faraday (~> 1.0)
|
34
35
|
oauth2 (~> 1.1)
|
35
|
-
faraday (
|
36
|
+
faraday (1.4.1)
|
37
|
+
faraday-excon (~> 1.1)
|
38
|
+
faraday-net_http (~> 1.0)
|
39
|
+
faraday-net_http_persistent (~> 1.1)
|
36
40
|
multipart-post (>= 1.2, < 3)
|
41
|
+
ruby2_keywords (>= 0.0.4)
|
42
|
+
faraday-excon (1.1.0)
|
43
|
+
faraday-net_http (1.0.1)
|
44
|
+
faraday-net_http_persistent (1.1.0)
|
37
45
|
http-cookie (1.0.3)
|
38
46
|
domain_name (~> 0.5)
|
39
|
-
i18n (1.
|
47
|
+
i18n (1.8.10)
|
40
48
|
concurrent-ruby (~> 1.0)
|
41
|
-
jwt (2.2.
|
42
|
-
kindlegen (3.
|
49
|
+
jwt (2.2.3)
|
50
|
+
kindlegen (3.1.1)
|
43
51
|
rake
|
44
52
|
rubyzip
|
45
53
|
mail (2.7.1)
|
46
54
|
mini_mime (>= 0.1.1)
|
47
|
-
mechanize (2.
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
net-http-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
55
|
+
mechanize (2.8.0)
|
56
|
+
addressable (~> 2.7)
|
57
|
+
domain_name (~> 0.5, >= 0.5.20190701)
|
58
|
+
http-cookie (~> 1.0, >= 1.0.3)
|
59
|
+
mime-types (~> 3.0)
|
60
|
+
net-http-digest_auth (~> 1.4, >= 1.4.1)
|
61
|
+
net-http-persistent (>= 2.5.2, < 5.0.dev)
|
62
|
+
nokogiri (~> 1.11, >= 1.11.2)
|
63
|
+
rubyntlm (~> 0.6, >= 0.6.3)
|
64
|
+
webrick (~> 1.7)
|
65
|
+
webrobots (~> 0.1.2)
|
66
|
+
mime-types (3.3.1)
|
58
67
|
mime-types-data (~> 3.2015)
|
59
|
-
mime-types-data (3.
|
60
|
-
mini_mime (1.0
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
multi_json (1.14.1)
|
68
|
+
mime-types-data (3.2021.0225)
|
69
|
+
mini_mime (1.1.0)
|
70
|
+
minitest (5.14.4)
|
71
|
+
mongo (2.14.0)
|
72
|
+
bson (>= 4.8.2, < 5.0.0)
|
73
|
+
mongoid (7.2.2)
|
74
|
+
activemodel (>= 5.1, < 6.2)
|
75
|
+
mongo (>= 2.10.5, < 3.0.0)
|
76
|
+
multi_json (1.15.0)
|
69
77
|
multi_xml (0.6.0)
|
70
78
|
multipart-post (2.1.1)
|
71
79
|
net-http-digest_auth (1.4.1)
|
72
|
-
net-http-persistent (
|
80
|
+
net-http-persistent (4.0.1)
|
73
81
|
connection_pool (~> 2.2)
|
74
|
-
nokogiri (1.
|
75
|
-
|
76
|
-
|
77
|
-
oauth2 (1.4.2)
|
82
|
+
nokogiri (1.11.3-x86_64-linux)
|
83
|
+
racc (~> 1.4)
|
84
|
+
oauth2 (1.4.7)
|
78
85
|
faraday (>= 0.8, < 2.0)
|
79
86
|
jwt (>= 1.0, < 3.0)
|
80
87
|
multi_json (~> 1.3)
|
81
88
|
multi_xml (~> 0.5)
|
82
89
|
rack (>= 1.2, < 3)
|
83
90
|
pit (0.0.7)
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
rspec-
|
91
|
-
rspec-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
rspec-expectations (3.9.0)
|
91
|
+
public_suffix (4.0.6)
|
92
|
+
racc (1.5.2)
|
93
|
+
rack (2.2.3)
|
94
|
+
rake (13.0.3)
|
95
|
+
rspec (3.10.0)
|
96
|
+
rspec-core (~> 3.10.0)
|
97
|
+
rspec-expectations (~> 3.10.0)
|
98
|
+
rspec-mocks (~> 3.10.0)
|
99
|
+
rspec-core (3.10.1)
|
100
|
+
rspec-support (~> 3.10.0)
|
101
|
+
rspec-expectations (3.10.1)
|
96
102
|
diff-lcs (>= 1.2.0, < 2.0)
|
97
|
-
rspec-support (~> 3.
|
98
|
-
rspec-mocks (3.
|
103
|
+
rspec-support (~> 3.10.0)
|
104
|
+
rspec-mocks (3.10.2)
|
99
105
|
diff-lcs (>= 1.2.0, < 2.0)
|
100
|
-
rspec-support (~> 3.
|
101
|
-
rspec-support (3.
|
102
|
-
|
106
|
+
rspec-support (~> 3.10.0)
|
107
|
+
rspec-support (3.10.2)
|
108
|
+
ruby2_keywords (0.0.4)
|
109
|
+
rubyntlm (0.6.3)
|
110
|
+
rubyzip (2.3.0)
|
103
111
|
systemu (2.6.5)
|
104
|
-
|
105
|
-
|
106
|
-
thread_safe (~> 0.1)
|
112
|
+
tzinfo (2.0.4)
|
113
|
+
concurrent-ruby (~> 1.0)
|
107
114
|
unf (0.1.4)
|
108
115
|
unf_ext
|
109
|
-
unf_ext (0.0.7.
|
116
|
+
unf_ext (0.0.7.7)
|
117
|
+
webrick (1.7.0)
|
110
118
|
webrobots (0.1.2)
|
111
|
-
zeitwerk (2.
|
119
|
+
zeitwerk (2.4.2)
|
112
120
|
|
113
121
|
PLATFORMS
|
114
122
|
ruby
|
@@ -116,9 +124,8 @@ PLATFORMS
|
|
116
124
|
DEPENDENCIES
|
117
125
|
bundler
|
118
126
|
news2kindle!
|
119
|
-
pry
|
120
127
|
rake
|
121
128
|
rspec
|
122
129
|
|
123
130
|
BUNDLED WITH
|
124
|
-
|
131
|
+
2.2.15
|
@@ -33,7 +33,7 @@ module News2Kindle
|
|
33
33
|
|
34
34
|
rdf_file = "https://internet.watch.impress.co.jp/data/rss/1.0/iw/feed.rdf"
|
35
35
|
rdf = retry_loop( 5 ) do
|
36
|
-
Nokogiri(open(rdf_file, 'r:utf-8', &:read))
|
36
|
+
Nokogiri(URI.open(rdf_file, 'r:utf-8', &:read))
|
37
37
|
end
|
38
38
|
(rdf / 'item' ).each do |item|
|
39
39
|
uri = URI( item.attr( 'rdf:about' ).to_s )
|
@@ -63,7 +63,7 @@ module News2Kindle
|
|
63
63
|
next if org =~ /^http/ # skip images on other servers
|
64
64
|
begin
|
65
65
|
img_file = retry_loop( 5 ) do
|
66
|
-
open( "#{TOP}#{org}", &:read )
|
66
|
+
URI.open( "#{TOP}#{org}", &:read )
|
67
67
|
end
|
68
68
|
cache = "#{org.gsub( /\//, '_' ).sub( /^_/, '' )}"
|
69
69
|
open( "#{@dst_dir}/#{cache}", 'w' ){|f| f.write img_file}
|
@@ -205,7 +205,7 @@ module News2Kindle
|
|
205
205
|
rescue Errno::ENOENT
|
206
206
|
#puts "getting article: #{uri.path}".encode( Encoding::default_external )
|
207
207
|
html = retry_loop( 5 ) do
|
208
|
-
open( uri, &:read )
|
208
|
+
URI.open( uri, &:read )
|
209
209
|
end
|
210
210
|
open( cache, 'w' ){|f| f.write html }
|
211
211
|
end
|
@@ -21,7 +21,7 @@ module News2Kindle
|
|
21
21
|
html = title = author = now_str = nil
|
22
22
|
begin
|
23
23
|
retry_loop( 5 ) do
|
24
|
-
html = Nokogiri(open("#{@top}?date=#{now.strftime '%m%d'}", 'r:utf-8', &:read))
|
24
|
+
html = Nokogiri(URI.open("#{@top}?date=#{now.strftime '%m%d'}", 'r:utf-8', &:read))
|
25
25
|
title = (html / 'head title').text
|
26
26
|
author = (html / 'head meta[name="author"]')[0]['content']
|
27
27
|
now_str = now.strftime( '%m-%d' )
|
@@ -124,7 +124,7 @@ module News2Kindle
|
|
124
124
|
file_name = "#{SecureRandom.hex}#{uri.to_s.scan(/\.[^\.]+$/)[0]}"
|
125
125
|
begin
|
126
126
|
open("#{@current_dir}/#{file_name}", 'w') do |f|
|
127
|
-
f.write open(uri, &:read)
|
127
|
+
f.write URI.open(uri, &:read)
|
128
128
|
end
|
129
129
|
rescue OpenURI::HTTPError, RuntimeError, Errno::ENOENT
|
130
130
|
News2Kindle.logger.warn "#$!: #{uri}"
|
data/lib/news2kindle/version.rb
CHANGED
data/news2kindle.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: news2kindle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TADA Tadashi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kindlegen
|
@@ -170,20 +170,6 @@ dependencies:
|
|
170
170
|
- - ">="
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: '0'
|
173
|
-
- !ruby/object:Gem::Dependency
|
174
|
-
name: pry
|
175
|
-
requirement: !ruby/object:Gem::Requirement
|
176
|
-
requirements:
|
177
|
-
- - ">="
|
178
|
-
- !ruby/object:Gem::Version
|
179
|
-
version: '0'
|
180
|
-
type: :development
|
181
|
-
prerelease: false
|
182
|
-
version_requirements: !ruby/object:Gem::Requirement
|
183
|
-
requirements:
|
184
|
-
- - ">="
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
version: '0'
|
187
173
|
description: scrape some news site and deliver to kindle
|
188
174
|
email:
|
189
175
|
- t@tdtds.jp
|
@@ -242,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
242
228
|
- !ruby/object:Gem::Version
|
243
229
|
version: '0'
|
244
230
|
requirements: []
|
245
|
-
rubygems_version: 3.
|
231
|
+
rubygems_version: 3.1.6
|
246
232
|
signing_key:
|
247
233
|
specification_version: 4
|
248
234
|
summary: scrape some news site and deliver to kindle
|