datahen 1.0.2 → 1.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4aa3927b9865f2815f64463f1d48b2dadddeaa73d2bd446a98ea9eb9ecb3ff5f
4
- data.tar.gz: 91b7a370e740721202e9f14c043cc5c28cb9e6102dcd701c5121506042ba753b
3
+ metadata.gz: affc49d8b9ed853c138aba0ec2af224b7f3065de8d06f9395ab49ff91332408b
4
+ data.tar.gz: b2668aa8fddba8c71b1b05b5b3e492deca25e82cd8f5dd9b53428a16cd3b4d1f
5
5
  SHA512:
6
- metadata.gz: c643100e60ea20686d882377b7e982829f93b4d4d8750342d47370f9d649688e94517462041b08ec1387901fcc8f33a0b0105e5f4ab43cd378dca5768cc190c4
7
- data.tar.gz: ba3bae8b462aa6894520dc115452a27fcb3d64571820970ad7b69592670549824ec53daa1c8194392750f746a14ced4baf2e552eafc2684735dc185c57af8e8e
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
 
@@ -12,10 +12,13 @@ module Datahen
12
12
 
13
13
  def self.exposed_methods
14
14
  [
15
+ :get_content,
16
+ :get_failed_content,
15
17
  :outputs,
16
18
  :save_outputs,
17
19
  :find_output,
18
- :find_outputs
20
+ :find_outputs,
21
+ :finish
19
22
  ].freeze
20
23
  end
21
24
 
@@ -27,6 +27,8 @@ module Datahen
27
27
 
28
28
  def self.exposed_methods
29
29
  [
30
+ :get_content,
31
+ :get_failed_content,
30
32
  :content,
31
33
  :failed_content,
32
34
  :outputs,
@@ -38,7 +40,8 @@ module Datahen
38
40
  :find_outputs,
39
41
  :refetch,
40
42
  :reparse,
41
- :limbo
43
+ :limbo,
44
+ :finish
42
45
  ].freeze
43
46
  end
44
47
 
@@ -18,7 +18,8 @@ module Datahen
18
18
  :save_pages,
19
19
  :save_outputs,
20
20
  :find_output,
21
- :find_outputs
21
+ :find_outputs,
22
+ :finish
22
23
  ].freeze
23
24
  end
24
25
 
@@ -1,3 +1,3 @@
1
1
  module Datahen
2
- VERSION = "1.0.2"
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.0.2
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-02 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