anystyle-cli 1.3.2 → 1.4.1

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: d8fb3d5140aabe9a006a0c5340f93a9b31dc49f124a227c7155401970b6e2c27
4
- data.tar.gz: 2cd40db47e928ea8d2d56182bbae37b9ae9196678e9f6485db5c53d44b3b28bc
3
+ metadata.gz: 33db7851ea26cd9a9358f3dcec31e8b91826804ca248f4d20867b57c54ce57d1
4
+ data.tar.gz: bbaeb4319bb6491c25d2b4859622d6c7d02a01a7706947185cabee99e05296c6
5
5
  SHA512:
6
- metadata.gz: 24db7f458c248e3c3600f146ff4d6c9f99167538ac188409efe4ec5050cb5c596420e02837bddfe1a4d1601285b202cf220e65aafa9b41f4aed1f95255b8a591
7
- data.tar.gz: 3115ca0d748dc3c99a406e01f3e6bc61db588893432d81e56ffcaa860881eb800ff88af5ff436558050be43c8cdee527036951ef7d4e535dc8231859db6a68d3
6
+ metadata.gz: 3f29d5773ba7fc300caf2d2b00c1d1e89e16198bac1a48e0eb24ba30571c3f43870d30624dac2ccb066f10e9200a4261ba116c74b516aa59a9b6f3f7f23e7237
7
+ data.tar.gz: 0a402a3e49ddd8e74af5f5e8b8f7a903d9640db34cbb443c04fbff91f16b86a8f7b8f560590b6b936508b8526fcd10614be9de60a84ab15f491802e4aed2c6e2
data/bin/anystyle CHANGED
@@ -66,22 +66,22 @@ pre do |opts|
66
66
 
67
67
  unless opts[:'finder-model'].nil?
68
68
  AnyStyle::Finder.defaults[:model] =
69
- File.expand_path(opts[:'finder-model']).untaint
69
+ File.expand_path(opts[:'finder-model'])
70
70
  end
71
71
 
72
72
  unless opts[:'parser-model'].nil?
73
73
  AnyStyle::Parser.defaults[:model] =
74
- File.expand_path(opts[:'parser-model']).untaint
74
+ File.expand_path(opts[:'parser-model'])
75
75
  end
76
76
 
77
77
  unless opts[:pdftotext].nil?
78
78
  AnyStyle::Finder.defaults[:pdftotext] =
79
- opts[:pdftotext].untaint
79
+ opts[:pdftotext]
80
80
  end
81
81
 
82
82
  unless opts[:pdfinfo].nil?
83
83
  AnyStyle::Finder.defaults[:pdfinfo] =
84
- opts[:pdfinfo].untaint
84
+ opts[:pdfinfo]
85
85
  end
86
86
 
87
87
  AnyStyle
@@ -36,7 +36,7 @@ module AnyStyle
36
36
  end
37
37
 
38
38
  def parse(input)
39
- AnyStyle.parse(input, format: :wapiti)
39
+ AnyStyle.parse(Wapiti::Dataset.open(input), format: :wapiti)
40
40
  end
41
41
 
42
42
  def format(dataset, fmt)
@@ -14,9 +14,9 @@ module AnyStyle
14
14
  def check(path)
15
15
  case path.extname
16
16
  when '.ttx'
17
- AnyStyle.finder.check path.to_s.untaint
17
+ AnyStyle.finder.check path.to_s
18
18
  when '.xml'
19
- AnyStyle.parser.check path.to_s.untaint
19
+ AnyStyle.parser.check path.to_s
20
20
  else
21
21
  raise ArgumentError, "cannot check untagged input: #{path}"
22
22
  end
@@ -6,7 +6,7 @@ module AnyStyle
6
6
  set_output_folder args[1]
7
7
  walk args[0] do |path, base_path|
8
8
  say "Analyzing #{path.relative_path_from(base_path)} ..."
9
- doc = find(path.to_s.untaint, params)
9
+ doc = find(path.to_s, params)
10
10
  ref = doc[0].references(normalize_blocks: !params[:solo])
11
11
 
12
12
  if ref.length == 0
@@ -6,7 +6,7 @@ module AnyStyle
6
6
  set_output_folder args[1]
7
7
  walk args[0] do |path, base_path|
8
8
  say "Parsing #{path.relative_path_from(base_path)} ..."
9
- dataset = parse(path.to_s.untaint)
9
+ dataset = parse(path.to_s)
10
10
  say "#{dataset.length} references found."
11
11
  each_format do |fmt|
12
12
  res = format(dataset, fmt)
@@ -11,17 +11,17 @@ module AnyStyle
11
11
  if args[1].nil?
12
12
  model.save
13
13
  else
14
- model.save File.expand_path(args[1]).untaint
14
+ model.save File.expand_path(args[1])
15
15
  end
16
16
  end
17
17
 
18
18
  def train(path)
19
19
  case
20
20
  when File.extname(path) == '.xml'
21
- AnyStyle.parser.train path.to_s.untaint
21
+ AnyStyle.parser.train path.to_s
22
22
  AnyStyle.parser.model
23
23
  when File.directory?(path)
24
- AnyStyle.finder.train Dir[File.join(path, '*.ttx')].map(&:untaint)
24
+ AnyStyle.finder.train Dir[File.join(path, '*.ttx')]
25
25
  AnyStyle.finder.model
26
26
  else
27
27
  raise ArgumentError, "cannot train input: #{path}"
@@ -1,5 +1,5 @@
1
1
  module AnyStyle
2
2
  module CLI
3
- VERSION = '1.3.2'.freeze
3
+ VERSION = '1.4.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anystyle-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-09 00:00:00.000000000 Z
11
+ date: 2023-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: anystyle
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
19
+ version: '1.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.3'
26
+ version: '1.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: gli
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.2.15
78
+ rubygems_version: 3.4.2
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: AnyStyle CLI