epub_book 0.1.17 → 0.1.23

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: da90462dcefd8f95b3591adec93ca673f192c981
4
- data.tar.gz: b0af4b9ed6486b59c222cff218a1edd8d6e37c64
2
+ SHA256:
3
+ metadata.gz: 44b412b721dc1e443c1a9bb1a685f2e6968ff0c8506bf9be113f94e4827f4da0
4
+ data.tar.gz: 8e5344dd88fd9e3f550e6962912dae4fe67057f214f08852188642c9d92bfc6d
5
5
  SHA512:
6
- metadata.gz: 951efc7f602fc6a63d000a116a010605154dcbd53e88187ac6e9189868fe0609f39f8a64f67c2e94925ae720521eaab40e892c2cef2989c7f8bbbe4a7f787baa
7
- data.tar.gz: ba37d2daddb9c2cf60029cda72cd50df8137a9c7c6cd1e6b3116ef40fe696e07b34caecdce7aab62b99090b2eb86e069d10a978367e38cf103aef72f5cdea9eb
6
+ metadata.gz: cee0921eee24cc47105b595e850612c7cf34f9a8ebd2de1d447867f59eaaf1624847f3526a6313ecb61ef447477df26e6a2d11d2fb1a5827b5b72697bfdf0c9b
7
+ data.tar.gz: 6ef82d375814323d227f8c210ae14f2d498aff710ae9268b38c78af32b0723fd8a367cebb40a4f00c7346ebd6ca7789f17be2d6100883b0e99564a2baaa5dbee
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
- source 'https://ruby.taobao.org'
1
+ #source 'https://ruby.taobao.org'
2
+ source 'https://gems.ruby-china.com/'
2
3
 
3
4
  # Specify your gem's dependencies in epub_book.gemspec
4
5
  gemspec
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
@@ -28,15 +28,16 @@ Gem::Specification.new do |spec|
28
28
  spec.require_paths = ["lib"]
29
29
 
30
30
  spec.add_dependency 'http','~> 2.1'
31
- spec.add_dependency 'nokogiri','~> 1.6'
32
- spec.add_dependency 'eeepub'
33
- spec.add_dependency 'zip-zip'
34
- spec.add_dependency 'mail'
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 "bundler", "~> 1.12"
38
- spec.add_development_dependency "rake", "~> 10.0"
37
+ spec.add_development_dependency 'bundler', '~> 2.2', '>= 2.2.27'
38
+ spec.add_development_dependency "rake", '~> 13.0','>= 13.0.6'
39
39
  spec.add_development_dependency "rspec", "~> 3.0"
40
- spec.add_development_dependency "pry"
41
- spec.add_development_dependency "pry-doc"
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
@@ -16,12 +16,13 @@ require 'yaml'
16
16
  #user_agent 访问代理
17
17
  #referer 访问原地址
18
18
  #creator 责任人
19
-
19
+ #ext_name 扩展名 epub,txt
20
+ #ignore_txt 忽略字符,带有ignore_txt的行将被删除
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(http:\/\/.*?)\/\w+/,1]
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
- fetch_book
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
- epub.files _files.push(File.join(book_path,@cover))
100
- epub.nav book[:files]
73
+ book[:file_abs_name] = File.join(book_path,"#{book[:title]}.#{ext_name}")
101
74
 
102
- book[:epub_file] = File.join(book_path,"#{book_name || @folder_name}.epub")
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
- yield self if block_given?
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
- epub.save(book[:epub_file])
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[:epub_file]
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(URI.encode(url)).to_s))
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(URI.encode(generate_abs_url(doc.css(@des_url).attr("href").to_s))).to_s))
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 = URI.encode(item.attr(@item_attr).to_s)
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
- File.open(content_path,'w') do |f|
176
- f.write("<h3>#{item[:label]}</h3>")
177
- f.write(doc_file.css(@body_css).to_s.gsub(Reg,''))
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 -r '/#{ignore_txt}/d' #{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
- /<meta.*?charset\s*=[\s\"\']?utf-8/i =~ str ? str : str.force_encoding('gbk').encode('utf-8',invalid: :replace, undef: :replace)
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
- if @cover_css && !book[:cover]
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)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module EpubBook
2
- VERSION = "0.1.17"
2
+ VERSION = "0.1.23"
3
3
  end
data/lib/epub_book.rb CHANGED
@@ -1,6 +1,6 @@
1
- require "epub_book/version"
2
- require 'epub_book/book'
3
- require 'epub_book/loggable'
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.17
4
+ version: 0.1.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - qmliu
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-27 00:00:00.000000000 Z
11
+ date: 2021-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -30,84 +30,102 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.6'
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: '1.6'
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: '0'
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: '0'
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: '0'
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: '0'
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: '1.12'
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: '1.12'
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: '10.0'
115
+ version: '13.0'
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: 13.0.6
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: '10.0'
125
+ version: '13.0'
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: 13.0.6
111
129
  - !ruby/object:Gem::Dependency
112
130
  name: rspec
113
131
  requirement: !ruby/object:Gem::Requirement
@@ -126,30 +144,62 @@ dependencies:
126
144
  name: pry
127
145
  requirement: !ruby/object:Gem::Requirement
128
146
  requirements:
147
+ - - "~>"
148
+ - !ruby/object:Gem::Version
149
+ version: '0.14'
129
150
  - - ">="
130
151
  - !ruby/object:Gem::Version
131
- version: '0'
152
+ version: 0.14.1
132
153
  type: :development
133
154
  prerelease: false
134
155
  version_requirements: !ruby/object:Gem::Requirement
135
156
  requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.14'
136
160
  - - ">="
137
161
  - !ruby/object:Gem::Version
138
- version: '0'
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:
187
+ - - "~>"
188
+ - !ruby/object:Gem::Version
189
+ version: '1.2'
143
190
  - - ">="
144
191
  - !ruby/object:Gem::Version
145
- version: '0'
192
+ version: 1.2.0
146
193
  type: :development
147
194
  prerelease: false
148
195
  version_requirements: !ruby/object:Gem::Requirement
149
196
  requirements:
197
+ - - "~>"
198
+ - !ruby/object:Gem::Version
199
+ version: '1.2'
150
200
  - - ">="
151
201
  - !ruby/object:Gem::Version
152
- version: '0'
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
- rubyforge_project:
202
- rubygems_version: 2.4.8
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
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here