tx_ocr 0.0.1

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3b415c8611d1fbdd9abca9ece21ce4ff7286daa952759fa67d077ff3272dc1c2
4
+ data.tar.gz: 2f1152b3e83ee2ba75775a826f6fb5d8e34795021462e99e3b7e4910c7f13fed
5
+ SHA512:
6
+ metadata.gz: d3f1b07bd2ce815dc851b52337e21dc1ef0fa22488aad0c043b88f7a6a29c0af2dde429f5d03bacc93f7ce07ac5734d78ab0b77c26401970e344aebeca435c0b
7
+ data.tar.gz: c05d147bed893390b6e2cc5f59afce81bfdd2db2fb46220fb7427f1a24b40fc1eef27f56c6367b5d9000c24b69db47c54e4ffb68147a311aa0ca9c3ce22daae8
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ *.sbv
10
+ *.srt
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at xdite@otcbtc.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'http://rubygems.org'
2
+
3
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in tx_ocr.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,64 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ tx_ocr (0.0.1)
5
+ activesupport
6
+ httparty
7
+ json
8
+ tencent_cos_sdk
9
+ thor
10
+
11
+ GEM
12
+ remote: http://rubygems.org/
13
+ specs:
14
+ activesupport (5.2.3)
15
+ concurrent-ruby (~> 1.0, >= 1.0.2)
16
+ i18n (>= 0.7, < 2)
17
+ minitest (~> 5.1)
18
+ tzinfo (~> 1.1)
19
+ colorize (0.8.1)
20
+ concurrent-ruby (1.1.5)
21
+ domain_name (0.5.20180417)
22
+ unf (>= 0.0.5, < 1.0.0)
23
+ http-cookie (1.0.3)
24
+ domain_name (~> 0.5)
25
+ httparty (0.16.4)
26
+ mime-types (~> 3.0)
27
+ multi_xml (>= 0.5.2)
28
+ i18n (1.1.1)
29
+ concurrent-ruby (~> 1.0)
30
+ json (2.2.0)
31
+ mime-types (3.2.2)
32
+ mime-types-data (~> 3.2015)
33
+ mime-types-data (3.2019.0331)
34
+ minitest (5.11.3)
35
+ multi_xml (0.6.0)
36
+ netrc (0.11.0)
37
+ openssl (2.1.2)
38
+ rake (10.5.0)
39
+ rest-client (2.0.2)
40
+ http-cookie (>= 1.0.2, < 2.0)
41
+ mime-types (>= 1.16, < 4.0)
42
+ netrc (~> 0.8)
43
+ tencent_cos_sdk (0.2.2)
44
+ colorize (~> 0.8)
45
+ openssl (~> 2.1)
46
+ rest-client (~> 2.0)
47
+ thor (0.20.3)
48
+ thread_safe (0.3.6)
49
+ tzinfo (1.2.5)
50
+ thread_safe (~> 0.1)
51
+ unf (0.1.4)
52
+ unf_ext
53
+ unf_ext (0.0.7.5)
54
+
55
+ PLATFORMS
56
+ ruby
57
+
58
+ DEPENDENCIES
59
+ bundler (~> 1.16)
60
+ rake (~> 10.0)
61
+ tx_ocr!
62
+
63
+ BUNDLED WITH
64
+ 1.17.3
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 xdite
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # TxOcr 腾讯OCR
2
+
3
+ 这是一个可以调用腾讯OCR API 的命令列工具
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'tx_ocr'
11
+ ```
12
+
13
+ ## Setting 产生设定
14
+
15
+ `tx_ocr config`
16
+
17
+ * 这个命列会产生 ~/.tx_ocr/settings.yml
18
+ * 密钥至 <https://console.cloud.tencent.com/cam/capi> 申请
19
+ * 上传图片使用腾讯 COS https://cloud.tencent.com/product/cos (选择公开读私有写)
20
+
21
+ ```
22
+ ---
23
+ :secret_key: ""
24
+ :secret_id: ""
25
+ :region: "ap-beijing"
26
+ :bucket: ""
27
+ :parent_path: "/ocr"
28
+
29
+ ```
30
+
31
+
32
+ ## Usage 使用方式
33
+
34
+ * tx_ocr url http://xxxxx.jpg # 识别网址图片文字
35
+ * tx_ocr image a.jpg # 识别图片文字
36
+
37
+
38
+ ## Other 其他说明
39
+
40
+ 这个软件目前为自用,所以写得很简陋。有问题请自行修复,并拉 pull request。
41
+
42
+
43
+
44
+ ## Development
45
+
46
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
47
+
48
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
49
+
50
+ ## Contributing
51
+
52
+ Bug reports and pull requests are welcome on GitHub at https://github.com/xdite/tx_ocr. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
53
+
54
+ ## License
55
+
56
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
57
+
58
+ ## Code of Conduct
59
+
60
+ Everyone interacting in the TxOcr project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/tx_ocr/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler/gem_tasks'
2
+ task default: :spec
data/exe/tx_ocr ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'tx_ocr/cli'
5
+
6
+ TxOcr::CLI.start
data/lib/tx_ocr.rb ADDED
@@ -0,0 +1,10 @@
1
+ require 'tx_ocr/helper/config_helper'
2
+ require 'tx_ocr/version'
3
+ require 'tx_ocr/cli'
4
+ require 'tx_ocr/base'
5
+ require 'tx_ocr/text'
6
+ require 'tx_ocr/image'
7
+
8
+ module TxOcr
9
+ # Your code goes here...
10
+ end
@@ -0,0 +1,107 @@
1
+ # frozen_string_literal: true
2
+ require 'httparty'
3
+ require 'json'
4
+ require 'cgi'
5
+ require 'uri'
6
+ require 'tencent_cos_sdk'
7
+
8
+ module TxOcr
9
+ class Base
10
+ HOST = 'ocr.tencentcloudapi.com'
11
+
12
+ TencentCosSdk.configure do |conf|
13
+ conf.secret_id = TxOcr.config[:secret_id]
14
+ conf.secret_key = TxOcr.config[:secret_key]
15
+ conf.host = "#{TxOcr.config[:bucket]}.cos.#{TxOcr.config[:region]}.myqcloud.com"
16
+ conf.parent_path = TxOcr.config[:parent_path]
17
+ end
18
+
19
+
20
+ def region
21
+ TxOcr.config[:region]
22
+ end
23
+
24
+ def url
25
+ "https://#{HOST}"
26
+ end
27
+
28
+ def secret_id
29
+ TxOcr.config[:secret_id]
30
+ end
31
+
32
+ def secret_key
33
+ TxOcr.config[:secret_key]
34
+ end
35
+
36
+ def orginal_parameters
37
+ new_hash = fixed_paramaters
38
+ new_hash['Action'] = @ocr_type
39
+ new_hash['ImageUrl'] = remote_image_url
40
+ to_params(new_hash)
41
+ end
42
+
43
+ def encode_parameters
44
+ new_hash = fixed_paramaters
45
+ new_hash['Action'] = @ocr_type
46
+ new_hash['ImageUrl'] = encoded_image_url
47
+ to_params(new_hash)
48
+ end
49
+
50
+ def fixed_paramaters
51
+ { 'Nonce' => '2373', 'Region' => region, 'SecretId' => secret_id, 'Timestamp' => Time.now.to_i.to_s, 'Version' => '2018-11-19' }
52
+ end
53
+
54
+ def to_params(original_hash)
55
+ sorted_by_key = Hash[original_hash.sort]
56
+ sorted_by_key.map { |x| "#{x[0]}=#{x[1]}" }.join('&')
57
+ end
58
+
59
+ def string_for_sign
60
+ "GET#{HOST}/?" + orginal_parameters
61
+ end
62
+
63
+ def signature
64
+ digest = OpenSSL::Digest.new('sha1')
65
+ hmac = OpenSSL::HMAC.digest(digest, secret_key, string_for_sign)
66
+ encrypt = Base64.encode64(hmac).delete("\n")
67
+ encrypt.gsub('+', '%2B') # 处理 + 号
68
+ end
69
+
70
+ def request_params
71
+ "/?#{encode_parameters}&Signature=#{signature}"
72
+ end
73
+
74
+ def full_request_url
75
+ url + request_params
76
+ end
77
+
78
+ def request_object
79
+ HTTParty.get(url + request_params)
80
+ end
81
+
82
+ def json
83
+ JSON.parse(request_object.body)
84
+ end
85
+
86
+ def raw_result
87
+ if json['Response']['Error']
88
+ json
89
+ else
90
+ original_data = json['Response']['TextDetections']
91
+ original_data.map { |h| h['DetectedText'] }
92
+ end
93
+ end
94
+
95
+ def indent_result
96
+ if json['Response']['Error']
97
+ json
98
+ else
99
+ new_content = raw_result.join('')
100
+
101
+ new_content = new_content.gsub('。', "。\n\n")
102
+
103
+ new_content
104
+ end
105
+ end
106
+ end
107
+ end
data/lib/tx_ocr/cli.rb ADDED
@@ -0,0 +1,40 @@
1
+ require 'thor'
2
+ require 'active_support/core_ext/string'
3
+ require 'tx_ocr'
4
+
5
+ module TxOcr
6
+ class CLI < Thor
7
+ include Thor::Actions
8
+
9
+ def self.source_root
10
+ File.expand_path('../..', __dir__)
11
+ end
12
+
13
+ desc 'config', 'change settings'
14
+ def config
15
+
16
+ config_path = Dir.home + '/.tx_ocr'
17
+ if Dir.exist?(config_path)
18
+ puts "Your current name is [#{TxOcr.config[:name]}]."
19
+ else
20
+ template 'templates/settings.yml.tt', "http://#{config_path}/settings.yml"
21
+ end
22
+ end
23
+
24
+ desc 'tx_ocr image FILENAME ', '翻译图片'
25
+ def image(filename)
26
+ puts TxOcr::Image.new(filename).indent_result
27
+ end
28
+
29
+ desc 'tx_ocr url URL ', '翻译网址图片'
30
+ def url(url)
31
+ puts TxOcr::Text.new(url).indent_result
32
+ end
33
+
34
+ private
35
+
36
+ def display_name(name)
37
+ puts name
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,51 @@
1
+ require 'fileutils'
2
+ require 'yaml'
3
+ require 'psych'
4
+
5
+ module TxOcr
6
+ # Configuration defaults
7
+ @config = {
8
+ name: 'default'
9
+ }
10
+ @valid_config_keys = @config.keys
11
+
12
+ # Configure through hash
13
+ def self.configure(opts = {})
14
+ config
15
+ opts.each do |k, v|
16
+ @config[k.to_sym] = v if @valid_config_keys.include? k.to_sym
17
+ end
18
+ save_config
19
+ end
20
+
21
+ def self.get_config_path
22
+ config_path = Dir.home + '/.tx_ocr'
23
+ if Dir.exist?(config_path)
24
+ # use user settings
25
+ config_path
26
+ else
27
+ raise "Can't find config directory. please init by command: 'mygem config'.'"
28
+ end
29
+ end
30
+
31
+ # configをyamlから@cofigに取得
32
+ def self.config
33
+ yml_path = get_config_path + '/settings.yml'
34
+ yml_file = YAML.load_file(yml_path)
35
+ if yml_file
36
+ @config = yml_file
37
+ else
38
+ File.open(yml_path, 'w') { |f| YAML.dump(@config, f) }
39
+ end
40
+ end
41
+
42
+ # 現在の@configをyamlに保存
43
+ def self.save_config
44
+ yml_path = get_config_path + '/settings.yml'
45
+ if File.exist?(yml_path)
46
+ File.open(yml_path, 'w') { |f| YAML.dump(@config, f) }
47
+ else
48
+ raise "Can't find #{yml_path}. please set configure."
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TxOcr
4
+ class Image < Base
5
+ def initialize(file_path, ocr_type = 'GeneralBasicOCR')
6
+ @file_path = file_path
7
+ @ocr_type = ocr_type
8
+
9
+ extname = File.extname(@file_path)
10
+ basename = File.basename(@file_path, extname)
11
+ random_filename = Time.now.to_i.to_s
12
+ new_filename = "#{random_filename}#{extname}"
13
+ # 上传
14
+ TencentCosSdk.put new_filename, file: @file_path
15
+
16
+ @remote_image_url = "http://#{TxOcr.config[:bucket]}.cos.#{TxOcr.config[:region]}.myqcloud.com" + TxOcr.config[:parent_path] + "/#{new_filename}"
17
+
18
+ end
19
+
20
+ def new_filename
21
+ extname = File.extname(@file_path)
22
+ basename = File.basename(@file_path, extname)
23
+ random_filename = Time.now.to_i.to_s
24
+ "#{random_filename}#{extname}"
25
+ end
26
+
27
+ attr_reader :remote_image_url
28
+
29
+ def encoded_image_url
30
+ URI.encode(@remote_image_url)
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TxOcr
4
+ class Text < Base
5
+ def initialize(file_url, ocr_type = 'GeneralBasicOCR')
6
+ @ocr_type = ocr_type
7
+ @file_url = file_url
8
+ end
9
+
10
+ def remote_image_url
11
+ @file_url
12
+ end
13
+
14
+ def encoded_image_url
15
+ URI.encode(@file_url)
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,3 @@
1
+ module TxOcr
2
+ VERSION = '0.0.1'.freeze
3
+ end
@@ -0,0 +1,6 @@
1
+ ---
2
+ :secret_key: ""
3
+ :secret_id: ""
4
+ :region: "ap-beijing"
5
+ :bucket: ""
6
+ :parent_path: "/ocr"
@@ -0,0 +1,33 @@
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'tx_ocr/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'tx_ocr'
7
+ spec.version = TxOcr::VERSION
8
+ spec.authors = ['xdite']
9
+ spec.email = ['xuite.joke@gmail.com']
10
+
11
+ spec.summary = 'Tencent OCR CLI'
12
+ spec.description = 'Tencent OCR CLI'
13
+ spec.homepage = 'https://github.com/xdite/tx_ocr'
14
+ spec.license = 'MIT'
15
+ spec.executables << 'tx_ocr'
16
+
17
+ # Specify which files should be added to the gem when it is released.
18
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
19
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
20
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
+ end
22
+ spec.bindir = 'exe'
23
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
+ spec.require_paths = ['lib']
25
+
26
+ spec.add_development_dependency 'bundler', '~> 1.16'
27
+ spec.add_development_dependency 'rake', '~> 10.0'
28
+ spec.add_dependency 'activesupport'
29
+ spec.add_dependency 'httparty'
30
+ spec.add_dependency 'json'
31
+ spec.add_dependency 'thor'
32
+ spec.add_dependency 'tencent_cos_sdk'
33
+ end
metadata ADDED
@@ -0,0 +1,160 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tx_ocr
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - xdite
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-08-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: activesupport
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: httparty
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: json
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: thor
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: tencent_cos_sdk
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: Tencent OCR CLI
112
+ email:
113
+ - xuite.joke@gmail.com
114
+ executables:
115
+ - tx_ocr
116
+ extensions: []
117
+ extra_rdoc_files: []
118
+ files:
119
+ - ".gitignore"
120
+ - CODE_OF_CONDUCT.md
121
+ - Gemfile
122
+ - Gemfile.lock
123
+ - LICENSE.txt
124
+ - README.md
125
+ - Rakefile
126
+ - exe/tx_ocr
127
+ - lib/tx_ocr.rb
128
+ - lib/tx_ocr/base.rb
129
+ - lib/tx_ocr/cli.rb
130
+ - lib/tx_ocr/helper/config_helper.rb
131
+ - lib/tx_ocr/image.rb
132
+ - lib/tx_ocr/text.rb
133
+ - lib/tx_ocr/version.rb
134
+ - templates/settings.yml.tt
135
+ - tx_translate.gemspec
136
+ homepage: https://github.com/xdite/tx_ocr
137
+ licenses:
138
+ - MIT
139
+ metadata: {}
140
+ post_install_message:
141
+ rdoc_options: []
142
+ require_paths:
143
+ - lib
144
+ required_ruby_version: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ version: '0'
149
+ required_rubygems_version: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ requirements: []
155
+ rubyforge_project:
156
+ rubygems_version: 2.7.7
157
+ signing_key:
158
+ specification_version: 4
159
+ summary: Tencent OCR CLI
160
+ test_files: []