kindai 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.rdoc +4 -9
  2. data/VERSION +1 -1
  3. data/kindai.gemspec +1 -1
  4. data/lib/kindai/cli.rb +5 -1
  5. metadata +16 -16
data/README.rdoc CHANGED
@@ -12,6 +12,8 @@ RubyGemsからインストールできます.
12
12
 
13
13
  == 使い方
14
14
 
15
+ gemをインストールすると,kindai.rbというコマンドがインストールされます.
16
+
15
17
  起動時の引数に,ダウンロードしたい本の URL を指定します.スペース区切りで複数指定できます.
16
18
 
17
19
  kindai.rb http://kindai.ndl.go.jp/info:ndljp/pid/922693
@@ -25,11 +27,6 @@ URL の代わりに検索ワードを指定すると,ヒットした本をま
25
27
 
26
28
  kindai.rb http://kindai.ndl.go.jp/info:ndljp/pid/922693 --output ~/Documents/
27
29
 
28
- --retry オプションで,ダウンロードのリトライ回数を指定できます.標準では3回です.
29
-
30
- kindai.rb http://kindai.ndl.go.jp/info:ndljp/pid/922693 --retry 10
31
-
32
-
33
30
  == 本の加工(自動)
34
31
 
35
32
  ダウンロードされた本は読みやすいように加工され, iPhone 用と Kindle 用のファイルが作られます.
@@ -60,16 +57,14 @@ URL の代わりに検索ワードを指定すると,ヒットした本をま
60
57
 
61
58
  トリミング位置は自動的に決められますが,ダウンロード後に,ずれていることが分かった場合は,publish.rbを使ってトリミング位置を指定できます.
62
59
 
63
- publish.rb --position 2905x2510+270+190 "~/Documents/正義熱血社 - 正義の叫"
60
+ kindai.rb publish --position 2905x2510+270+190 "~/Documents/正義熱血社 - 正義の叫"
64
61
 
65
62
  幅2905ピクセル,高さ2510ピクセル,左の余白270ピクセル,上の余白190ピクセルでトリミングされます.
66
63
 
67
64
  == 動作環境
68
65
 
69
66
  * Ruby が必要です.
70
- * ImageMagick が必要です.
71
- * Nokogiri と RMagick が必要です,RubyGems でインストールしてください.
72
- * Gemfile を書いてあるので,bundler が入ってる環境では bundle install コマンドを実行するだけで必要な Gem が入ります.
67
+ * RMagickを使っているので,ImageMagick が必要です.
73
68
 
74
69
  == その他
75
70
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.0
1
+ 1.5.0
data/kindai.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{kindai}
8
- s.version = "1.4.0"
8
+ s.version = "1.5.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["hitode909"]
data/lib/kindai/cli.rb CHANGED
@@ -4,6 +4,8 @@ require 'optparse'
4
4
  module Kindai
5
5
  class CLI
6
6
  BANNER = <<EOF
7
+ kindai.rb - the kindai digital library downloader
8
+
7
9
  download:
8
10
  by url: kindai.rb http://kindai.ndl.go.jp/info:ndljp/pid/922693
9
11
  by keyword: kindai.rb 調理法
@@ -11,6 +13,8 @@ download:
11
13
  publish:
12
14
  auto: kindai.rb publish '~/Desktop/石川,一口;丸山,平次郎 - 講談幽霊の片袖'
13
15
  manual: kindai.rb publish --position 2850x2450+320+380 '~/Desktop/石川,一口;丸山,平次郎 - 講談幽霊の片袖'
16
+
17
+ options:
14
18
  EOF
15
19
 
16
20
  def self.execute(stdout, arguments=[])
@@ -31,7 +35,7 @@ EOF
31
35
  opt.on('--debug', 'enable debug mode') {|v|
32
36
  Kindai::Util.debug_mode!
33
37
  }
34
- opt.on('--retry TIMES', 'retry times (default is 3)') {|v|
38
+ opt.on('--retry TIMES', 'retry times (default is 30)') {|v|
35
39
  config[:retry_count] = v.to_i
36
40
  }
37
41
  opt.parse!(arguments)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kindai
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ default_executable: kindai.rb
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nokogiri
17
- requirement: &2152981720 !ruby/object:Gem::Requirement
17
+ requirement: &2153069840 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2152981720
25
+ version_requirements: *2153069840
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rmagick
28
- requirement: &2152980780 !ruby/object:Gem::Requirement
28
+ requirement: &2153069260 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2152980780
36
+ version_requirements: *2153069260
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: zipruby
39
- requirement: &2152979960 !ruby/object:Gem::Requirement
39
+ requirement: &2153068760 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2152979960
47
+ version_requirements: *2153068760
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rspec
50
- requirement: &2152979040 !ruby/object:Gem::Requirement
50
+ requirement: &2153068040 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 2.3.0
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *2152979040
58
+ version_requirements: *2153068040
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: bundler
61
- requirement: &2152978140 !ruby/object:Gem::Requirement
61
+ requirement: &2153067280 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 1.0.0
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *2152978140
69
+ version_requirements: *2153067280
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: jeweler
72
- requirement: &2152973120 !ruby/object:Gem::Requirement
72
+ requirement: &2153066660 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 1.5.2
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *2152973120
80
+ version_requirements: *2153066660
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: rcov
83
- requirement: &2152972300 !ruby/object:Gem::Requirement
83
+ requirement: &2153065860 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ! '>='
@@ -88,7 +88,7 @@ dependencies:
88
88
  version: '0'
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *2152972300
91
+ version_requirements: *2153065860
92
92
  description: kindai.rb is kindai digital library downloader.
93
93
  email: hitode909@gmail.com
94
94
  executables:
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  segments:
146
146
  - 0
147
- hash: 1084570007466744332
147
+ hash: 3335335670494265865
148
148
  required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements: