epub_book 0.1.16 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +2 -1
- data/README.md +4 -0
- data/epub_book.gemspec +10 -9
- data/lib/epub_book/book.rb +89 -47
- data/lib/epub_book/loggable.rb +2 -1
- data/lib/epub_book/version.rb +1 -1
- data/lib/epub_book.rb +4 -4
- metadata +74 -27
- data/bin/console +0 -14
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fe0acde1dee44a1b78b5919f5918b9251046dc77d99845b8e7f30b7727bb9bdb
|
4
|
+
data.tar.gz: 10ba271cdac6b7afe9b79dd874c3a373e0e97c115f6e1b9c642d73aa517ee093
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8afdb3e0e9ed70782894c00207afa174b97d4792ad67235f15f0d0a193e1278cdca97fd7081dcefb4db131a0af16c3ce4f7f092bec3fb31e56e0abffecde430
|
7
|
+
data.tar.gz: 80a46d793b3d69e4f19154c07202e77197bf2f08cdd1cdf23c207cd6122d6a6b46c4df850e0676d2b099e32e8d48542da1f5cd4e4d4f475022f540fc81a19940
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -29,6 +29,7 @@ Or install it yourself as:
|
|
29
29
|
book.body_css = '.wrapper #content'
|
30
30
|
book.creator = 'javy_liu'
|
31
31
|
book.path = '/tmp'
|
32
|
+
book.ext_name = 'txt'
|
32
33
|
end
|
33
34
|
```
|
34
35
|
|
@@ -44,6 +45,7 @@ Or install it yourself as:
|
|
44
45
|
config.mail_user_name = 'ex@example.com'
|
45
46
|
config.mail_password = 'password'
|
46
47
|
config.mail_from = 'yourmail@example.com'
|
48
|
+
config.ext_name = 'epub'
|
47
49
|
end
|
48
50
|
```
|
49
51
|
Or use a ./default_setting.yml file have following content
|
@@ -69,6 +71,7 @@ Or use a ./default_setting.yml file have following content
|
|
69
71
|
creator: 'user name'
|
70
72
|
path: '/'
|
71
73
|
mail_to: 'yourmail@example.com'
|
74
|
+
ext_name: 'txt'
|
72
75
|
|
73
76
|
#special host book setting(the key is book_url's host which replacing the dot with underline)
|
74
77
|
#http://www.piaotian.net/html/0/431/index.html
|
@@ -111,6 +114,7 @@ if you have setting file , you can create book like following
|
|
111
114
|
book.creator #epub creator
|
112
115
|
book.path #epub book save path
|
113
116
|
book.mail_to #if your want send by email when epub created, set this to your email
|
117
|
+
book.ext_name #can create epub or txt file
|
114
118
|
```
|
115
119
|
## Perform `create_book` in your terminal
|
116
120
|
```bash
|
data/epub_book.gemspec
CHANGED
@@ -27,16 +27,17 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
|
-
spec.add_dependency 'http','~>
|
31
|
-
spec.
|
32
|
-
spec.add_dependency 'eeepub','~> 0'
|
33
|
-
spec.add_dependency 'zip-zip','~> 0'
|
34
|
-
spec.add_dependency 'mail','~>
|
30
|
+
spec.add_dependency 'http','~> 2.1'
|
31
|
+
spec.add_runtime_dependency 'nokogiri', '~> 1.11', '>= 1.11.4'
|
32
|
+
spec.add_dependency 'eeepub', '~> 0.8.1'
|
33
|
+
spec.add_dependency 'zip-zip', '~> 0.3'
|
34
|
+
spec.add_dependency 'mail', '~>2.7.0'
|
35
35
|
|
36
36
|
|
37
|
-
spec.add_development_dependency
|
38
|
-
spec.add_development_dependency "rake",
|
37
|
+
spec.add_development_dependency 'bundler', '~> 2.2', '>= 2.2.27'
|
38
|
+
spec.add_development_dependency "rake", '~> 12.3','>= 12.3.3'
|
39
39
|
spec.add_development_dependency "rspec", "~> 3.0"
|
40
|
-
spec.add_development_dependency "pry",'~> 0'
|
41
|
-
spec.add_development_dependency "pry-
|
40
|
+
spec.add_development_dependency "pry", '~> 0.14', '>= 0.14.1'
|
41
|
+
spec.add_development_dependency "pry-byebug", '~> 3.8', '>= 3.8.0'
|
42
|
+
spec.add_development_dependency "pry-doc", '~> 1.2', '>= 1.2.0'
|
42
43
|
end
|
data/lib/epub_book/book.rb
CHANGED
@@ -16,12 +16,13 @@ require 'yaml'
|
|
16
16
|
#user_agent 访问代理
|
17
17
|
#referer 访问原地址
|
18
18
|
#creator 责任人
|
19
|
+
#ext_name 扩展名 epub,txt
|
19
20
|
|
20
21
|
module EpubBook
|
21
22
|
class Book
|
22
23
|
UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36"
|
23
24
|
Referer = "http://www.baidu.com/"
|
24
|
-
attr_accessor :title_css, :index_item_css, :body_css, :limit, :item_attr, :page_css, :page_attr,:cover,:cover_css, :description_css,:path,:user_agent,:referer,:creator,:mail_to, :folder_name,:des_url
|
25
|
+
attr_accessor :title_css, :index_item_css, :body_css, :limit, :item_attr, :page_css, :page_attr,:cover,:cover_css, :description_css,:path,:user_agent,:referer,:creator,:mail_to, :folder_name,:des_url,:ext_name,:ignore_txt
|
25
26
|
|
26
27
|
|
27
28
|
Reg = /<script.*?>.*?<\/script>/m
|
@@ -38,6 +39,7 @@ module EpubBook
|
|
38
39
|
@cover = 'cover.jpg'
|
39
40
|
@body_css = '.articlebody'
|
40
41
|
@item_attr = "href"
|
42
|
+
@ext_name = 'epub'
|
41
43
|
yield self if block_given?
|
42
44
|
end
|
43
45
|
|
@@ -46,7 +48,7 @@ module EpubBook
|
|
46
48
|
end
|
47
49
|
|
48
50
|
def link_host
|
49
|
-
@link_host ||= @index_url[/\A(
|
51
|
+
@link_host ||= @index_url[/\A(https?:\/\/.*?)\/\w+/,1]
|
50
52
|
end
|
51
53
|
|
52
54
|
def book
|
@@ -55,6 +57,7 @@ module EpubBook
|
|
55
57
|
@book = test(?s,File.join(book_path,'index.yml')) ? YAML.load(File.open(File.join(book_path,'index.yml'))) : {files: []}
|
56
58
|
end
|
57
59
|
|
60
|
+
#save catalog file
|
58
61
|
def save_book
|
59
62
|
File.open(File.join(book_path,'index.yml' ),'w') do |f|
|
60
63
|
f.write(@book.to_yaml)
|
@@ -65,52 +68,54 @@ module EpubBook
|
|
65
68
|
#创建书本
|
66
69
|
def generate_book(book_name=nil)
|
67
70
|
#获取epub源数据
|
68
|
-
|
69
|
-
if !@cover_css && @cover
|
70
|
-
generate_cover = <<-eof
|
71
|
-
convert #{File.expand_path("../../../#{@cover}",__FILE__)} -font tsxc.ttf -gravity center -fill red -pointsize 16 -draw "text 0,0 '#{book[:title]}'" #{File.join(book_path,@cover)}
|
72
|
-
eof
|
73
|
-
system(generate_cover)
|
74
|
-
end
|
75
|
-
|
76
|
-
epub = EeePub.make
|
77
|
-
|
78
|
-
epub.title book[:title]
|
79
|
-
epub.creator @creator
|
80
|
-
epub.publisher @creator
|
81
|
-
epub.date Time.now
|
82
|
-
epub.identifier "http://javy_liu.com/book/#{@folder_name}", :scheme => 'URL'
|
83
|
-
epub.uid "http://javy_liu.com/book/#{@folder_name}"
|
84
|
-
epub.cover @cover
|
85
|
-
epub.subject book[:title]
|
86
|
-
epub.description book[:description] if book[:description]
|
87
|
-
|
88
|
-
book[:files] = book[:files][0...limit] if limit
|
89
|
-
_files = []
|
90
|
-
book[:files].collect! do |item|
|
91
|
-
_file = File.join(book_path,item[:content])
|
92
|
-
if test(?f, _file)
|
93
|
-
_files.push(_file)
|
94
|
-
item
|
95
|
-
end
|
96
|
-
end
|
97
|
-
book[:files].compact!
|
71
|
+
fetch_index if !test(?s,File.join(book_path,'index.yml'))
|
98
72
|
|
99
|
-
|
100
|
-
epub.nav book[:files]
|
73
|
+
book[:file_abs_name] = File.join(book_path,"#{book[:title]}.#{ext_name}")
|
101
74
|
|
102
|
-
|
75
|
+
fetch_book
|
76
|
+
if ext_name == 'epub'
|
77
|
+
if !@cover_css && @cover
|
78
|
+
generate_cover = <<-eof
|
79
|
+
convert #{File.expand_path("../../../#{@cover}",__FILE__)} -font tsxc.ttf -gravity center -fill red -pointsize 16 -draw "text 0,0 '#{book[:title]}'" #{File.join(book_path,@cover)}
|
80
|
+
eof
|
81
|
+
system(generate_cover)
|
82
|
+
end
|
103
83
|
|
104
|
-
|
84
|
+
epub = EeePub.make
|
85
|
+
|
86
|
+
epub.title book[:title]
|
87
|
+
epub.creator @creator
|
88
|
+
epub.publisher @creator
|
89
|
+
epub.date Time.now
|
90
|
+
epub.identifier "http://javy_liu.com/book/#{@folder_name}", :scheme => 'URL'
|
91
|
+
epub.uid "http://javy_liu.com/book/#{@folder_name}"
|
92
|
+
epub.cover @cover
|
93
|
+
epub.subject book[:title]
|
94
|
+
epub.description book[:description] if book[:description]
|
95
|
+
|
96
|
+
book[:files] = book[:files][0...limit] if limit
|
97
|
+
_files = []
|
98
|
+
book[:files].collect! do |item|
|
99
|
+
_file = File.join(book_path,item[:content])
|
100
|
+
if test(?f, _file)
|
101
|
+
_files.push(_file)
|
102
|
+
item
|
103
|
+
end
|
104
|
+
end
|
105
|
+
book[:files].compact!
|
105
106
|
|
106
|
-
|
107
|
+
epub.files _files.push(File.join(book_path,@cover))
|
108
|
+
epub.nav book[:files]
|
109
|
+
yield self if block_given?
|
107
110
|
|
111
|
+
epub.save(book[:file_abs_name])
|
112
|
+
end
|
108
113
|
#send mail
|
109
114
|
|
110
115
|
if mail_to
|
111
116
|
mailer = Mailer.new
|
112
117
|
mailer.to = mail_to
|
113
|
-
mailer.add_file book[:
|
118
|
+
mailer.add_file book[:file_abs_name]
|
114
119
|
mailer.body = "您创建的电子书[#{book[:title]}]见附件\n"
|
115
120
|
mailer.send_mail
|
116
121
|
end
|
@@ -121,20 +126,22 @@ module EpubBook
|
|
121
126
|
def fetch_index(url=nil)
|
122
127
|
book[:files] = []
|
123
128
|
url ||= @index_url
|
124
|
-
doc = Nokogiri::HTML(judge_encoding(HTTP.headers("User-Agent" => @user_agent ,'Referer'=> @referer).get(
|
129
|
+
doc = Nokogiri::HTML(judge_encoding(HTTP.headers("User-Agent" => @user_agent ,'Referer'=> @referer).get(url).to_s))
|
125
130
|
#generate index.yml
|
131
|
+
EpubBook.logger.info "------Fetch index--#{url}---------------"
|
126
132
|
|
127
133
|
if !book[:title]
|
128
134
|
doc1 = if @des_url.nil?
|
129
135
|
doc
|
130
136
|
else
|
131
|
-
Nokogiri::HTML(judge_encoding(HTTP.headers("User-Agent" => @user_agent ,'Referer'=> @referer).get(
|
137
|
+
Nokogiri::HTML(judge_encoding(HTTP.headers("User-Agent" => @user_agent ,'Referer'=> @referer).get(generate_abs_url(doc.css(@des_url).attr("href").to_s)).to_s))
|
132
138
|
end
|
133
139
|
get_des(doc1)
|
134
140
|
end
|
135
141
|
|
142
|
+
#binding.pry
|
136
143
|
doc.css(@index_item_css).each do |item|
|
137
|
-
_href =
|
144
|
+
_href = item.attr(@item_attr).to_s
|
138
145
|
next if _href.start_with?('javascript') || _href.start_with?('#')
|
139
146
|
|
140
147
|
_href = generate_abs_url(_href)
|
@@ -159,22 +166,40 @@ module EpubBook
|
|
159
166
|
|
160
167
|
def fetch_book
|
161
168
|
#重新得到书目,如果不存在或重新索引的话
|
162
|
-
fetch_index if !test(?s,File.join(book_path,'index.yml'))
|
169
|
+
#fetch_index if !test(?s,File.join(book_path,'index.yml'))
|
163
170
|
EpubBook.logger.info "------Fetch book----------"
|
171
|
+
#open a txt file to write
|
172
|
+
if ext_name == 'txt'
|
173
|
+
txt_file = File.open(book[:file_abs_name], 'a')
|
174
|
+
txt_file.write("简介\n\n")
|
175
|
+
txt_file.write(' ')
|
176
|
+
txt_file.write(book[:description] || " ")
|
177
|
+
end
|
178
|
+
|
164
179
|
book[:files].each_with_index do |item,index|
|
165
180
|
break if limit && index >= limit
|
166
181
|
|
167
182
|
content_path = File.join(book_path,item[:content])
|
168
183
|
|
169
184
|
#如果文件存在且长度不为0则获取下一个
|
185
|
+
#binding.pry
|
170
186
|
next if test(?s,content_path)
|
171
187
|
|
172
188
|
begin
|
173
189
|
doc_file = Nokogiri::HTML(judge_encoding(HTTP.headers("User-Agent" => @user_agent,'Referer'=> @referer).get(item[:url]).to_s))
|
174
190
|
|
175
|
-
|
176
|
-
|
177
|
-
|
191
|
+
EpubBook.logger.info item[:label]
|
192
|
+
#binding.pry
|
193
|
+
if ext_name == 'pub'
|
194
|
+
File.open(content_path,'w') do |f|
|
195
|
+
f.write("<h3>#{item[:label]}</h3>")
|
196
|
+
f.write(doc_file.css(@body_css).to_s.gsub(Reg,''))
|
197
|
+
end
|
198
|
+
else
|
199
|
+
txt_file.write("\n\n")
|
200
|
+
txt_file.write(item[:label])
|
201
|
+
txt_file.write("\n ")
|
202
|
+
txt_file.write(doc_file.css(@body_css).text)
|
178
203
|
end
|
179
204
|
rescue Exception => e
|
180
205
|
EpubBook.logger.info "Error:#{e.message},#{item.inspect}"
|
@@ -182,6 +207,15 @@ module EpubBook
|
|
182
207
|
next
|
183
208
|
end
|
184
209
|
end
|
210
|
+
if ext_name == 'txt'
|
211
|
+
txt_file.close
|
212
|
+
EpubBook.logger.info "=============去除包含指定忽略字符的行======="
|
213
|
+
EpubBook.logger.info ignore_txt
|
214
|
+
if ignore_txt
|
215
|
+
system("sed -i 's/#{ignore_txt}//' #{book[:file_abs_name]}")
|
216
|
+
end
|
217
|
+
|
218
|
+
end
|
185
219
|
|
186
220
|
end
|
187
221
|
|
@@ -189,15 +223,23 @@ module EpubBook
|
|
189
223
|
private
|
190
224
|
#is valid encoding
|
191
225
|
def judge_encoding(str)
|
192
|
-
|
226
|
+
EpubBook.logger.info str.encoding
|
227
|
+
/<meta.*?charset\s*=[\s\"\']?utf-8/i =~ str ? str : str.force_encoding('gbk').encode!('utf-8',invalid: :replace, undef: :replace)
|
193
228
|
str.scrub! unless str.valid_encoding?
|
229
|
+
|
230
|
+
EpubBook.logger.info "-------encode 后 #{str.encoding}"
|
194
231
|
str
|
195
232
|
end
|
196
233
|
|
197
234
|
#得到书名,介绍,及封面
|
198
235
|
def get_des(doc)
|
199
236
|
book[:title] = doc.css(@title_css).text.strip
|
200
|
-
|
237
|
+
|
238
|
+
#EpubBook.logger.info doc
|
239
|
+
#EpubBook.logger.info @title_css
|
240
|
+
|
241
|
+
#binding.pry
|
242
|
+
if @cover_css && !book[:cover] && ext_name == 'epub'
|
201
243
|
cover_url = doc.css(@cover_css).attr("src").to_s
|
202
244
|
cover_url = generate_abs_url(cover_url) #link_host + cover_url unless cover_url.start_with?("http")
|
203
245
|
cover_path = File.join(book_path,@cover)
|
data/lib/epub_book/loggable.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'logger'
|
1
2
|
module EpubBook
|
2
3
|
|
3
4
|
# Contains logging behaviour.
|
@@ -46,7 +47,7 @@ module EpubBook
|
|
46
47
|
#
|
47
48
|
# @since 3.0.0
|
48
49
|
def default_logger
|
49
|
-
logger = Logger.new($stdout)
|
50
|
+
logger = ::Logger.new($stdout)
|
50
51
|
logger.level = EpubBook.config.log_level
|
51
52
|
logger
|
52
53
|
end
|
data/lib/epub_book/version.rb
CHANGED
data/lib/epub_book.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
require_relative "epub_book/version"
|
2
|
+
require_relative 'epub_book/book'
|
3
|
+
require_relative 'epub_book/loggable'
|
4
4
|
require 'mail'
|
5
5
|
|
6
6
|
module EpubBook
|
@@ -8,7 +8,7 @@ module EpubBook
|
|
8
8
|
autoload :Book, "epub_book/book"
|
9
9
|
autoload :Mailer, "epub_book/mailer"
|
10
10
|
|
11
|
-
Config = Struct.new(:setting_file,:mail_from,:mail_subject,:mail_body,:mail_address,:mail_port,:mail_user_name,:mail_password,:log_level) do
|
11
|
+
Config = Struct.new(:setting_file,:mail_from,:mail_subject,:mail_body,:mail_address,:mail_port,:mail_user_name,:mail_password,:log_level, :ext_name) do
|
12
12
|
include Singleton
|
13
13
|
def initialize
|
14
14
|
self.mail_subject = 'epub 电子书'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: epub_book
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- qmliu
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -16,98 +16,116 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1.11'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 1.11.4
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
41
|
- - "~>"
|
39
42
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
43
|
+
version: '1.11'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.11.4
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: eeepub
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
51
|
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
53
|
+
version: 0.8.1
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
60
|
+
version: 0.8.1
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: zip-zip
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
65
|
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
67
|
+
version: '0.3'
|
62
68
|
type: :runtime
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
72
|
- - "~>"
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
74
|
+
version: '0.3'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: mail
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
72
78
|
requirements:
|
73
79
|
- - "~>"
|
74
80
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
81
|
+
version: 2.7.0
|
76
82
|
type: :runtime
|
77
83
|
prerelease: false
|
78
84
|
version_requirements: !ruby/object:Gem::Requirement
|
79
85
|
requirements:
|
80
86
|
- - "~>"
|
81
87
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
88
|
+
version: 2.7.0
|
83
89
|
- !ruby/object:Gem::Dependency
|
84
90
|
name: bundler
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
86
92
|
requirements:
|
87
93
|
- - "~>"
|
88
94
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
95
|
+
version: '2.2'
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 2.2.27
|
90
99
|
type: :development
|
91
100
|
prerelease: false
|
92
101
|
version_requirements: !ruby/object:Gem::Requirement
|
93
102
|
requirements:
|
94
103
|
- - "~>"
|
95
104
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
105
|
+
version: '2.2'
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: 2.2.27
|
97
109
|
- !ruby/object:Gem::Dependency
|
98
110
|
name: rake
|
99
111
|
requirement: !ruby/object:Gem::Requirement
|
100
112
|
requirements:
|
101
113
|
- - "~>"
|
102
114
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
115
|
+
version: '12.3'
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: 12.3.3
|
104
119
|
type: :development
|
105
120
|
prerelease: false
|
106
121
|
version_requirements: !ruby/object:Gem::Requirement
|
107
122
|
requirements:
|
108
123
|
- - "~>"
|
109
124
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
125
|
+
version: '12.3'
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: 12.3.3
|
111
129
|
- !ruby/object:Gem::Dependency
|
112
130
|
name: rspec
|
113
131
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,28 +146,60 @@ dependencies:
|
|
128
146
|
requirements:
|
129
147
|
- - "~>"
|
130
148
|
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
149
|
+
version: '0.14'
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.14.1
|
132
153
|
type: :development
|
133
154
|
prerelease: false
|
134
155
|
version_requirements: !ruby/object:Gem::Requirement
|
135
156
|
requirements:
|
136
157
|
- - "~>"
|
137
158
|
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
159
|
+
version: '0.14'
|
160
|
+
- - ">="
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: 0.14.1
|
163
|
+
- !ruby/object:Gem::Dependency
|
164
|
+
name: pry-byebug
|
165
|
+
requirement: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- - "~>"
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '3.8'
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: 3.8.0
|
173
|
+
type: :development
|
174
|
+
prerelease: false
|
175
|
+
version_requirements: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - "~>"
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '3.8'
|
180
|
+
- - ">="
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: 3.8.0
|
139
183
|
- !ruby/object:Gem::Dependency
|
140
184
|
name: pry-doc
|
141
185
|
requirement: !ruby/object:Gem::Requirement
|
142
186
|
requirements:
|
143
187
|
- - "~>"
|
144
188
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
189
|
+
version: '1.2'
|
190
|
+
- - ">="
|
191
|
+
- !ruby/object:Gem::Version
|
192
|
+
version: 1.2.0
|
146
193
|
type: :development
|
147
194
|
prerelease: false
|
148
195
|
version_requirements: !ruby/object:Gem::Requirement
|
149
196
|
requirements:
|
150
197
|
- - "~>"
|
151
198
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
199
|
+
version: '1.2'
|
200
|
+
- - ">="
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
version: 1.2.0
|
153
203
|
description: 'create epub from a book index url and mail to you. by setting a default_setting.yml
|
154
204
|
you can use it in shell. '
|
155
205
|
email:
|
@@ -167,8 +217,6 @@ files:
|
|
167
217
|
- LICENSE.txt
|
168
218
|
- README.md
|
169
219
|
- Rakefile
|
170
|
-
- bin/console
|
171
|
-
- bin/setup
|
172
220
|
- cover.jpg
|
173
221
|
- epub_book.gemspec
|
174
222
|
- exe/create_book
|
@@ -183,7 +231,7 @@ licenses:
|
|
183
231
|
- MIT
|
184
232
|
metadata:
|
185
233
|
allowed_push_host: https://rubygems.org
|
186
|
-
post_install_message:
|
234
|
+
post_install_message:
|
187
235
|
rdoc_options: []
|
188
236
|
require_paths:
|
189
237
|
- lib
|
@@ -198,9 +246,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
246
|
- !ruby/object:Gem::Version
|
199
247
|
version: '0'
|
200
248
|
requirements: []
|
201
|
-
|
202
|
-
|
203
|
-
signing_key:
|
249
|
+
rubygems_version: 3.2.3
|
250
|
+
signing_key:
|
204
251
|
specification_version: 4
|
205
252
|
summary: create epub from a book index url and mail to you.
|
206
253
|
test_files: []
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "epub_book"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
require "pry"
|
11
|
-
Pry.start
|
12
|
-
|
13
|
-
#require "irb"
|
14
|
-
#IRB.start
|