komic-cli 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fbdc149c735015311df034e0f1c60605de5248aa
4
+ data.tar.gz: 1d81e3e6f749dde7578d49c881e4bd40e8c114d8
5
+ SHA512:
6
+ metadata.gz: 51ff0497fd3f1f643094e50ab0fb2298cfdc7c64bd5d20fd991c0e863e51b58662f6ad2eecfd1a1156298fcc99efe319c46c8348b8669344b5e710dfdd015389
7
+ data.tar.gz: 6b10b60da03d9e1da1d58b09c6abcb3dd248d8af724c3851e7fb2193252a3cc0eaaea824441242bf1a4241394a1f547f46164b6f3445e1026cca39b41d44f174
data/.document ADDED
@@ -0,0 +1,4 @@
1
+ lib/**/*.rb
2
+ README.rdoc
3
+ ChangeLog.rdoc
4
+ LICENSE.txt
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ Gemfile.lock
2
+ html/
3
+ pkg/
4
+ vendor/cache/*.gem
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --colour --format documentation
data/ChangeLog.rdoc ADDED
@@ -0,0 +1,4 @@
1
+ === 0.1.0 / 2015-07-31
2
+
3
+ * Initial release:
4
+
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://ruby.taobao.org"
2
+
3
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2015 hxgdzyuyi
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,27 @@
1
+ = komic-cli
2
+
3
+ * {Homepage}[https://rubygems.org/gems/komic-cli]
4
+ * {Documentation}[http://rubydoc.info/gems/komic-cli/frames]
5
+ * {Email}[mailto:hxgdzyuyi at gmail.com]
6
+
7
+ == Description
8
+
9
+ TODO: Description
10
+
11
+ == Features
12
+
13
+ == Examples
14
+
15
+ require 'komic/cli'
16
+
17
+ == Requirements
18
+
19
+ == Install
20
+
21
+ $ gem install komic-cli
22
+
23
+ == Copyright
24
+
25
+ Copyright (c) 2015 hxgdzyuyi
26
+
27
+ See LICENSE.txt for details.
data/Rakefile ADDED
@@ -0,0 +1,36 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+
5
+ begin
6
+ require 'bundler'
7
+ rescue LoadError => e
8
+ warn e.message
9
+ warn "Run `gem install bundler` to install Bundler."
10
+ exit -1
11
+ end
12
+
13
+ begin
14
+ Bundler.setup(:development)
15
+ rescue Bundler::BundlerError => e
16
+ warn e.message
17
+ warn "Run `bundle install` to install missing gems."
18
+ exit e.status_code
19
+ end
20
+
21
+ require 'rake'
22
+
23
+ require 'rubygems/tasks'
24
+ Gem::Tasks.new
25
+
26
+ require 'rdoc/task'
27
+ RDoc::Task.new do |rdoc|
28
+ rdoc.title = "komic-cli"
29
+ end
30
+ task :doc => :rdoc
31
+
32
+ require 'rspec/core/rake_task'
33
+ RSpec::Core::RakeTask.new
34
+
35
+ task :test => :spec
36
+ task :default => :spec
data/bin/komic ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+
5
+ begin
6
+ require 'komic'
7
+ rescue LoadError => e
8
+ abort 'Could not load "komic"'
9
+ end
10
+
11
+ Komic::Cli.start( ARGV )
data/komic-cli.gemspec ADDED
@@ -0,0 +1,35 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ lib_dir = File.join(File.dirname(__FILE__),'lib')
4
+ $LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir)
5
+
6
+ require 'komic/version'
7
+
8
+ Gem::Specification.new do |gem|
9
+ gem.name = "komic-cli"
10
+ gem.version = Komic::VERSION
11
+ gem.summary = %q{ komic-cli }
12
+ gem.description = %q{ komic-cli }
13
+ gem.license = "MIT"
14
+ gem.authors = ["hxgdzyuyi"]
15
+ gem.email = "hxgdzyuyi@gmail.com"
16
+ gem.homepage = "https://rubygems.org/gems/komic-cli"
17
+
18
+ gem.files = `git ls-files`.split($/)
19
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
20
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
21
+ gem.require_paths = ['lib']
22
+
23
+ gem.add_runtime_dependency 'thor', '~> 0.19'
24
+ gem.add_runtime_dependency 'mechanize', '~> 2.7'
25
+ gem.add_runtime_dependency 'mime-types', '~> 2.6'
26
+ gem.add_runtime_dependency 'mini_magick', '~> 4.2'
27
+ gem.add_runtime_dependency 'jbuilder', '~> 2.3'
28
+ gem.add_runtime_dependency 'json-schema', '~> 2.5'
29
+
30
+ gem.add_development_dependency 'bundler', '~> 1.0'
31
+ gem.add_development_dependency 'rake', '~> 0.8'
32
+ gem.add_development_dependency 'rdoc', '~> 3.0'
33
+ gem.add_development_dependency 'rspec', '~> 3.3'
34
+ gem.add_development_dependency 'rubygems-tasks', '~> 0.2'
35
+ end
data/lib/komic/cli.rb ADDED
@@ -0,0 +1,35 @@
1
+ require 'thor'
2
+ require 'komic/crawler/douban'
3
+ require 'komic/generator/generator'
4
+ require 'mini_magick'
5
+
6
+ module Komic
7
+ # This module handles the Komic executables .
8
+ class Cli < Thor
9
+
10
+ map '-d' => :download
11
+
12
+ desc "download URL", "从 url 下载画册数据 (* 目前只支持豆瓣相册)"
13
+ option :name, default: "crawled_from_douban", desc: "设定文件夹名"
14
+ def download(url)
15
+ crawler = Komic::Crawler::Douban.new
16
+ title, images = crawler.get_crawled_result(url)
17
+ images = images.map do |image_path|
18
+ image = MiniMagick::Image.open(image_path)
19
+ { src: image_path, width: image.width, height: image.height }
20
+ end
21
+ generator = Komic::Generator.new
22
+ generator.create_package({ images: images, meta: { name: title } }, options)
23
+ end
24
+
25
+ desc "mock", "生成虚拟的画册数据"
26
+ option :'page-number', default: 6, desc: "设定页数"
27
+ option :size, default: "700-1024x900-1000", desc: "设定尺寸"
28
+ option :name, default: "mock", desc: "设定文件夹名"
29
+ def mock
30
+ generator = Komic::Generator.new
31
+ mocks = generator.generate_mocks options
32
+ generator.create_package({ images: mocks }, options)
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,84 @@
1
+ require 'mechanize'
2
+ require 'fileutils'
3
+ require 'mime/types'
4
+ require 'tmpdir'
5
+
6
+ module Komic
7
+ module Crawler
8
+ class Douban
9
+ def initialize
10
+ @mechanize = Mechanize.new
11
+ @file_index = 0
12
+ @tmpdir = Dir.mktmpdir
13
+ end
14
+
15
+ def get_crawled_result(album_home_url)
16
+ next_link_url = album_home_url
17
+ next_link = nil
18
+ album_title = nil
19
+
20
+ @mechanize.get(album_home_url) do |page|
21
+ album_title = page.at('title').text().strip!
22
+ end
23
+
24
+ loop do
25
+ begin
26
+ crawl_album_page(next_link_url)
27
+ rescue Exception => e
28
+ puts e.message
29
+ puts e.backtrace.inspect
30
+ end
31
+
32
+ @mechanize.get(next_link_url) do |page|
33
+ next_link = page.at('link[rel="next"]')
34
+ end
35
+ break if next_link.nil?
36
+ next_link_url = next_link["href"]
37
+ end
38
+
39
+ image_pathes = (Dir.entries(@tmpdir) - %w[. ..]).map do |path|
40
+ File.join(@tmpdir, path)
41
+ end
42
+
43
+ return album_title, image_pathes
44
+ end
45
+
46
+ def crawl_album_page(album_page_url)
47
+ @mechanize.get(album_page_url) do |page|
48
+ page.search('.photolst_photo').each do |link|
49
+ crawl_photo_page(link['href'])
50
+ end
51
+ end
52
+ end
53
+
54
+ def crawl_photo_page(photo_page_url)
55
+ link_to_large = nil
56
+ thumb_photo_url = nil
57
+
58
+ @mechanize.get(photo_page_url) do |page|
59
+ link_to_large = page.at('a[title="查看原图"]')
60
+ thumb_photo_url = page.at('.image-show-inner img')["src"]
61
+ end
62
+
63
+ unless link_to_large.nil?
64
+ @mechanize.get(link_to_large['href']) do |page|
65
+ download_image(page.at('#pic-viewer img')["src"])
66
+ end
67
+ else
68
+ download_image(thumb_photo_url)
69
+ end
70
+ end
71
+
72
+ def download_image(photo_url)
73
+ resource = @mechanize.get(photo_url)
74
+ content_type = resource["content-type"]
75
+ mime_type = MIME::Types[resource["content-type"]].first
76
+ resource.save(File.expand_path( \
77
+ [@file_index, mime_type.extensions.first].join('.'), @tmpdir))
78
+ @file_index = @file_index + 1
79
+ p 'current image is ' + @file_index.to_s
80
+ sleep 2
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,80 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "id": "/",
4
+ "type": "object",
5
+ "properties": {
6
+ "komic_cli_version": {
7
+ "id": "komic_version",
8
+ "type": "string"
9
+ },
10
+ "content_json_version": {
11
+ "id": "komic_version",
12
+ "type": "string"
13
+ },
14
+ "name": {
15
+ "id": "name",
16
+ "type": "string"
17
+ },
18
+ "author": {
19
+ "id": "author",
20
+ "type": "object",
21
+ "properties": {
22
+ "name": {
23
+ "id": "name",
24
+ "type": "string"
25
+ }
26
+ }
27
+ },
28
+ "description": {
29
+ "id": "description",
30
+ "type": "string"
31
+ },
32
+ "thumbnails": {
33
+ "id": "thumbnails",
34
+ "type": "object",
35
+ "properties": {
36
+ "height": {
37
+ "id": "height",
38
+ "type": "integer"
39
+ },
40
+ "path": {
41
+ "id": "path",
42
+ "type": "string"
43
+ }
44
+ }
45
+ },
46
+ "images": {
47
+ "id": "images",
48
+ "type": "array",
49
+ "items": [
50
+ {
51
+ "id": "0",
52
+ "type": "object",
53
+ "properties": {
54
+ "src": {
55
+ "id": "src",
56
+ "type": "string"
57
+ },
58
+ "width": {
59
+ "id": "width",
60
+ "type": "integer"
61
+ },
62
+ "height": {
63
+ "id": "height",
64
+ "type": "integer"
65
+ }
66
+ }
67
+ }
68
+ ]
69
+ }
70
+ },
71
+ "required": [
72
+ "komic_cli_version",
73
+ "content_json_version",
74
+ "name",
75
+ "author",
76
+ "description",
77
+ "thumbnails",
78
+ "images"
79
+ ]
80
+ }
@@ -0,0 +1,168 @@
1
+ require 'fileutils'
2
+ require 'tempfile'
3
+ require 'jbuilder'
4
+ require 'json'
5
+ require 'json-schema'
6
+ require 'mini_magick'
7
+ require 'base64'
8
+
9
+ require 'komic/version'
10
+ require 'komic/generator/helpers'
11
+
12
+ module Komic
13
+ class ThumbnailsBuilder
14
+ def initialize(files)
15
+ @images = files
16
+ end
17
+
18
+ def render_sprite_symbol(props)
19
+ id, mime_type, data, width, height = props.values
20
+
21
+ return %(
22
+ <symbol id="#{ id }">
23
+ <image xlink:href="data:#{mime_type};base64,#{ data }"
24
+ width="#{ width }" height="#{ height }"/>
25
+ </symbol>
26
+ )
27
+ end
28
+
29
+ def render_svg_sprite
30
+ sprites = @images.map.with_index do |image, index|
31
+ thumbnail = MiniMagick::Image.open(image[:src])
32
+ thumbnail.resize "x200"
33
+ thumbnail.format "jpeg"
34
+ render_sprite_symbol({
35
+ id: index,
36
+ mime_type: thumbnail.mime_type,
37
+ data: Base64.strict_encode64(thumbnail.to_blob),
38
+ width: thumbnail.width,
39
+ height: thumbnail.height
40
+ })
41
+ end
42
+
43
+ return %(
44
+ <svg xmlns="http://www.w3.org/2000/svg"
45
+ xmlns:xlink="http://www.w3.org/1999/xlink">
46
+ ) + sprites.join(' ') + %(</svg>)
47
+ end
48
+
49
+ def to_build
50
+ render_svg_sprite
51
+ end
52
+ end
53
+
54
+ class ContentBuilder
55
+ def initialize(meta, files)
56
+ @meta = meta
57
+ @images = files
58
+ end
59
+
60
+ def validate_json(data)
61
+ data = JSON.load(data)
62
+ schema = JSON.load(File.read(File.join(__dir__, './content.schema.json')))
63
+
64
+ begin
65
+ JSON::Validator.validate!(schema, data)
66
+ rescue JSON::Schema::ValidationError
67
+ puts $!.message
68
+ end
69
+ end
70
+
71
+ def to_build
72
+ content_builder = Jbuilder.new do |json|
73
+ json.komic_cli_version Komic::VERSION
74
+ json.content_json_version Komic::CONTENT_JSON_VERSION
75
+ json.(@meta, :name, :author, :description, :thumbnails)
76
+ json.images @images
77
+ end
78
+ data = content_builder.target!
79
+ validate_json(data)
80
+ return data
81
+ end
82
+ end
83
+
84
+ class Generator
85
+
86
+ def render_fake_svg(props)
87
+ width, height = props.values
88
+
89
+ return %(
90
+ <svg width="#{ width }" height="#{ height }"
91
+ xmlns="http://www.w3.org/2000/svg"
92
+ xmlns:xlink="http://www.w3.org/1999/xlink">
93
+ <rect width="100%" height="100%" fill="gray"></rect>
94
+ <text x="#{ width / 2 }" y="50%" dy=".3em" text-anchor="middle"
95
+ fill="white" font-size="30"
96
+ font-family="Comic Sans, Comic Sans MS, cursive">
97
+ #{ width } x #{ height }
98
+ </text>
99
+ </svg>
100
+ )
101
+ end
102
+
103
+ def create_fake_image(filename, size)
104
+ size = Helpers.parse_size(size)
105
+ file = Tempfile.new([filename, '.svg'])
106
+ image_width = size[:width]
107
+ image_height = size[:height]
108
+ file.write render_fake_svg({ width: image_width, height: image_height })
109
+ file.close
110
+ return { src: file.path, width: image_width, height: image_height }
111
+ end
112
+
113
+ def generate_mocks(options)
114
+ images = Array.new(options[:'page-number'])
115
+ .map.with_index do |value, index|
116
+ create_fake_image index.to_s, options[:size]
117
+ end
118
+ end
119
+
120
+ def create_package(data, options)
121
+ root_dir = File.join(Dir.pwd, options[:name])
122
+ image_dir = File.join(root_dir, 'images')
123
+
124
+ [root_dir, image_dir].each { |path| FileUtils.mkdir_p path }
125
+
126
+ files = data[:images]
127
+
128
+ files.map.with_index do |image, index|
129
+ image_manager = MiniMagick::Image.open(image[:src])
130
+
131
+ image_path = File.join(image_dir, [index, image_manager.type.downcase].join('.'))
132
+ FileUtils.mv image[:src], image_path
133
+ image[:src] = image_path
134
+ image
135
+ end
136
+
137
+ thumbnails_builder = ThumbnailsBuilder.new(files)
138
+ thumbnail_path = File.join(image_dir, './thumbnail.svg')
139
+ File.open(thumbnail_path, 'w') do |file|
140
+ file.write thumbnails_builder.to_build
141
+ end
142
+
143
+ files.map do |image, index|
144
+ image[:src] = Helpers.get_relativepath_as(image[:src], root_dir)
145
+ image
146
+ end
147
+
148
+ meta = {
149
+ description: 'TEST',
150
+ name: 'TEST',
151
+ author: { name: 'TEST' },
152
+ thumbnails: {
153
+ height: 200,
154
+ path: Helpers.get_relativepath_as(thumbnail_path, root_dir),
155
+ },
156
+ }
157
+
158
+ # TODO(yangqing): require deep_merge, dirty but work
159
+ meta.merge!(data[:meta]) unless data[:meta].nil?
160
+
161
+ content_builder = ContentBuilder.new(meta, files)
162
+ File.open(File.join(root_dir, './content.json'), 'w') do |file|
163
+ file.write content_builder.to_build
164
+ end
165
+
166
+ end
167
+ end
168
+ end
@@ -0,0 +1,29 @@
1
+ require 'pathname'
2
+
3
+ module Komic
4
+ class Generator
5
+ module Helpers
6
+ def self.parse_size(size)
7
+ width_range, height_range = size.split('x')
8
+ width, height = [width_range, height_range].map do |range|
9
+ unless range.nil?
10
+ min, max = range.split('-')
11
+ r = range.to_i
12
+ unless max.nil?
13
+ r = Random.rand(min.to_i...max.to_i)
14
+ end
15
+ r
16
+ end
17
+ end
18
+ return { width: width, height: height }
19
+ end
20
+
21
+ def self.get_relativepath_as(path, root)
22
+ File.join('./',
23
+ Pathname.new(path).relative_path_from(
24
+ Pathname.new(root)
25
+ ))
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,4 @@
1
+ module Komic
2
+ VERSION = '0.1.0'
3
+ CONTENT_JSON_VERSION = '0.1.0'
4
+ end
data/lib/komic.rb ADDED
@@ -0,0 +1 @@
1
+ require 'komic/cli'
data/spec/cli_spec.rb ADDED
@@ -0,0 +1,8 @@
1
+ require 'spec_helper'
2
+ require 'komic/cli'
3
+
4
+ describe Komic::Cli do
5
+ it "should have a VERSION constant" do
6
+ subject.const_get('VERSION').should_not be_empty
7
+ end
8
+ end
@@ -0,0 +1,4 @@
1
+ require 'rspec'
2
+ require 'komic/cli/version'
3
+
4
+ include Komic::Cli
metadata ADDED
@@ -0,0 +1,219 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: komic-cli
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - hxgdzyuyi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-08-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.19'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.19'
27
+ - !ruby/object:Gem::Dependency
28
+ name: mechanize
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.7'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.7'
41
+ - !ruby/object:Gem::Dependency
42
+ name: mime-types
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.6'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.6'
55
+ - !ruby/object:Gem::Dependency
56
+ name: mini_magick
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '4.2'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '4.2'
69
+ - !ruby/object:Gem::Dependency
70
+ name: jbuilder
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '2.3'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '2.3'
83
+ - !ruby/object:Gem::Dependency
84
+ name: json-schema
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '2.5'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '2.5'
97
+ - !ruby/object:Gem::Dependency
98
+ name: bundler
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rake
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.8'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '0.8'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rdoc
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '3.0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '3.0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rspec
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '3.3'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '3.3'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rubygems-tasks
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.2'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '0.2'
167
+ description: " komic-cli "
168
+ email: hxgdzyuyi@gmail.com
169
+ executables:
170
+ - komic
171
+ extensions: []
172
+ extra_rdoc_files: []
173
+ files:
174
+ - ".document"
175
+ - ".gitignore"
176
+ - ".rspec"
177
+ - ChangeLog.rdoc
178
+ - Gemfile
179
+ - LICENSE.txt
180
+ - README.rdoc
181
+ - Rakefile
182
+ - bin/komic
183
+ - komic-cli.gemspec
184
+ - lib/komic.rb
185
+ - lib/komic/cli.rb
186
+ - lib/komic/crawler/douban.rb
187
+ - lib/komic/generator/content.schema.json
188
+ - lib/komic/generator/generator.rb
189
+ - lib/komic/generator/helpers.rb
190
+ - lib/komic/version.rb
191
+ - spec/cli_spec.rb
192
+ - spec/spec_helper.rb
193
+ homepage: https://rubygems.org/gems/komic-cli
194
+ licenses:
195
+ - MIT
196
+ metadata: {}
197
+ post_install_message:
198
+ rdoc_options: []
199
+ require_paths:
200
+ - lib
201
+ required_ruby_version: !ruby/object:Gem::Requirement
202
+ requirements:
203
+ - - ">="
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
206
+ required_rubygems_version: !ruby/object:Gem::Requirement
207
+ requirements:
208
+ - - ">="
209
+ - !ruby/object:Gem::Version
210
+ version: '0'
211
+ requirements: []
212
+ rubyforge_project:
213
+ rubygems_version: 2.4.6
214
+ signing_key:
215
+ specification_version: 4
216
+ summary: komic-cli
217
+ test_files:
218
+ - spec/cli_spec.rb
219
+ - spec/spec_helper.rb