anystyle-cli 1.0.0 → 1.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db54794068efeafdbcb793c71ffeff40fa3e67f5ac7e4564eb76c2cddc23ec09
|
4
|
+
data.tar.gz: 4db1f6bf5a8529cd9dbf736745401a83ef207642c595c16857d903468488ddb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bda0fd4dd07c77a189a8964e4ec150d63a2ff80b324f5ea3e28188e6c1ce2947ca007df3fc5142dc84bc05b17a0cb0cfc960908c78532ec8723f940521ee900a
|
7
|
+
data.tar.gz: baecc0a27805e48906a23f9f08ddf1af1e22c83015993cef4624151778a5bdee3ad80bc50b6437d65f5a753c0f62f229463d8a8c162ff0faec44f4d6f206dbe9
|
@@ -10,29 +10,25 @@ module AnyStyle
|
|
10
10
|
ref = doc[0].references
|
11
11
|
|
12
12
|
if ref.length == 0
|
13
|
-
say "no references found
|
13
|
+
say "no references found."
|
14
14
|
else
|
15
|
-
say "#{ref.length} references found
|
15
|
+
say "#{ref.length} references found."
|
16
16
|
dst = nil
|
17
17
|
each_format do |fmt|
|
18
18
|
case fmt
|
19
19
|
when 'ttx'
|
20
|
-
say "Formatting document as #{fmt} ...\n"
|
21
20
|
res = doc.to_txt tagged: true
|
22
21
|
when 'txt'
|
23
|
-
say "Formatting document as #{fmt} ...\n"
|
24
22
|
res = doc.to_txt tagged: false
|
25
23
|
when 'ref'
|
26
|
-
say "Formatting references as #{fmt} ...\n"
|
27
24
|
res = ref.join("\n")
|
28
25
|
else
|
29
|
-
say "Formatting references as #{fmt} ...\n"
|
30
26
|
dst ||= parse(ref.join("\n"))
|
31
27
|
res = format(dst, fmt)
|
32
28
|
end
|
33
29
|
|
34
30
|
out = extsub(path, ".#{fmt}")
|
35
|
-
say "Writing #{out.relative_path_from(base_path)}
|
31
|
+
say "Writing #{out.relative_path_from(base_path)} ..."
|
36
32
|
write res, out, base_path
|
37
33
|
end
|
38
34
|
end
|
@@ -7,12 +7,11 @@ module AnyStyle
|
|
7
7
|
walk args[0] do |path, base_path|
|
8
8
|
say "Parsing #{path.relative_path_from(base_path)} ..."
|
9
9
|
dataset = parse(path.to_s.untaint)
|
10
|
-
say "#{dataset.length} references found
|
10
|
+
say "#{dataset.length} references found."
|
11
11
|
each_format do |fmt|
|
12
|
-
say "Formatting references as #{fmt} ...\n"
|
13
12
|
res = format(dataset, fmt)
|
14
13
|
out = extsub(path, ".#{fmt}")
|
15
|
-
say "Writing #{out.relative_path_from(base_path)}
|
14
|
+
say "Writing #{out.relative_path_from(base_path)} ..."
|
16
15
|
write res, out, base_path
|
17
16
|
end
|
18
17
|
end
|
data/lib/anystyle/cli/version.rb
CHANGED