link2epub 0.0.1 → 0.0.2

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +13 -0
  3. data/lib/link2epub.rb +3 -3
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ded3727b3eb3223ef2c324fb86de08e001b8315
4
- data.tar.gz: 766a4fadfb0050e8c9e13908a4499cf8cafec700
3
+ metadata.gz: b750a9c75c75125fb8a6658fdcb531130e00a0b6
4
+ data.tar.gz: b6d9ec1a73cfb41bffa3cf7e53adba5009793921
5
5
  SHA512:
6
- metadata.gz: d8e6d0841ca4560388ef7290a00fa149b93feea9e35a03b6dc0fac6d4a333b715b6f038c4af2eaffac096c6f84f4b1e2fb23cf45cc625dfe058aeb4c628be1a1
7
- data.tar.gz: d157f16bc237fec354ea8d950e3fd8a1c4ed2b79cacdfa2cef9b68a9a771112d08c0fcfff89a4492caffe78e235a6375efbe29c1e0ed465a254805d892c5149a
6
+ metadata.gz: b4246942f04f12aba9b71a9ec0ceb6dda385fbf167ee1674ce44f29e391186bc8e3ad5541bdcc703e4692fb6514e5072ca7d041a87b253e25e824f90b40a4f7d
7
+ data.tar.gz: 9bffefda1986845dc2ffe98acc48fcc6a6959c5347d3504bc0296972e8abea9df7039969ea599dd103a8d7456b0af5f85b95368a91a8d7faef2bbd6036ea0820
data/Rakefile CHANGED
@@ -3,9 +3,22 @@ task :help do
3
3
  puts "commands:"
4
4
  puts "rake help"
5
5
  puts "rake build"
6
+ puts "rake push"
6
7
  end
7
8
 
9
+ task :default => :help
10
+
8
11
  desc "build"
9
12
  task :build do
10
13
  sh 'gem build link2epub.gemspec'
11
14
  end
15
+
16
+ desc "push gem to http://rubygems.org"
17
+ task :push do
18
+ sh 'gem push *.gem'
19
+ end
20
+
21
+ desc "examples"
22
+ task :example do
23
+ sh 'cd examples; link2epub conf.yaml'
24
+ end
@@ -55,7 +55,7 @@ class Epub
55
55
  def getArticles
56
56
  @links.each_with_index do |l, i|
57
57
  art = Article.new(l)
58
- art.tpl = "./tpl/article.tpl"
58
+ art.tpl = "../tpl/article.tpl"
59
59
  art.file = "./file#{i+1}.html"
60
60
  art.content = Nokogiri::HTML(open(art.link)).css('.post .content').to_html
61
61
  art.title = Nokogiri::HTML(open(art.link)).css('.post h2').text
@@ -90,8 +90,8 @@ class Epub
90
90
  def to_epub
91
91
  getArticles
92
92
  getTitles
93
- createFile('./tpl/nav.tpl', './nav.html')
94
- createFile('./tpl/index.tpl', './index.html')
93
+ createFile('../tpl/nav.tpl', './nav.html')
94
+ createFile('../tpl/index.tpl', './index.html')
95
95
  conf = @conf
96
96
  articles = @articles
97
97
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: link2epub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - lyuehh