anystyle-cli 1.3.2 → 1.4.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c46f47b8b56a1c962874c4330e0bbd91be5adbd52dec2f4202face04626090d2
|
|
4
|
+
data.tar.gz: ab82312b14689cb4dd34015330ba86433c2eceddc8acc7e001ede59cab13dfa7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 88e27b7c4813687adf80d97950289885b71fa10959c45338bfa5e91f7650ee36666c5022822f33bb0135c14356ad82d7942a981a412ca0697d4e62c2ecfca13c
|
|
7
|
+
data.tar.gz: 1c7b37a812132e55343f842859a3c0ae82500be5ee0784ddd9de0c991037bbef18310cbda098b1eb3ec91064d89b0551c2d649a3077b56c05b5626e3b07aea44
|
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'])
|
|
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'])
|
|
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]
|
|
79
|
+
opts[:pdftotext]
|
|
80
80
|
end
|
|
81
81
|
|
|
82
82
|
unless opts[:pdfinfo].nil?
|
|
83
83
|
AnyStyle::Finder.defaults[:pdfinfo] =
|
|
84
|
-
opts[:pdfinfo]
|
|
84
|
+
opts[:pdfinfo]
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
AnyStyle
|
|
@@ -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
|
|
17
|
+
AnyStyle.finder.check path.to_s
|
|
18
18
|
when '.xml'
|
|
19
|
-
AnyStyle.parser.check path.to_s
|
|
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
|
|
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
|
|
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])
|
|
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
|
|
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')]
|
|
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}"
|
data/lib/anystyle/cli/version.rb
CHANGED
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.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sylvester Keil
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-01-11 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.
|
|
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.
|
|
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
|
|
78
|
+
rubygems_version: 3.4.2
|
|
79
79
|
signing_key:
|
|
80
80
|
specification_version: 4
|
|
81
81
|
summary: AnyStyle CLI
|