datahen 1.1.1 → 1.1.2

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
2
  SHA256:
3
- metadata.gz: 14cf0c4f60c5104527a963f2cb8ee0112db9f939cc2bb95ba8e9a1931f1781c0
4
- data.tar.gz: ca0a1662af06f3ed3344524aa3f1ed2a8e7c32f7dc3d204ae344e4657ecc1b73
3
+ metadata.gz: affc49d8b9ed853c138aba0ec2af224b7f3065de8d06f9395ab49ff91332408b
4
+ data.tar.gz: b2668aa8fddba8c71b1b05b5b3e492deca25e82cd8f5dd9b53428a16cd3b4d1f
5
5
  SHA512:
6
- metadata.gz: 4c94feb022e23fc300fa9b7ff90e262d3425f2433ac2cb0935ff6020f96cd75a11c1f04766c7584f94921b2ea0f999f84494cb12daf22c1fe79642918210772a
7
- data.tar.gz: a3591cf025d044f0f28e479f8fa883b20a91c77ecf9bdf92bec944ec2a6b61b1a14941da3e9e7964070f7b32a097874a9f9da3702de488adc87d5def1e4b9769
6
+ metadata.gz: d1c22a97ad04ce972f5c41dc1749e3613a45da9f43f31c8512703e67f2aaa9862bdb1b373eed6e8bfd2150471598e44054424b93612fd18241db1f78398230d4
7
+ data.tar.gz: e27c597ddc83e250bcb5edc7db8379f5498ea5636cd599fa7bfa4de8aabd6925e664ffd11aabb4389e5906e45bbca4dbf807db48094070e1dd99abffab1bd874
@@ -131,13 +131,14 @@ module Datahen
131
131
  Reparse pages in a scraper's current job. You need to specify either a --gid or --parse-fail or --status or --page-type.\x5
132
132
  LONGDESC
133
133
  option :gid, :aliases => :g, type: :string, desc: 'Reparse a specific GID'
134
+ option :fetch_fail, type: :boolean, desc: 'Reparse only pages that fails fetching.'
134
135
  option :parse_fail, type: :boolean, desc: 'Reparse only pages that fails parsing.'
135
136
  option :status, type: :string, desc: 'Reparse only pages with a specific status.'
136
137
  option :page_type, type: :string, desc: 'Refetches only pages with a specific page type.'
137
138
  option :job, :aliases => :j, type: :numeric, desc: 'Set a specific job ID'
138
139
  def reparse(scraper_name)
139
- if !options.key?(:gid) && !options.key?(:parse_fail) && !options.key?(:status) && !options.key?(:page_type)
140
- puts "Must specify either a --gid, --parse-fail, --status or --page-type"
140
+ if !options.key?(:gid) && !options.key?(:fetch_fail) && !options.key?(:parse_fail) && !options.key?(:status) && !options.key?(:page_type)
141
+ puts "Must specify either a --gid, --fetch-fail, --parse-fail, --status or --page-type"
141
142
  return
142
143
  end
143
144
 
@@ -155,11 +156,14 @@ module Datahen
155
156
  Move pages in a scraper's current job to limbo. You need to specify either a --gid or --status.\x5
156
157
  LONGDESC
157
158
  option :gid, :aliases => :g, type: :string, desc: 'Move a specific GID to limbo'
159
+ option :fetch_fail, type: :boolean, desc: 'Move pages that fails fetching to limbo.'
160
+ option :parse_fail, type: :boolean, desc: 'Move pages that fails parsing to limbo.'
158
161
  option :status, type: :string, desc: 'Move pages with a specific status to limbo.'
162
+ option :page_type, type: :string, desc: 'Move pages with a specific page type to limbo.'
159
163
  option :job, :aliases => :j, type: :numeric, desc: 'Set a specific job ID'
160
164
  def limbo(scraper_name)
161
- if !options.key?(:gid) && !options.key?(:status)
162
- puts "Must specify either a --gid or --status"
165
+ if !options.key?(:gid) && !options.key?(:fetch_fail) && !options.key?(:parse_fail) && !options.key?(:status) && !options.key?(:page_type)
166
+ puts "Must specify either a --gid, --fetch-fail, --parse-fail, --status or --page-type"
163
167
  return
164
168
  end
165
169
 
@@ -1,3 +1,3 @@
1
1
  module Datahen
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datahen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Parama Danoesubroto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-11 00:00:00.000000000 Z
11
+ date: 2022-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor